Ports and Interfaces > USB

linux box not allowing control set's but does get's ok.

<< < (2/3) > >>

Jan Axelson:
Yes, you have to pass the report id in the first element

ulao:
Do you have any idea why it give an error -7.

Jan Axelson:
What is giving the error and do you have a reference for what the error indicates?

ulao:
libusb 1.0 is issuing an error -7 (timeout). There is no need for the error because the device received the data.  Most of this is explain in my posts above.


1) the host sends a control transfer get ok. No errors.
2) the host sends a control transfer set and gets error -7. NOTE the device received the set ok.
3) Libusb 1.0 tries to send the set over and over, no idea why.
4) libusb 0.1  sends a control transfer set ok. No errors.

This is what the log gives me

[20.121537] [00003114] libusb: debug [libusb_alloc_transfer] transfer 0x55a7580de520
[20.121550] [00003114] libusb: debug [libusb_submit_transfer] transfer 0x55a7580de520
[20.121555] [00003114] libusb: debug [add_to_flying_list] arm timerfd for timeout in 5000ms (first in line)
[20.121585] [00003114] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[20.121802] [00003114] libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
[25.121587] [00003114] libusb: debug [handle_events] poll() returned 1
[25.121620] [00003114] libusb: debug [handle_events] timerfd triggered
[25.121626] [00003114] libusb: debug [libusb_cancel_transfer] transfer 0x55a7580de520
[25.122291] [00003114] libusb: debug [disarm_timerfd]
[25.122326] [00003114] libusb: debug [handle_events] poll() 3 fds with timeout in 0ms
[25.122340] [00003114] libusb: debug [handle_events] poll() returned 1
[25.122354] [00003114] libusb: debug [reap_for_handle] urb type=2 status=-2 transferred=8
[25.122360] [00003114] libusb: debug [handle_control_completion] handling completion status -2
[25.122367] [00003114] libusb: debug [usbi_handle_transfer_cancellation] detected timeout cancellation
[25.122371] [00003114] libusb: debug [disarm_timerfd]
[25.122375] [00003114] libusb: debug [usbi_handle_transfer_completion] transfer 0x55a7580de520 has callback 0x7fbff56d8b30
[25.122380] [00003114] libusb: debug [sync_transfer_cb] actual_length=8
[25.122388] [00003114] libusb: debug [libusb_free_transfer] transfer 0x55a7580de520
Error during libusb_control_transfer: -7

Here is my logic analyzer results. Looks like after it sends a good feature set, it just sends again, and again. ?



Control data test Summary.

1) this device works with libusb 0.1
2) this device works with windows
3) This device work with linux FFB (FFB uses control transfers set/get)

Thus the issue is clearly libusb 1.0. As why I was wondering if you samples work? I tried the same code in my host software and get this error -7.



Jan Axelson:
Be sure the endpoint is returning ACK in the Setup and Data stages, not doing so would cause the host to retry.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version