Date: Tue, 12 Feb 2008 02:58:32 +0300 From: Dmitry Marakasov <amdmi3@amdmi3.ru> To: freebsd-usb@freebsd.org Subject: Need docs on USB driver development Message-ID: <20080211235832.GA1054@hades.panopticon>
next in thread | raw e-mail | index | archive | help
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@jabber.ru amdmi3@amdmi3.ru | http://www.amdmi3.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080211235832.GA1054>