[sane-devel] driver for LM983x based scanners next shot

Jaeger, Gerhard G. Jaeger" <gjaeger@sysgo.de
Thu, 22 Nov 2001 11:56:53 +0100


Henning, 

am I right, that the Mustek devices use CID instead of CCD sensors?
So this is good news, that they seem to work somehow, as the Plustek
devices are using CCD sensors...

Anyway...

On Mittwoch, 21. November 2001 23:43, Henning Meier-Geinitz wrote:
[SNIP]
> This is really cool stuff. First I tried my Mustek BearPaw scanners
> with Linux 2.4.13. scanimage -L worked (scan bar returned to home).
> scanimage >image.pnm however halted the kernel. The last messages were
> something like:
>
> sanei_lm9831_read: fd=3, reg=2, len=1, increment=0
> sanei_lm9831_read: writing command 01 02 00 01
> Scheduling in interrupt
> Invalid operand: 0000
> [...]
> Process Kapm-idled
> [...]
> Kernel panic
[SNAP]

Hmmm...
Seems to be a kernel problem :-(

>
> Then I tried Linux 2.4.10: I used the following config file:
>
> usb 0x0400-0x1000
> /dev/usb/scanner
> usb 0x0400-0x1001
> /dev/usb/scanner1
>
> The first one is the Mustek BearPaw 1200, the second one the Mustek
> BearPaw 2400.

Cool didn't notice that these settings were good for the Mustek BearPaws... 

>
> The Mustek BearPaw 2400 actually scans. The lamp is turned on and off quite
> a few times before actually scanning. 

This is something I do not really like - it comes from the reset of the LM983x
chip that is performed a few times during the calibration...
I hope to fix this behaviour one day...

> In gray mode preview, the scanner
> scans about half the length it should so the image looks to small in
> x-direction. The return of the scan bar is slower than the scanning
> itsself. However, there actually is an image and it looks ok in
> principle (300 and 600 dpi). X- and Y-start positions seem to be
> wrong. Some artifacts that look like waves...
> Even color mode works, here is the proof (image of colored window):
> http://www.meier-geinitz.de/sane/images/bearpaw-2400-test-1.png (420 kb)

Doesn't look too bad - maybe only a problem of the settings in 
plustek-usbdevs.c ...
I think I have to write a description what the different settings supposed to 
be and how to adopt for other scanners...

>
> Now concerning the Mustek BearPaw 1200:
> The same flickering and motor moving as above but the resulting image
> is mostly black with some garbage data at the beginning. In preview
> mode there are some shapes that may be the test image but with lots of
> stripes and garbage. With color mode it's the same but greenish :-)
>
> I will try to add one at least for the 1200, for which I have the
> source code. Maybe experimenting with the data for the 2400 will also
> result in something better. As 0x0400 0x1000/0x1001 are the factory
> defaults for the lm983x chips, I think the backend must provide a way
> to specify a scanner's name (e.g. bearpaw_1200). Maybe it does and I
> didn't notice it yet :-)

For now you you simply can specify the scanner by the vendor and
product id, it'll be compared in the init function with the ones I get from
the kernel (>=2.4.8) and then checked against the list in plustek-usbdevs.c
where the driver gets the scanner specific register settings and capabilites
from...

We can discuss other posibilities - no problem.
I currently do not like this integration - on the other hand by specifying 
a device by it's product and vendor id it's quite clear what the driver 
should use...

>
> I hope i can send more results during the next days.

No need to hurry - I'm waitin' ....

Gerhard