primax: Kernel Module for Primax Scanners


Previous by date: 25 Jun 2000 19:13:29 -0000 Kernel Module for Primax Scanners, Simo Sorce
Next by date: 25 Jun 2000 19:13:29 -0000 Re: Kernel Module for Primax Scanners, Arkadiusz Miskiewicz
Previous in thread: 25 Jun 2000 19:13:29 -0000 Kernel Module for Primax Scanners, Simo Sorce
Next in thread: 25 Jun 2000 19:13:29 -0000 Re: Kernel Module for Primax Scanners, Arkadiusz Miskiewicz

Subject: Re: Kernel Module for Primax Scanners
From: Onjo ####@####.####
Date: 25 Jun 2000 19:13:29 -0000
Message-Id: <00062521141400.00461@wh2-229>

Hi

> Are you aware of any other non-scsi-scanners kernel modules projects?
I did one. But only because my scanner uses IRQs which don't work in user space.

> Have you any advice?
Yes: Let it be.

Why? because:

1. You would depend on the Kernel Interface: 
If something on the kernel stucture changes (which happens), you'll have to
change your driver, too.

2. You become system dependend:
What about FreeBSD? Or other OSes...
 
3. The sane guys don't add these to the sane package (because of 2.).

4. realtime problems.
kernel module sounds like realtime. But not with a char device. There is the
need for an extra user space (non-realtime) programm, getting the data from the
device. But the data comes asynchronous to the user space program. so where to
put the data. Perhaps a buffer, but as char device you schouldn't alloc Megs of
buffer memory (and you won't know how much you really need). 

5. the debugging
Ever tried to debug a kernel module...

Perhaps you should spend your energy for something different.
Here an idea:

What about a scanner daemon. It could make itself with nice() to nearly
realtime (if needed) and write the data to a file in /tmp (no buffer size
problem). Then you could write a sane backend communicating with the daemon
via pipes. It could read the data from the file while the daemon is still
writing to it (like tail). Ah- and the daemon could also control the lamp. It
could be turned off after 15 min of not using the scanner. This would be
system independent and you could recycle the existing programm, just change the
output and wrtie a controll interface.

And belive: writing a daemon is at least as exciting as writing a kernel module.

so far with my advice. 

Bye 

Andre





Previous by date: 25 Jun 2000 19:13:29 -0000 Kernel Module for Primax Scanners, Simo Sorce
Next by date: 25 Jun 2000 19:13:29 -0000 Re: Kernel Module for Primax Scanners, Arkadiusz Miskiewicz
Previous in thread: 25 Jun 2000 19:13:29 -0000 Kernel Module for Primax Scanners, Simo Sorce
Next in thread: 25 Jun 2000 19:13:29 -0000 Re: Kernel Module for Primax Scanners, Arkadiusz Miskiewicz


Powered by ezmlm-browse 0.20.