Connect to a USB HID device

USB HID Barcode Reader

I am trying to connect a "unknown" barcode reader (I found in the trash can at work) to OpenBSD. Hopefully I learn something on the way.

When connecting the device the following messages are output via dmesg.

uhidev0 at uhub2 port 1 configuration 1 interface 0 "vendor 0x04f3 product 0x0001" rev 1.10/1.00 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0

Looking for USB HID on wikipedia I gen some hopes that this device actually may work even without a specific driver. USB HID is designed to support generic drivers as long as hardware conforms with the standard.

When looking at the side it states "KB Wedge N3A09379". KB Wedge stands for Keyboard Wedge which means that it emulates a USB keyboard in this case. Looking at man wskbd further confirms that.

So how do I get input from this wskbd device?

Maybe libhid could be used?

To be continued ...

USB temperature sensor (TEMPerV1.4)

Check out RDing TEMPer Gold USB thermometer on OpenBSD

Insert device

dmesg
...
uhidev3 at uhub0 port 2 configuration 1 interface 0 "RDing TEMPerV1.4" rev 2.00/0.01 addr 6
uhidev3: iclass 3/1, 1 report id
ukbd1 at uhidev3 reportid 1: 8 variable keys, 5 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev4 at uhub0 port 2 configuration 1 interface 1 "RDing TEMPerV1.4" rev 2.00/0.01 addr 6
uhidev4: iclass 3/1
ugold0 at uhidev4
ugold0: 1 sensor type ds75/12bit (temperature)

Check value via sysctl

sysctl hw.sensors.ugold0

Failed to do anything other useful with the device ...

usbdevs
...
port 2 addr 6: low speed, power 100 mA, config 1, TEMPerV1.4(0x7401), RDing(0x0c45), rev 0.01
...

usbhidctl -f /dev/wskbd1
usbhidctl: USB_GET_REPORT (probably not supported by device): Bad address
dd if=/dev/urandom  bs=10 count=1
dd if=/dev/wskbd1  bs=1 count=1

References