[sane-devel] Genesys GL846/847 trying to add new scanner
Radoslav Kolev
radoslav at kolev.info
Fri Nov 2 20:13:28 UTC 2012
Hi,
we are trying to get a GL846 based scanner to work - Canon Image
Formula Flatbed Scanner Unit 101.
I'm new to sane and scanners, so please excuse me if I'm asking some
simple/stupid questions.
Any pointers to documentation of any sort will be appreciated.
So, I've captured a scan under windows. The raw log can be found here:
http://kolev.info/files/Image-formula-101-win-scan-raw-usbsnoop.log.gz
I have run the following utility
(web.media.mit.edu/~mhirsch/lide100/usbsnoop-gl847.pl) to get a more
human readable version, the results are here:
http://kolev.info/files/Image-formula-101-win-scan.log.gz
The above log file with some note's I've written trying to figure out
what's happening:
http://kolev.info/files/Image-formula-101-win-scan-annotated.log.gz
The usbsnoop-gl847.pl spits out a lot of "unknown8e(33) = 0x00,
Unknown in register value 138, Unknown out buffer value 139"
messages. I looked at the raw USB data and then after checking the
section /* USB control message values */ in genesys_low.h it seems
that some of these might be GPIO_READ requests, and I suspect another
part might be connected with talking to the FE.
Where did the defines in the /* USB control message values */ in
genesys_low.h come from? It's easy to find the GL846 datasheet online,
but there's nothing in there about the USB protocol. Was all this
reverse engineered or there's some document/source I've not found yet?
I can see in the source that register access is handled differently
for GL847 vs others, but I have no idea which of these defines are
relevant for which chip.
When loaded with the gl847 backend there is some communication with
the scanner (lamp blinks during calibration) but no motor movement.
>From the usbsnoop logs I see that a motor phase table is loaded into
RAM and then the MPENB bit (Enable motor generating function which is
stored in memory) is set to high in register 0x08, which is not used
in any of the other scanners. Is this something gl846/7 specific and
should I try to replicate this, or there's a better approach without
using a phase table in RAM?
Other things that seem interesting from the snoop log file is that a
lot of GPIO toggling is going on, and also in higher GPIO numbers 25,
26 27.
Also, there are some bulk writes to address 0x10014000 and 4008 which
I can't figure out the reason for.
Before the actual scan begins there is a pattern of setting some
registers and RAM, then reading RAM contents (image data?). My current
guess is this may be hunting for the page start on the scanner bed.
So, that's about as far as we are now. Any ideas, suggestions or
pointers to information will be greatly appreciated.
Best regards,
Radoslav Kolev
More information about the sane-devel
mailing list