[libhid-discuss] Using composite USB devices
Peter Stuge
stuge-libhid at cdy.org
Mon Mar 23 15:14:03 UTC 2009
Ali Asad wrote:
> The device in question is a composite USB memory token that also
> enumerates as an HID device. It has four end points; ep 1 and ep 2
> for bulk mass storage, ep 0 as control end-point, and ep 4 for
> interrupt IN.
> The control end-point is used for sending HID data from host to
> device, and the interrupt end-point for sending HID data from device
> to the host.
Are ep1-2 and ep4 in different interfaces? If not I think you're in
trouble if you want to use the MSC at the same time as HID.
> I can talk to this device over HID on both Windows and Mac OS
> (Tiger as well as Leopard), and now want to support Linux as well.
Using native HID on OS X?
> I am attaching the pseudo code of using the USB library (libhid
> gave me similar results). Do you spot anything wrong in this
> appraoch?
Posting to libusb-devel might be better. I'll try to give some hints
here at least.
> rv = usb_detach_kernel_driver_np(usb_handle, MY_CONTROL_INTERFACE);
Do you need to?
> rv = usb_claim_interface(usb_handle, MY_CONTROL_INTERFACE);
This makes me a bit scared. How many interfaces are there? You should
have at least two. Output from lsusb -v and /proc/bus/usb/devices is
always helpful in these questions.
> rv = usb_interrupt_read(usb_handle,
>
> // ERROR: this call fails. I do not see any data on the USB bus.
How does it fail? Please provide every single detail if you want us
to be able to help you.
//Peter
More information about the libhid-discuss
mailing list