http://allroot.blogspot.com/search/label/openbsd This is the first article from Hacking USB device drivers series. In this part briefly review of one very simple hack: adding missed vendor and product IDs for USB drivers. * Adding vendor and product IDs for USB drivers o Introduction o Changing USB IDs database o Result * Adding support for new devices to USB drivers (read) Adding vendor and product IDs for USB drivers Introduction I have USB Bluetooth adapter and after plugging this device i got the following new strings in dmesg: ubt0 at uhub2 port 2 configuration 1 interface 0 ubt0: vendor 0x1131 ISSCBTA, rev 1.10/3.73, addr 2 Thats mean: driver ubt(4) support this device, but vendor and product IDs not present in /usr/src/sys/dev/usb/usbdevs file. Lets fix it! Changing USB IDs database Add the following lines to /usr/src/sys/dev/usb/usbdevs file: vendor ISSC 0x1131 Integrated System Solution Corp. ... /* ISSC products */ product ISSC ISSCBTA 0x1001 KY-BT100 Vendor ID must be placed to beginning of file, after vendor with lesser ID. Product IDs must be written in alphabetical order of vendor string. This patch illustrate this rule. And, finally, run make in /usr/src/sys/dev/usb directory for updating usbdevs.h and usbdevs_data.h files. Result Now you can build new kernel. Reboot, attach the device and run dmesg. Here is what you finally got: ubt0 at uhub2 port 2 configuration 1 interface 0 ubt0: Integrated System Solution Corp. KY-BT100, rev 1.10/3.73, addr 2 This is the second article from Hacking USB device drivers series. In this part will be covered device supporting mechanism by USB device drivers. * Adding vendor and product IDs for USB drivers (read) * Adding support for new devices to USB drivers o Introduction o Modify dev_devs[] structure Adding support for new devices to USB drivers Introduction All USB devices have vendor ID, product ID and device class. USB device can be attached to driver allocated with supported IDs and/or classes. Typically in USB driver you can see dev_devs[] structure, where dev is a device name. In this structure listed supported products. USB device drivers can be founded in /usr/src/sys/dev/usb/ directory. Modify dev_devs[] structure For example, in uplcom(4) driver uplcom_devs[] structure contain strings like following line: { USB_VENDOR_SIEMENS3, USB_PRODUCT_SIEMENS3_X75 }, These lines can be founded in usbdevs_data.h file: { USB_VENDOR_SIEMENS3, USB_PRODUCT_SIEMENS3_X75, "X75", }, For adding support of new product to USB device driver all you need is modify dev_devs[] structure.