USB Mouse detected as a generic hid device.

Loren M. Lang lorenl at alzatex.com
Mon Mar 14 03:16:23 PST 2005


On Sat, Mar 12, 2005 at 10:43:12PM -0800, Loren M. Lang wrote:
> On Sat, Mar 12, 2005 at 08:19:23PM -0800, Loren M. Lang wrote:
> > I have a Wireless USB Keyboard/Mouse Combo from Compaq.  The actual id
> > string says G Tech China USB Wireless mouse and keyboard.  The keyboard
> > is detected and works fine minus all of the extra multimedia keys, but
> > the mouse doesn't work at all.  The mouse is captured by the uhid driver
> > and not the ums driver.  I'd like to fix this, if possible, and send a
> > patch in.  The first thing I think I should do is look at the raw hid
> > descriptor table and see what's different about it.  Under windows xp,
> > no special drivers were needed so I'm expecting it to not be too
> > difficult from a regular usb mouse.  What tools are available for
> > extracting the raw descriptor tables from the usb device including all
> > of the standard descriptors?  I'd like something that can easily report
> > as much detail as usbview for linux does, plus descriptors specific for
> > hid devices.
> 
> I couldn't find any already made tools for this, so I've been playing
> around with c and libusbhid to examine the keyboard/mouse combo and I
> think I've figured out the problem.  This wireless combo appears as just
> a simple device with one interface (I think) and the report for the
> mouse and keyboard are combined together.  Does freebsd support having
> keyboard and mouse events in the same report?  If not, could I do
> something like catch all the events through uhid0 and inject them back
> into the kernel from a user-space program?  The mouse is probably pretty
> simple due to moused, but I don't know how I'd inject the keyboard
> events.

After some further analysis, I've discovered that I can read events from
/dev/uhid0 even while the keyboard is controlling the console as
/dev/ukbd0, and the only events coming through uhid0 are everything but
the standard keyboard keycodes.  Reading from uhid0 I see events for all
my keyboards extra keys like volume control and sleep, but I also see
all the events coming from my mouse including axes, wheel, and all five
buttons on it.  I wrote a script to parse this and now I have volume
control working, but I need a way to inject the mouse events back in to
the system.  I'd like for the ums driver to read them directly, but I'm
not sure how.  My other option is to modify a new version of moused and
use that to inject them.  I don't need to worry about vkbd since my
keyboard seems to work at the same time other events are coming in on
uhid0.

> 
> > -- 
> > I sense much NT in you.
> > NT leads to Bluescreen.
> > Bluescreen leads to downtime.
> > Downtime leads to suffering.
> > NT is the path to the darkside.
> > Powerful Unix is.
> > 
> > Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
> > Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2
> >  
> 
> 
> 
> -- 
> I sense much NT in you.
> NT leads to Bluescreen.
> Bluescreen leads to downtime.
> Downtime leads to suffering.
> NT is the path to the darkside.
> Powerful Unix is.
> 
> Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
> Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2
>  



-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20050314/04fdefb0/attachment.bin


More information about the freebsd-usb mailing list