Device Driver - before I start

Henrik W Lund henrik.w.lund at broadpark.no
Sat Jul 17 15:15:31 PDT 2004


Richard Kaestner wrote:

>Is there a helping hand to give me some advice where / how to start?
>
>I want:
>- a "pseudo device", which collects every now and then data from an external
>  box via serial line (/dev/cuaa1)
>  Box-Status and some more information shoud be readable,
>  whichever Commands have to be sent to the Box could be done via ioctl
>- using FreeBSD 4.10 ( going to 5.x later)
>- I am currently reading:
>  FreeBSD Handbook and Developers Handbook
>  Daemonnews: Oct 2000: KLD example / Tutorial
>  /usr/src/share/examples/driver/make...
>  ( and McKusik's Design ...)
>- And finally: this is going to be my first Unix-Driver ...
>  (although, I have some experience in low-level programming)
>
>I need Infos on:
>- is there a "better" (or "more preferred") way than written above?
>- is there a "simple example driver" doing similar things
>- actually, can I simply access /dev/cuaa1 from "inside" a driver ?
>  (suppose, I should not ...)
>- or should I simply / better stay with a daemon ?
>
>thanks in advance for hints!
>  
>
Greetings!

As has been pointed out to me just recently:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics.html

is an excellent primer on FreeBSD drivers (maybe a bit dated, but it 
still applies).

-Henrik W Lund


More information about the freebsd-questions mailing list