[sane-devel] Status update on CanoScan 3200F backend: preview code

Lauri Pirttiaho lauri.pirttiaho at luukku.com
Sat Mar 11 21:30:53 UTC 2006


To all those eagerly waiting the CanoScan 3200F backend,
some good news and some bad. Let's start with the bad
ones: Recently I have had onely few hours per week
to put on this work so progress has been very slow.
This condition may continue this spring so you can
even expect delays to the original schedule. However,
I still expect to be able to provide a reflective
scanning backend with relatively functionality by
the end of May.

The to good news: I have backend that can do reflective
uncalibrated gray-scale scans at 75*2**n (n=0-4) dpi.
The source code is included with this posting.

Now note! The code is highly experimental, likely
to contain errors, crappy by outlook etc. etc.
Also note: because of this: IF YOU DO NOT KNOW WHAT
YOU ARE DOING, DON'T USE IT. At best it may give
some hint of where the development is going, at
worst IT MAY BURN YOUR SCANNER. So, you were warned! 

The fuctionality now is that the option setting is
basically all in. There are some experimental "features"
in the system like setting geometry also moves the
head (that was used for verifying the motion and
geometry) and that will not be part of actual
functionality. Also, many (would like to say, most)
options don't reflect to the actual functionality
yet. E.g. b&w scan and 16-bits or film mode are
not yet there. Also, unstaggering is not yet there
and therefore color images appear as three field images
and 1200 dpi has the image sensor jaggedness there.

What works, is just gray scale scanning and even
there you can expect all kinds of problems (like
the 1200 dpi jagged image). The image is not
calibrated (i.e. no shading calibration). When
scanning, starting the scan may take a long time
because before every scan the driver checks that the
lamp is stable. See the traces described below
for what is going on when nothing seems to be 
happening.

Below some instructions of how to compile this in.
I do not provide this as a patch to SANE release
because of the pre-alpha experimental status.
Still, it can be compiled and run, with varying
success.
------------------------------------------------------
First, take the latest SANE back-ends from CVS, or any
1.0.17 release (I think any should work since cs3200f
does not depend on any recent patches).

I would recommend a directory structure
$SOMEDIR/sane-backends
$SOMEDIR/sandbox
if you have SANE already installed. The sandbox dir will
be used for installing the compiled backend instead of the
actual directories (like /usr/lib/sane etc.)

Then put the cs3200f files into
$SOMEDIR/sane-backends/backend
Put only c and h files. The links will be made automatically
in compilation phase.

In $SOMEDIR/sane-backends do
./configure --prefix=$SOMEDIR/sandbox BACKENDS="test cs3200f"

The test backend is not necessary but will show if your
compilation system works when you build it.

Now, in dir $SOMEDIR/sane-backends/backend you must add
to the Makefile the following lines
(e.g. before the line starting libsane-dc25.la: ...)
libsane-cs3200f.la: ../sanei/sanei_constrain_value.lo
libsane-cs3200f.la: ../sanei/sanei_thread.lo
libsane-cs3200f.la: ../sanei/sanei_usb.lo
libsane-cs3200f.la: ../sanei/sanei_access.lo
libsane-cs3200f.la: ../lib/md5.lo

Now in dir $SOMEDIR/sane-backends
do make and check that it works OK. E.g. in
$SOMEDIR/sane-backends do
make >make.log 2>&1
In make log there may be warnings but compilation
of cs3200f.c should give no warnings or errors. If
it does, drop me a note with log (compressed please :) ).
The make may end in error in makin sane.ps but that
do not worry about, that's just docs.

Then do make install and you should now have the
cs3200f libraries in $SOMEDIR/sandbox/lib/sane.

Now become a root and copy the cs3200f lib files
to /usr/lib/sane or where ever your xsane expects
the libs to be.

Then in /etc/sane.d (or wherever you find the dll.conf
for sane dll lib) add to the dll.conf line
cs3200f
and if you wish, uncomment test backend.

Now run xsane. You should have test backend and
cs3200f:dummy devices available (do not plugin the
scanner, if you plugin the scanner, the real one
instead of dummy you shall get). :)

Now, into directory $SOMEDIR/share/sane/cs3200f put
the firmware file cs3200f_v0054.fw you have
created following the instructions I previously
posted in sane-devel.
http://lists.alioth.debian.org/pipermail/sane-devel/2005-December/015769.html

Now, if you plug in the scanner and restart the xsane
you should actually be able to boot the sanner and
then moving the top left y cordinate will actually
move the scan head, and pressing the calibrate
now, will calibrate the AFE (that takes some time
if lamp is not warmed up). These are just for
testing the driver and thus do not reflect the
actual final functions of these controls.

Warning: if you hear strange noises from the scanner,
unplug the power adapter immediately. Then reset
the scanner with windows driver and check that it
still works OK. This "should" hot happen but
happened to me several times when figuring out the
command set.

If you suspect problems,
have the following env vars exported:
export SANE_DEBUG_CS3200F=255
export SANE_DEBUG_SANEI_USB=255
export SANE_DEBUG_SANEI_ACCESS=255
and start xsane from a command line like
xsane >xsane.log 2>&1

Send me the log, compressed, or try to figure out
where the problem is.

That should do it. If not, drop me a note.
------------------------------------------------------

Known issues: There may be problems with communications
with the scanner if you are running a fast processor
(this was found by Kristian Fiskerstrand, thanks!).
It may happen, e.g., that after uploading the firmware
reading it back fails and thence the boot fails. I will
take a look at those speed issues later.

Now, if you decide to try the code, and find problems
with it, drop me a note. I won't correct everything
immediately, but I will make notes of all known
issues to take care of later, when all the basic
functionality is in.

With best regards,

Lauri Pirttiaho
Oulu
Finland

...................................................................
Luukku Plus paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cs.tar.gz
Type: application/x-gzip
Size: 26378 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060311/4aec919f/cs.tar-0001.bin


More information about the sane-devel mailing list