Need docs on USB driver development

Dmitry Marakasov amdmi3 at amdmi3.ru
Mon Feb 11 16:25:11 PST 2008


Hi!

I want to write driver for "AVerMedia Technologies" "AVerMedia USB
Radio" FM tuner. Though it's HID device, I was not able to make it
work through neither uhid nor ugen drivers (though I'm gonna do
some more digging here). So I've decided to go level lower and write
kernel driver for the device (for fun & new knowledge as well).
I've taken ufm driver as a basis and now I have a driver that
successfully attaches to a device, creates device node and reports
some info, but I'm a but stuch with actually communicating with
device. Neither arch handbook, nor developers handbook, usbd_*
manpage and usb headers have any verbose information.

Thus, I would be grateful for documentation on FreeBSD USB driver
development.

If you're curious, my current work is based on
http://av-usbradio.sourceforge.net/index.php?show=reverse.
Currently I try to send that 16 initialize bytes into the device. I set
up pipe via usbd_open_pipe, then xfer via usbd_alloc_xfer and try to do
usbd_bulk_transfer, but it fails with USBD_IOERROR and sometimes I end
with my system unresponsible to keystrokes (though I can switch between
consoles).

Also advices regarding driver testing environemnt would be useful (fsck
takes too much time). I can think of qemu which AFAIR supports USB
devices and booting from NFS partition.

-- 
Dmitry A. Marakasov    | jabber: amdmi3 at jabber.ru
amdmi3 at amdmi3.ru       | http://www.amdmi3.ru


More information about the freebsd-usb mailing list