[sane-devel] LiDE 500F: how to go further?

Pierre Willenbrock pierre at pirsoft.dnsalias.org
Mon May 15 19:45:41 UTC 2006


Hi Ralph,

Ralph Sontag schrieb:
> Hi Pierre,
> 
>>>> I put my scripts here:
>>>> http://pirsoft-dsl-dropzone.de
> 
> I made a new scan:
> 
>   0 ..   ~ 5 MB : USB starts
>   5 ..  ~ 15 MB : ScanGear - the Canon-Program starts
>  15 .. ~ 110 MB : Calibration.
> 110 .. ~ 200 MB : Scan (visiting card, 300, ca. 1.5 MB)
> 200 .. ~ 215 MB : ScanGear ends
> 
> So I have 215 MB raw log file, and after running the scripts 168.8 MB.
> 
> I've put it to http://www-user.tu-chemnitz.de/~sontag/sane/
> (bzip2, 21 MB).
> 
> It's very usefull to pipe the file in "uniq -c" - it enlarges the size,
> but we can jump over the block of identical lines.

Didn't know about uniq. Thanks for the hint.

> At first lot of blocks of
> 0x55, 0x55, 0x55, 0x55,  0x55, 0x55, 0x55, 0x55,
> are read. 

Not exactly. First the driver fills main memory with 0x55, (BULK> means
bulk output), each time preparing the bulk-transfer with a
buf_prepaccess. Then it reads all the memory back in one read(scattered
over multiple usb bulk in packets, BULK<). The same for 0xaa. Just the
driver checking the memory. The write register for main memory is 0x3c,
the read register is 0x45. It does the same for gamma memory. Similar
for some registers.

But the accesses before this are interesting, too. The driver fiddles
with the gpio pins, which may be the key to get the scan head moving.

> The last of this blocks ends at line 65433,
> then the scanner starts writing blocks:
> 
> write_register(0x00)
> set_write_register(0x2b, 0x00)
> set_register(0x3c)
> buf_prepaccess(0x0000f000,BULK_OUT)
> Data: 01 00 82 00 00 f0 00 00
> Index: 0
> BULK>(61440)
>   0xaa, 0xaa, 0xaa, 0xaa,  0xaa, 0xaa, 0xaa, 0xaa,
>  
> ...
> 
> next block around line 73122:
> 
>   0xaa, 0xaa, 0xaa, 0xaa,  0xaa, 0xaa, 0xaa, 0xaa,
> buf_prepaccess(0x0000f000,BULK_OUT)
> Data: 01 00 82 00 00 f0 00 00
> Index: 0
> BULK>(61440)
>   0xaa, 0xaa, 0xaa, 0xaa,  0xaa, 0xaa, 0xaa, 0xaa,
> 
> This repeats 4 times until line 98226:
> 
>   0xaa, 0xaa, 0xaa, 0xaa,  0xaa, 0xaa, 0xaa, 0xaa,
> set_write_register(0x2a, 0x00)
> set_write_register(0x2b, 0x00)
> set_register(0x45)
> buf_prepaccess(0x00040002,BULK_IN)
> Data: 00 00 82 00 02 00 04 00
> Index: 0
> BULK<(65024)
>   0xeb, 0xff, 0xaa, 0xaa,  0xaa, 0xaa, 0xaa, 0xaa,
> 
> - and I think, here the calibration starts with setting registers 
> and write data.
> But I can'nt interprete these registers ...

Datasheets can be downloaded here:
http://www.genesyslogic.com/
Also try the other languages. At least for one gl84x there is a
datasheet available on one of the non-english pages, but not on the
english pages. It is currently not clear to me, which chip is in your
scanner.

Regards,
  Pierre



More information about the sane-devel mailing list