1

I am writing a libusb program to interact with a USB gamepad. I found it, opened it, detached from kernel, claimed interface, and when I try to usb_interrupt_read it returns -110 (resource temporarily unavailable) what is doing on?

Also, usb_set_configuration fails, so I commented it out. Do I need it?

Why isn't it reading?

i = usb_interrupt_read(handle, 0x81, bytes, 8, 50);
printf("%d read\n", i);
perror("read");
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
pvinis
  • 4,059
  • 5
  • 39
  • 59
  • I tried set configuration, but read still fails. the game pad has just one configuration, one interface, one altsetting, and – pvinis Oct 18 '10 at 23:13
  • endpoints. 0x02 and 0x81. read returns -110. – pvinis Oct 18 '10 at 23:14
  • If you didn't call `usb_set_configuration()`, how do you know the current configuration *has* an interrupt endpoint? Can you give some more information about that failure? – Carl Norum Oct 18 '10 at 22:09
  • I know that from the USB tree in Linux. what do you need t know about the failure? make I can give you more so you can give me more... – pvinis Oct 18 '10 at 23:17
  • It sounds like you are using a very old version of libusb. You should try [libusb 1.0.x](http://libusb.info/) and its `libusb_interrupt_transfer` function. – David Grayson Feb 14 '15 at 02:07

0 Answers0