-
Notifications
You must be signed in to change notification settings - Fork 27
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
How to write a response in chunks (USB control read)? #6
Comments
I suggest using Wireshark to look at the requests and then comparing this with the information provided in the FX2 manual. |
Apparently only chunks of 64 bytes can be sent from EP0 if the data does not fit in a single packet. I tried with a few other values (32, 63) but this always results in an error.
That was also my first idea. Unfortunately, the packets are captured by libusb which inserts its own errors before propagating to Wireshark.
I think 64 bytes packets are expected with Thanks @whitequark for your awesome projects. If you think that this behavior is expected, feel free to close the issue. |
I don't think this is a libfx2 issue and I don't really want to comb through FX2 manuals to find out the root cause. |
Of course. Thanks for your time and your open source projects. |
I am trying to write large responses to a USB control read. The data is read in chunks of 32 bytes from a i2c device and feeds
EP0BUF
.I had a look at something similar in the Glasgow firmware and wrote this:
I removed the i2c-related code so I just expect the FX2 to send garbage data. However, when I request more than 32 bytes (e.g. 33), I always receive 32 bytes:
In other cases, an
usb1.USBErrorPipe: LIBUSB_ERROR_PIPE [-9]
exception is thrown.Sorry for opening an issue here as this is probably not an issue with the libfx2 implementation.
The text was updated successfully, but these errors were encountered: