Date: Thu, 16 May 2002 18:21:14 -0400 From: Carlos Ugarte <cau@cs.arizona.edu> To: Marco Molteni <molter@tin.it> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: writing a driver for the IBM ultraport camera (USB) Message-ID: <15588.12506.65605.999864@pc-ugarte.research.att.com> In-Reply-To: <20020516091509.1671.qmail@cobweb.example.org> References: <20020516091509.1671.qmail@cobweb.example.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> I would like to write a driver for FreeBSD, using the Linux driver as a > reference. Since I am new to USB programming, could you give me some hints > on where to start? Is there an existing FreeBSD USB driver that I can use > as a skeleton? I'm working on a similar project - a FreeBSD driver for the Philips webcams based on the Linux pwc driver. It's nowhere near working yet, but I've learned a few things that may help you along the way. The USB spec is available online through [0]. It's a large document, but most of it is not necessary reading for those of us working on devices. There are also books that you might use; I used "USB System Architecture" primarily because it was easier to refer to a book than to a PDF file. The FreeBSD Developers' Handbook ([1]) has a few sections of interest. There is information on writing generic device drivers, as well as bus specific information. While the chapter on USB is not as complete as the others, it is helpful, mostly giving a high level perspective. As for specific drivers, initially I used ufm and ulpt as these had some of the smallest files around. Now I am referring more and more to ugen, as it is the only driver included with FreeBSD which makes use of isochronous pipes. Once you learn more about USB, you will find that there are different "pipes" which are used to transmit information to and from the device; isochronous pipes are typically used for time-dependent data (such as audio and video streams). The uaudio driver also uses these pipes; it's in the NetBSD tree and someone is porting it to FreeBSD ([2]). If you're interested in sniffing the USB traffic you might try out USB Snoopy ([3]). It's a Windows program, though. Further down the line there is the issue of what kind of interface should be provided to user space. I gather that until now there hasn't been much of a need for something like this, but if/when we actually succeed in making these devices work, it would be better if there were a standard that applications could use. The Linux folks have "Video4Linux" which was originally designed with TV cards in mind, I think (there is work on a second generation V4L system). I'm not really a video person (this project is just for kicks) so I haven't given this too much thought, but it's worth keeping in mind. Hope this helps. Carlos [0] <http://www.usb.org> [1] <http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/> [2] <http://www.mars.sphere.ne.jp/navi/uaudio/> [3] <http://home.jps.net/~koma> -- Carlos A. Ugarte cau@cs.arizona.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15588.12506.65605.999864>