Re: where to get info to write basic usb driver for own device?

2004-07-09 Thread Brian Fundakowski Feldman
On Sun, Jul 04, 2004 at 09:49:01PM +, Aho K.F. Li wrote:
 What kind of device do you had build?
 A HID?
 If your device is not with heaven traffic, you can consider to
 develop your driver at user space with ugen(4) or uhid(4) at first.
 And then, move it into kernel space when you need.
 I had wrote a drive for a touch panel device.
 Actually, it is a input device for XFree86.
 I worked it with uhid(4), all my work was finished at user space.
 It would be a good entry point.

I absolutely agree with this -- it's very hard to write good kernel
USB drivers in FreeBSD, and if it can be done with ugen(4)/libusb, you'll
safe yourself a lot of time and pain.

-- 
Brian Fundakowski Feldman   \'[ FreeBSD ]''\
   [EMAIL PROTECTED]   \  The Power to Serve! \
 Opinions expressed are my own.   \,,\
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: where to get info to write basic usb driver for own device?

2004-07-08 Thread Avleen Vig
On Sun, Jul 04, 2004 at 12:53:39PM +, [EMAIL PROTECTED] wrote:
 So what I guess what I am asking is how hard would this be? (I have a 
 reasonable knowledge of C and Java and have been using FreeBSD for a 
 couple of years but have never written a device driver (for any OS))  Do I 
 actually need to write a driver or can I use something already existing?  
 Where would I get information on how to do this?  So far I've been looking 
 at the existing drivers; ugen, ufm etc., the programmers handbook and am 
 starting to look at libusb...?
 Sorry for the long message.  Any pointers etc. would be greatly 
 appreciated.

I am actually in a similar situation.
I know some C, and want to write a device driver for a USB device (web
cam), but I have no idea where to start.
I've searched for a beginners guide to writing device drivers but
failed miserably :-(

-- 
Avleen Vig
Systems Administrator
Personal: www.silverwraith.com
EFnet:irc.mindspring.com (Earthlink user access only)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: where to get info to write basic usb driver for own device?

2004-07-08 Thread Zera Holladay
This may go without saying, but have you read Chapter 22 of the FreeBSD
Developers' Handbook?  I have not read intro(4) extensively but that is
probably a good starting place, if you are completely in the dark.

-Zera Holladay




On Sun, 4 Jul 2004, Avleen Vig wrote:

 On Sun, Jul 04, 2004 at 12:53:39PM +, [EMAIL PROTECTED] wrote:
  So what I guess what I am asking is how hard would this be? (I have a
  reasonable knowledge of C and Java and have been using FreeBSD for a
  couple of years but have never written a device driver (for any OS))  Do I
  actually need to write a driver or can I use something already existing?
  Where would I get information on how to do this?  So far I've been looking
  at the existing drivers; ugen, ufm etc., the programmers handbook and am
  starting to look at libusb...?
  Sorry for the long message.  Any pointers etc. would be greatly
  appreciated.

 I am actually in a similar situation.
 I know some C, and want to write a device driver for a USB device (web
 cam), but I have no idea where to start.
 I've searched for a beginners guide to writing device drivers but
 failed miserably :-(

 --
 Avleen Vig
 Systems Administrator
 Personal: www.silverwraith.com
 EFnet:irc.mindspring.com (Earthlink user access only)
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: where to get info to write basic usb driver for own device?

2004-07-08 Thread Rita Lin
I would read up some code in /dev/usb and see how others did theirs.
I would also read the Dynamic Kernel Linker by Andrew Reiter
http://www.daemonnews.org/200010/blueprints.html, and the white paper by zep
software
http://www.zepsoftware.com/whitepapers/bsd_devtree.php.

That's how I wrote my first USB driver.

Rita

- Original Message -
From: Zera Holladay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 1:11 PM
Subject: Re: where to get info to write basic usb driver for own device?


 This may go without saying, but have you read Chapter 22 of the FreeBSD
 Developers' Handbook?  I have not read intro(4) extensively but that is
 probably a good starting place, if you are completely in the dark.

 -Zera Holladay




 On Sun, 4 Jul 2004, Avleen Vig wrote:

  On Sun, Jul 04, 2004 at 12:53:39PM +, [EMAIL PROTECTED] wrote:
   So what I guess what I am asking is how hard would this be? (I have a
   reasonable knowledge of C and Java and have been using FreeBSD for a
   couple of years but have never written a device driver (for any OS))
Do I
   actually need to write a driver or can I use something already
existing?
   Where would I get information on how to do this?  So far I've been
looking
   at the existing drivers; ugen, ufm etc., the programmers handbook and
am
   starting to look at libusb...?
   Sorry for the long message.  Any pointers etc. would be greatly
   appreciated.
 
  I am actually in a similar situation.
  I know some C, and want to write a device driver for a USB device (web
  cam), but I have no idea where to start.
  I've searched for a beginners guide to writing device drivers but
  failed miserably :-(
 
  --
  Avleen Vig
  Systems Administrator
  Personal: www.silverwraith.com
  EFnet:irc.mindspring.com (Earthlink user access only)
  ___
  [EMAIL PROTECTED] mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to
[EMAIL PROTECTED]
 

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: where to get info to write basic usb driver for own device?

2004-07-08 Thread Mark Dixon
On Sunday 04 Jul 2004 19:20, Avleen Vig wrote:

 I am actually in a similar situation.
 I know some C, and want to write a device driver for a USB device (web
 cam), but I have no idea where to start.
 I've searched for a beginners guide to writing device drivers but
 failed miserably :-(

I briefly looked into this as well, and in summery, webcams are a bit of a 
pain. Unlike Linux folks, there's no Video4BSD (although there was some talk 
of one a while back), and so there's no standard way of doing it. 

The only proven video in API is the one used by meteora (I think) and bktr, 
and thats by all accounts hideous, which leaves you needing to write a lot 
more code than you first thought, and that was enough to put me off. A 
standard thing to do with the video stream having extracted it from the 
webcam which applications like gnomemeeting understand would make the job 
much easier.

-- 
Mark

'If it compiles, ship it'


pgp4htAe57hKA.pgp
Description: signature