Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding usb_control_in functionality #212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Zanobos
Copy link

@Zanobos Zanobos commented Oct 18, 2019

As discussed here: pyvisa/pyvisa#466 the pyvisa-py backend is missing the implementation of usb_control_in. This patch applies the modification needed to have it working. Tested and working with a bk8600.

Disclaimer: Is implemented the feature of control_transfer, but not the one of optional data stage - I miss the specifications and the knowledge to do that part (I tried with a plain self.read(length), but it's not enough).
If anyone can lead me to the right way, I can provide implementation for that part too.

pyvisa-py/highlevel.py Outdated Show resolved Hide resolved
length,
timeout=self.timeout)

#TODO satisfy the second half of the problem -i.e. sending buffer the optional data stage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try using to do a direct read. Using self.read means you are starting a full USBTMC request which is not what we want here. See https://github.com/pyvisa/pyvisa-py/blob/master/pyvisa-py/usb.py#L108

pyvisa-py/protocols/usbtmc.py Outdated Show resolved Hide resolved
@MatthieuDartiailh
Copy link
Member

ping @Zanobos

@Zanobos
Copy link
Author

Zanobos commented Nov 20, 2019

Hi @MatthieuDartiailh ,
I'll try to work on this branch as soon as possible.

Base automatically changed from master to main January 19, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants