Wiki2
UsbHidOpenBSD

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 …

References