CanoScan LiDE 500F and sane

System for tests

Status

sane-find-scanner shows: found USB scanner (vendor=0x04a9 [Canon], product=0x221f [CanoScan], chip=GL841) at libusb:004:010 - so I hope, it's possible to find a solution.

redouble the section for canon_lide_60_model in backend/genesys_devices.c and change values:

static Genesys_Model canon_lide_500f_model = {
  "canon-lide-500f",            /* Name */
  "Canon",                      /* Device vendor string */
  "LiDE 500F",                  /* Device model name */
  GENESYS_GL841,
  NULL,

  {2400, 1200, 600, 300, 150, 75, 0},   /* possible x-resolutions */
  {4800, 2400, 1200, 600, 300, 150, 75, 0},     /* possible y-resolutions */
...
and add at the end:
  {0x04a9, 0x221f, &canon_lide_500f_model}
Then scanimage -L shows:
device `genesys:libusb:001:010' is a Canon LiDE 500F flatbed scanner

But this is natural not enough. After boot the scanner don't work with linux/sane. After work with Windows 98 and qemu (It works for small images. If the images are bigger, it is to slow and the driver finishes.), the scanner scans also with scanimage, but produces noise. So the initialisation is wrong.

It's necessary to analyse the log-Files ...

There are some very usefull hints: http://john.daltons.info/lide60/.

8. 5. 2006
Got a first patch from Pierre Willenbrock.

15. 5. 2006
We need more calibration information. So I setup a new W98, because calibration is done once at startup, and made a new logfile. I've got a lot of data ... I've used the scripts from Pierre Willenbrock from http://pirsoft-dsl-dropzone.de for the first step of analyzing.

16. 5. 2006
It seem's, the chip is a GL843: The scanner has 2400x4800 dpi, but the data sheet for the GL841 says: "Available sensor types: 600, 1200, 2400 dpi color CIS or CCD." The GL843-3x-data-sheet says: "Available sensor types: 600, 1200, 2400, 3200, 3600, 4800dpi color CIS or CCD." (See http://www.genesyslogic.com/jimages_product/GL843-3X%20Datasheet_102.pdf)

17. 5. 2006
I made a scan with calibration under XP. The logs from W98 and XP are nearly the same - so I think, I have the necessary data.

22. 5. 2006
The debugging output (sane with patch from Pierre Willenbrock) and W98/XP are very different during register settings:
diff = different values
Green color means "identical values" - at least during initialisation or default value
Reg.SaneWINGL 843-3X-Datasheet
   76543210
0x010xa00x02CISSETDOGENBDVDSETSTAGGERCOMPENBTRUEGRAYSHDAREASCAN
0x020x38 - NOTHOMEACDCDISAGOHOMEMTRPWRFASTFEDMTRREVHOMENEGLONGCURV
0x030x5f0x50LAMPDOGAVEENBXPASELLAMPPWRLAMPTIM3LAMPTIM2LAMPTIM1LAMPTIM0
0x040x10 - LINEARTBITSETAFEMOD1AFEMOD0FILTER1FILTER0FESET1FESET0
0x050x40 - DPIHW1DPIHW0MTLLAMP1MTLLAMP0GMMENBENB20MMTLBASE1MTLBASE0
0x060x180x10SCANMOD2SCANMOD1SCANMOD0PWRBITGAIN4OPTEST2OPTEST1OPTEST0
0x070x00 - LAMPSIMCCDCTLDRAMCTLMOVCTLRAMSELFASTDMADMASELDMARDWR
0x080x00 - XDECFLAGBMMFFRGMMFFGGMMFFBGMMZRGMMZGGMMZB
0x090x10 - MCNTSET1MCNTSET0EVEN1STBLINE1STBACKSCANENHANCESHORTTGNWAIT
0x0a0x00 - LCDSELLCMSELADFSELLPWMENEPROMSELR232SELBAUDRAT1BAUDRAT0
0x0b - - CLKSET2CLKSET1CLKSET0RFHDISENBDRAMDRAMSEL2DRAMSEL1DRAMSEL0
0x0c - - SWSH4SWSH3SWSH2SWSH1SWSH0CCDLMT2CCDLMT1CCDLMT0
0x0d - 0x01JAMPCMDDOCCMDCCDCMDFULLSTPSENDCLRMCNTCLRDOCJMCLRLNCNT
0x0e - 0x01SCANRESET
0x0f - - MOVE
0x100x040x06EXPR15EXPR14EXPR13EXPR12EXPR11EXPR10EXPR9EXPR8
0x110x000x13EXPR7EXPR6EXPR5EXPR4EXPR3EXPR2EXPR1EXPR0
0x120x040x55EXPG15EXPG14EXPG13EXPG12EXPG11EXPG10EXPG9EXPG8
0x130x000x02EXPG7EXPG6EXPG5EXPG4EXPG3EXPG2EXPG1EXPG0
0x140x040x34EXPB15EXPB14EXPB13EXPB12EXPB11EXPB10EXPB9EXPB8
0x150x000x04EXPB7EXPB6EXPB5EXPB4EXPB3EXPB2EXPB1EXPB0
0x160x00 - CTRLHITOSHIBATGINVCK1INVCK2INVCTRLINVCKDISCTRLDIS
0x170x02 - TGMODE1TGMODE0TGW5TGW4TGW3TGW2TGW1TGW0
0x180x00 - CNSETDCKSEL1DCKSEL0CKTOGGLECKDELAY1CKDELAY0CKSEL1CKSEL0
0x190x50 - EXPDMY7EXPDMY6EXPDMY5EXPDMY4EXPDMY3EXPDMY2EXPDMY1EXPDMY0
0x1a0x00 - TGLSW2TGLSW1MANUAL3MANUAL1CK4INVCK3INVLINECLPX
0x1b0x00 - GRAYSETCHANSELBGRENBICGENBICGDLY3ICGDLY2ICGDLY1ICGDLY0
0x1c0x00 - CK4MTGLCK3MTGLCK1MTGLCKAREAMTLWDTGTIME2TGTIME1TGTIME0
0x1d0x02 - CK4LOWCK3LOWCK1LOWTGSHLD4TGSHLD3TGSHLD2TGSHLD1TGSHLD0
0x1e0xf0 - WDTIME3WDTIME2WDTIME1WDTIME0LINESEL3LINESEL2LINESEL1LINESEL0
0x1f0x01 - SCANFED7SCANFED6SCANFED5SCANFED4SCANFED3SCANFED2SCANFED1SCANFED0
0x200x20 - BUFSEL7BUFSEL6BUFSEL5BUFSEL4BUFSEL3BUFSEL2BUFSEL1BUFSEL0
0x210x00 - STEPNO7STEPNO6STEPNO5STEPNO4STEPNO3STEPNO2STEPNO1STEPNO0
0x220x00 - FWDSTEP7FWDSTEP6FWDSTEP5FWDSTEP4FWDSTEP3FWDSTEP2FWDSTEP1FWDSTEP0
0x230x00 - BWDSTEP7BWDSTEP6BWDSTEP5BWDSTEP4BWDSTEP3BWDSTEP2BWDSTEP1BWDSTEP0
0x240x00 - FASTNO7FASTNO6FASTNO5FASTNO4FASTNO3FASTNO2FASTNO1FASTNO0
0x250x00 - XXXXLINCNT19LINCNT18LINCNT17LINCNT16
0x260x00 - LINCNT15LINCNT14LINCNT13LINCNT12LINCNT11LINCNT10LINCNT9LINCNT8
0x270x000x00LINCNT7LINCNT6LINCNT5LINCNT4LINCNT3LINCNT2LINCNT1LINCNT0
0x280x00?GMMWRDATA
0x290xff - XXXRAMADDR20RAMADDR19RAMADDR18RAMADDR17RAMADDR16
0x2adiffdiffRAMADDR15RAMADDR14RAMADDR13RAMADDR12RAMADDR11RAMADDR10RAMADDR9RAMADDR8
0x2bdiffdiffRAMADDR7RAMADDR6RAMADDR5RAMADDR4RAMADDR3RAMADDR2RAMADDR1RAMADDR0
0x2c0x00 - XXDPISET13DPISET12DPISET11DPISET10DPISET9DPISET8
0x2d0x00 - DPISET7DPISET6DPISET5DPISET4DPISET3DPISET2DPISET1DPISET0
0x2e0x80 - BWHI7BWHI6BWHI5BWHI4BWHI3BWHI2BWHI1BWHI0
0x2f0x80 - BWLOW7BWLOW6BWLOW5BWLOW4BWLOW3BWLOW2BWLOW1BWLOW0
0x300x000x06STRPIXEL15STRPIXEL14STRPIXEL13STRPIXEL12STRPIXEL11STRPIXEL10STRPIXEL9STRPIXEL8
0x310x000x13STRPIXEL7STRPIXEL6STRPIXEL5STRPIXEL4STRPIXEL3STRPIXEL2STRPIXEL1STRPIXEL0
0x320x000x55ENDPIXEL15ENDPIXEL14ENDPIXEL13ENDPIXEL12ENDPIXEL11ENDPIXEL10ENDPIXEL9ENDPIXEL8
0x330x000x02ENDPIXEL7ENDPIXEL6ENDPIXEL5ENDPIXEL4ENDPIXEL3ENDPIXEL2ENDPIXEL1ENDPIXEL0
0x340x000x34DUMMY7DUMMY6DUMMY5DUMMY4DUMMY3DUMMY2DUMMY1DUMMY0
0x350x000x04MAXWD24MAXWD23MAXWD22MAXWD21MAXWD20MAXWD19MAXWD18MAXWD17
0x360x000xb0MAXWD16MAXWD15MAXWD14MAXWD13MAXWD12MAXWD11MAXWD10MAXWD9
0x370x000xc2MAXWD8MAXWD7MAXWD6MAXWD5MAXWD4MAXWD3MAXWD2MAXWD1
0x380x4f0x5aLPERIOD15LPERIOD14LPERIOD13LPERIOD12LPERIOD11LPERIOD10LPERIOD9LPERIOD8
0x390xc10xf0LPERIOD7LPERIOD6LPERIOD5LPERIOD4LPERIOD3LPERIOD2LPERIOD1LPERIOD0
0x3a - - XXXXXXXFEWRDATA8
0x3bdiffdiffFEWRDATA7FEWRDATA6FEWRDATA5FEWRDATA4FEWRDATA3FEWRDATA2FEWRDATA1FEWRDATA0
0x3c - ?RAMWRDATA
0x3d0x00 - XXXXFEEDL19FEEDL18FEEDL17FEEDL16
0x3e0xff - FEEDL15FEEDL14FEEDL13FEEDL12FEEDL11FEEDL10FEEDL9FEEDL8
0x3f0x86 - FEEDL7FEEDL6FEEDL5FEEDL4FEEDL3FEEDL2FEEDL1FEEDL0
0x40 - readDOCSNRADFSNRCOVERSNRCHKVERDOCJAMHISPDFLGMOTMFLGDATAENB
0x41readreadPWRBITBUFEMPTYFEEDFSHSCANFSHHOMESNRLAMPSTSFEBUSYMOTORENB
0x42 - readVALIDWORD24VALIDWORD23VALIDWORD22VALIDWORD21VALIDWORD20VALIDWORD19VALIDWORD18VALIDWORD17
0x43 - readVALIDWORD16VALIDWORD15VALIDWORD14VALIDWORD13VALIDWORD12VALIDWORD11VALIDWORD10VALIDWORD9
0x44 - readVALIDWORD8VALIDWORD7VALIDWORD6VALIDWORD5VALIDWORD4VALIDWORD3VALIDWORD2VALIDWORD1
0x45 - ?RAMRDDATA
0x46 - - XXXXXXXFERDDATA8
0x47 - - FERDDATA7FERDDATA6FERDDATA5FERDDATA4FERDDATA3FERDDATA2FERDDATA1FERDDATA0
0x48 - - XXXXFEDCNT19FEDCNT18FEDCNT17FEDCNT16
0x49 - - FEDCNT15FEDCNT14FEDCNT13FEDCNT12FEDCNT11FEDCNT10FEDCNT9FEDCNT8
0x4a - - FEDCNT7FEDCNT6FEDCNT5FEDCNT4FEDCNT3FEDCNT2FEDCNT1FEDCNT0
0x4b - - XXXXSCANCNT19SCANCNT18SCANCNT17SCANCNT16
0x4c - - SCANCNT15SCANCNT14SCANCNT13SCANCNT12SCANCNT11SCANCNT10SCANCNT9SCANCNT8
0x4d - - SCANCNT7SCANCNT6SCANCNT5SCANCNT4SCANCNT3SCANCNT2SCANCNT1SCANCNT0
0x4e - - GMMRDDATA
0x4f - - XXXROMBSYLCMBSYTX232BSYRX232BSYRXREADY
0x50 - - XXFERDA5FERDA4FERDA3FERDA2FERDA1FERDA0
0x51 - diffXXFEWRA5FEWRA4FEWRA3FEWRA2FEWRA1FEWRA0
0x520x05 - XXXRHI4RHI3RHI2RHI1RHI0
0x530x07 - XXXRLOW4RLOW3RLOW2RLOW1RLOW0
0x540x00 - XXXGHI4GHI3GHI2GHI1GHI0
0x550x00 - XXXGLOW4GLOW3GLOW2GLOW1GLOW0
0x560x00 - XXXBHI4BHI3BHI2BHI1BHI0
0x570x00 - XXXBLOW4BLOW3BLOW2BLOW1BLOW0
0x580x3a - VSMP4VSMP3VSMP2VSMP1VSMP0VSMPW2VSMPW1VSMPW0
0x590x03 - BSMP4BSMP3BSMP2BSMP1BSMP0BSMPW2BSMPW1BSMPW0
0x5a0x40 - ADCLKINVRLCSELCDSREF1CDSREF0RLC3RLC2RLC1RLC0
0x5b - diffXMTRTBLGMMADDR13GMMADDR12GMMADDR11GMMADDR10GMMADDR9GMMADDR8
0x5c - 0x00GMMADDR7GMMADDR6GMMADDR5GMMADDR4GMMADDR3GMMADDR2GMMADDR1GMMADDR0
0x5d0x00 - HISPD7HISPD6HISPD5HISPD4HISPD3HISPD2HISPD1HISPD0
0x5e0x02 - DECSEL2DECSEL1DECSEL0STOPTIM4STOPTIM3STOPTIM2STOPTIM1STOPTIM0
0x5f0x1f - FMOVDEC7FMOVDEC6FMOVDEC5FMOVDEC4FMOVDEC3FMOVDEC2FMOVDEC1FMOVDEC0
0x600x000x06XXXZ1MOD20Z1MOD19Z1MOD18Z1MOD17Z1MOD16
0x610x000x13Z1MOD15Z1MOD14Z1MOD13Z1MOD12Z1MOD11Z1MOD10Z1MOD9Z1MOD8
0x620x000x55Z1MOD7Z1MOD6Z1MOD5Z1MOD4Z1MOD3Z1MOD2Z1MOD1Z1MOD0
0x630x000x02XXXZ2MOD20Z2M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XXXXXCK3MAP17CK3MAP16
0x780x00 - CK3MAP15CK3MAP14CK3MAP13CK3MAP12CK3MAP11CK3MAP10CK3MAP9CK3MAP8
0x790x00 - CK3MAP7CK3MAP6CK3MP5CK3MAP4CK3MAP3CK3MAP2CK3MAP1CK3MAP0
0x7a0x00 - XXXXXXCK4MAP17CK4MAP16
0x7b0x00 - CK4MAP15CK4MAP14CK4MAP13CK4MAP12CK4MAP11CK4MAP10CK4MAP9CK4MAP8
0x7c0x00 - CK4MAP7CK4MAP6CK4MP5CK4MAP4CK4MAP3CK4MAP2CK4MAP1CK4MAP0
0x7d0x00 - CK1NEGCK3NEGCK4NEGRSNEGCPNEGBSMPNEGVSMPNEGDLYSET
0x7e0x00 - GPOLED25GPOLED24GPOLED23GPOLED22GPOLED21GPOLED10GPOLED9GPOLED8
0x7f0x00 - BSMPDLY1BSMPDLY0VSMPDLY1VSMPDLY0LEDCNT3LEDCNT2LEDCNT1LEDCNT0
0x800x00 - VRHOME1VRHOME0VRMOVE1VRMOVE0VRBACK1VRBACK0VRSCAN1VRSCAN0
0x810x00 - XXXLOADSET4LOADSET3LOADSET2LOADSET1LOADSET0
0x820x00 - CONTB3CONTB2CONTB1CONTB0CONTA3CONTA2CONTA1CONTA0
0x830x00 - IMGSET7IMGSET6IMGSET5IMGSET4IMGSET3IMGSET2IMGSET1IMGSET0
0x840x000x0ePACK1PACK0PACKCNT5PACKCNT4PACKCNT3PACKCNT2PACKCNT1PACKCNT0
0x850x00 - ........
0x860x00 - ........
0x870x00 - XYENBYBITACYCNRLCENOFFSETLEDADDCK4ADCAUTOCONF
0x88 - - XXXRDNUM4RDNUM3RDNUM2RDNUM1RDNUM0

Files

FileDescriptionSizeDate
scanimage-debug.logdebug-output of scanimage, first try to patch ...704 k
scanimage-scan-grey.pngscanimages produces noise9 M
usbsnoop.log.1.gzusbsnoop under W981,8 M
usbsnoop.log.2.gzusbsnoop under W983,4 M
usblog-xp/00index.htmlanalysed files from XP500 k8. 5. 2006
usbsnoopxp.bz2raw file from XP770 k8. 5. 2006
usbsnoop-w98-cal.collect.log.bz2file with calibration, after usbsnoop-stage1.pl, grep -v unknown, usbsnoop-collect.pl21 M15. 5. 2006