On Tue, 29 Mar 2005, Johannes Berg wrote: > On Tue, 2005-03-29 at 12:08 -0500, jklaas wrote: > > Being a usb gadget freak, I bought this combo mouse and usb controlled > > FM Radio for cheap ($10 + shipping). It looks really neat, and I pretty > > much figured out how to get the radio to work. > > Neat. > > > I was wondering if there was any way to get multiple drivers talking to > > the same device. Or, alternatively, can I write a libusb program that > > will talk to the radio while the mouse has been grabbed by the HID > > driver. > > You can bind drivers to specific endpoints. I would guess that the > usbhid driver only grabs the endpoint that is HID, and leaves one free. > Check the output of cat /proc/bus/usb/devices you should see something > like I have here: > T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 > D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=05ac ProdID=020e Rev= 0.28 > S: Manufacturer=Apple Computer > S: Product=Apple Internal Keyboard/Trackpad > C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr= 40mA > I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid > E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=10ms > I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=AppleTrackpad > E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl=1ms > I: If#= 2 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid > E: Ad=84(I) Atr=03(Int.) MxPS= 1 Ivl=10ms > > Except "Driver=(none)" for the radio. > > There, I have a single device with 3 endpoints and 2 drivers bound to > them. The source for the AppleTrackpad driver is available from > http://johannes.sipsolutions.net/PowerBook > Basically I just went through the same question you did and have the > answer in there. > > johannes >
Cool, thanks. I have another question that I don't quite understand. With the FM Radio the TransferBufferLength in the URB going down is usually either 0x16 or 0xca. The URB coming back has the TransferBufferLength is 0x06. I guess I don't quite understand why they're different. -- James Klaas "Let me tell you something my friend. Hope is a dangerous thing. Hope can drive a man insane." Ellis Boyd (Red) Redding, from Shawshank Redemption ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel