Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2012 00:00:44 +0100
From:      Niclas Zeising <zeising+freebsd@daemonic.se>
To:        hackers@freebsd.org
Subject:   Questions about USB, uhid, ukbd and quirks
Message-ID:  <50B0001C.6050202@daemonic.se>

next in thread | raw e-mail | index | archive | help
Hi!
I have a couple of questions about USB.
I recently bought a new USB keyboard, a Logitech K120.  When attaching 
this to a FreeBSD system, however, it is detected as a hid device 
(attaching to uhid) rather than a keyboard (attaching to ukbd).  The 
keyboard works fine, but I'm just curious as to why it doesn't use ukbd.
The output from usbconfig for this keyboard is:

ugen2.3: <USB Keyboard Logitech> at usbus2, cfg=0 md=HOST spd=LOW 
(1.5Mbps) pwr=ON

   bLength = 0x0012
   bDescriptorType = 0x0001
   bcdUSB = 0x0110
   bDeviceClass = 0x0000
   bDeviceSubClass = 0x0000
   bDeviceProtocol = 0x0000
   bMaxPacketSize0 = 0x0008
   idVendor = 0x046d
   idProduct = 0xc31c
   bcdDevice = 0x6400
   iManufacturer = 0x0001  <Logitech>
   iProduct = 0x0002  <USB Keyboard>
   iSerialNumber = 0x0000  <no string>
   bNumConfigurations = 0x0001

If I add the qurik UQ_HID_IGNORE, it attaches with ukbd and works fine. 
  I don't know if this is appropriate to add to the general quriks though.

I have another keyboard, also Logitech, but older.  This one attaches to 
ukbd, but the manufacture string says LITEON.  Is this string fetched 
from the device, or is it somehow stored in the usb drivers?
The output from usbconfig for this keyboard is:

ugen4.2: <USB Multimedia Keyboard LITEON Technology> at usbus4, cfg=0 
md=HOST spd=LOW (1.5Mbps) pwr=ON

   bLength = 0x0012
   bDescriptorType = 0x0001
   bcdUSB = 0x0110
   bDeviceClass = 0x0000
   bDeviceSubClass = 0x0000
   bDeviceProtocol = 0x0000
   bMaxPacketSize0 = 0x0008
   idVendor = 0x046d
   idProduct = 0xc312
   bcdDevice = 0x0101
   iManufacturer = 0x0001  <LITEON Technology>
   iProduct = 0x0002  <USB Multimedia Keyboard>
   iSerialNumber = 0x0000  <no string>
   bNumConfigurations = 0x0001

These issues probably have natural explanations, but it's making me 
slightly confused, so I hope someone can shed some light on them.
Regards!
-- 
Niclas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50B0001C.6050202>