For the last couple of weeks I've been writing a script
to interpret the output of 'usbsniff' and a modified
version of 'parseusbsnoop.awk'.

This PERL script assumes a GL841 based scanner and is currently
to the point where is can convert a USB log into a sequence
of reads and writes to the various registers and bit fields
of a G841.  In the case of a register containing multiple
bit fields it also highlights the bit field which has been
modified.

I'm pushing ahead to get the script to recognise higher
level functions, which may or may not be specific to the
LiDE 60.

In case anyone is interested, I've put the script on my
website:
https://john.daltons.info/lide60/
Hopefully it will be useful to anyone working with GL841
based scanners.

Here is an example of the output for portion of an LiDE60's cyle
where it starts the scan and reads the image data from the
scanner:

---------- BEGIN CUT HERE----------------------------------------------
24253      :  216128ms   Start motor movement.
24254-24597:  216129ms  Wait for image buffer to contain data. ([0x41] bit 6)==1
24598-24603:  216474ms  [gl841:validword]     ->     564    Read number of 
bytes available to read from the image buffer (564) from the GL841.
24604-24609:  216480ms  [gl841:validword]     ->    1204    Read number of 
bytes available to read from the image buffer (1204) from the GL841.
24610-24615:  216486ms  [gl841:validword]     ->    1740    Read number of 
bytes available to read from the image buffer (1740) from the GL841.
24616-24621:  216492ms  [gl841:validword]     ->    2252    Read number of 
bytes available to read from the image buffer (2252) from the GL841.
24622      :  216498ms  Point to the read  port of the GL841 image buffer DRAM 
(address 0x45) in preparation for a bulk read.
24623-24725:  216499ms  Multiple reads from image buffer  (1678578 bytes)
24726      :  225445ms   0xa0 -> [gl841:scanner_setup]    Write scanner setup.
                                                                          *scan 
process                  : disable
                                                                           
shading area                  : whole line
                                                                           DRAM 
size                     : 4Mx1
                                                                           DRAM 
size                     : 4M or 8M
                                                                           
shading                       : enable
                                                                           
watchdog timer (register 0x1e): disable
                                                                           
scanner type                  : CIS
24727-24730:  225446ms   0b 11 0000 0010  -> [gpio18..9]   set GPIO18-9 to 
known state (includes pins which control motor?)
24731-24732:  225450ms  [gl841:motor_status] ->  0x03     Read motor status.
                                                                                
                 *scanner mode: command
                                                                                
                 *motor is    : moving
                                                                                
                  motor speed : normal
24733-24734:  225452ms  [gl841:scanner_status] ->  0xf5     Read scanner status.
                                                                                
                  motor is           : processing
                                                                                
                  front end is       : not busy (ready to read/write)
                                                                                
                  lamp is            : on
                                                                                
                  scanner is position: not home
                                                                                
                 *scanning is        : finished
                                                                                
                  motor feeding      : finished
                                                                                
                 *image buffer is    : empty
                                                                                
                  power              : on
---------- END CUT HERE----------------------------------------------


Reply via email to