Closed JoshBlake closed 9 years ago
Thanks for the details.
Can you elaborate on how you configure libusbx to use the Kinect device? I found on Windows I need to configure it for the composite parent device rather than the sub-device. This allows me to claim interface 0 (for control and bulk transfers) and interface 1 (for isoc), but would would allow claiming the audio interfaces. I'm not sure how it enumerates on Linux.
The superspeed fix is current pending integration to libusbx: https://github.com/libusbx/libusbx/pull/163
There is currently a discussion on the OpenKinect mailing list regarding the linux packet size: https://groups.google.com/forum/#!topic/openkinect/8Aa8ab3aAs4 I'll reference this issue on the thread but please chime in as well there.
I didn't change any of the setup code (except removing libusb_set_configuration) and it worked out of the box.
So you don't need to configure or install a driver for the device or anything? (On Windows, I used Zadig http://zadig.akeo.ie/ to install the libusbk driver for the sensor device.)
no just works with the standard usbfs linux drivers. after plugging in the Kinect the lsusb command shows the device and correct details for endpoints and so on.
In that case, that may just need to be a bit of platform specific config. I'll update it next time I have a chance, unless someone else beats me to it.
@christiankerl is right about libusb_set_configuration(), it is supposed to be called before libusb_claim_interface().
If you want to set the configuration only when it's strictly needed you may want follow what is suggested in http://libusbx.sourceforge.net/api-1.0/caveats.html (an example is here for the kinect1 audio device: http://git.ao2.it/kinect-audio-setup.git/commitdiff/6e31aa17271f90a443591719089688bbf2040765)
@ao2 Thanks for the clarification. I'll make an issue for this.
hi, I try to get it running on my linux machine and here are some observations I made. I will update this as I progress
general problems:
r = libusb_set_configuration(handle, configId);
in Protonect.cpp has to be commented (as already noted on the mailing list), it always fails because the snd_usb_audio kernel module claims one of the interfaces (at least at my pc). Therefore, the call returns a LIBUSB_DEVICE_BUSY error. Nevertheless,libusb_get_configuration
returns the correct configId=1. btw. in Protonect.cpp thelibusb_set_configuration
function is called after the interfaces are claimed, but according to the documentation it should be called before.problems related to isochronous transfer: