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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to