Am Donnerstag, 17. August 2006 15:29 schrieb abel deuring: > Lutz wrote: > > Am Mittwoch, 16. August 2006 18:58 schrieb abel deuring: (...) > The problem is that this error occurs > quite early during the setup of the device structures. Perhaps you > can simply comment out this call of TEST UNIT READY. I did, also changed sense_handler 1. condition of first if to true (dev is only used and refernced in this if) 2. return GOOD if LAMP_Error
now the scanner is seen by scanimage -L - but it does not work - if I continue with Lamp error, I finally end up with a command sequence error. this is the nice part of the output: -------------------------------- [canon] >> mode_sense [sanei_scsi] scsi_req_enter: entered 0x8053738 [sanei_scsi] sanei_scsi.issue: 0x8053738 [sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2 [sanei_scsi] sanei_scsi_req_wait: waiting for 0x8053738 [sanei_scsi] sanei_scsi.issue: 0x8053738 [sanei_scsi] sanei_scsi_req_wait: read 64 bytes [canon] << mode_sense [canon] dev->sane.name = '/dev/sg1' [canon] dev->sane.vendor = 'CANON' [canon] dev->sane.model = 'IX-27025E ' [canon] dev->sane.type = 'film scanner' [canon] bmu=0 [canon] mud=2720 [canon] xres_default=2720 [canon] xres_range.max=2720 [canon] xres_range.min=120 [canon] xres_range.quant=1 [canon] yres_default=2720 [canon] yres_range.max=2720 [canon] yres_range.min=120 [canon] xres_range.quant=1 [canon] x_range.max=1585667 [canon] y_range.max=2378807 [canon] x_adf_range.max=-1 [canon] y_adf_range.max=-1 [canon] << attach [canon] << attach_one ----------------------------------- and her comes the not so nice part ----------------------------------- [canon] sense category: hardware error [canon] sense message: lamp failure [canon] << sense_handler [canon] << scan [canon] >> get_data_status [sanei_scsi] scsi_req_enter: entered 0x401ae008 [sanei_scsi] sanei_scsi.issue: 0x401ae008 [sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2 [sanei_scsi] sanei_scsi_req_wait: waiting for 0x401ae008 [sanei_scsi] sanei_scsi.issue: 0x401ae008 [sanei_scsi] sanei_scsi_req_wait: read 64 bytes [canon] << get_data_status [canon] >> GET DATA STATUS [canon] Scan Data Available=0 [canon] Magnified Width=1938 [canon] Magnified Length=485 [canon] Rest Data=0 bytes [canon] Filled Data Buffer=0 [canon] << GET DATA STATUS [canon] 323 pixels per line, 969 bytes, 485 lines high, total 469965 bytes, dpi=340 [canon] << sane_start [dll] sane_get_parameters(handle=0x80534c8,params=0xbfffdd30) [canon] >> sane_get_parameters [canon] sane_get_parameters: xres='340', yres='340', pixels_per_line='323', bytes_per_line='969', lines='485' [canon] << sane_get_parameters P6 # SANE data follows 323 485 255 [dll] sane_read(handle=0x80534c8,data=0x8060f68,maxlen=32768,lenp=0xbfffdd0c) [canon] >> sane_read [canon] sane_read: nread=32768, bytes_to_read=469965 [canon] >> read_data [sanei_scsi] scsi_req_enter: entered 0x401ae008 [sanei_scsi] sanei_scsi.issue: 0x401ae008 [sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 2 [sanei_scsi] sanei_scsi_req_wait: waiting for 0x401ae008 [sanei_scsi] sanei_scsi.issue: 0x401ae008 [sanei_scsi] sanei_scsi_req_wait: read 64 bytes [sanei_scsi] sanei_scsi_req_wait: SCSI command complained: Success [sanei_scsi] sense buffer: f0 00 45 00 00 00 00 06 00 00 00 00 2c 00 00 00 [sanei_scsi] target status: 02 host status: 0000 driver status: 0008 [canon] >> sense_handler modified lutz [canon] canon_sense_handler(3, 0x401ae060, 0x80737e8) [canon] sense buffer: f0 00 45 00 00 00 00 06 00 00 00 00 2c 00 00 00 [canon] sense data interpretation for SCSI-2 devices [canon] sense category: illegal request [canon] sense message: command sequence error [canon] << sense_handler [sanei_scsi] sanei_scsi_req_wait: SG driver returned resid 65536 [sanei_scsi] NOTE: This value may be bogus [canon] << read_data ----------------------------------- hmmm. Windows asks for the film to be removed and does an initialization of the scanner on first use after reboot - may be, this is what it expects? any ideas which command this would be? (...) > > I'm still on my way to find out where this structure gets initialized. > > As already said: in the function attach. yes, but at the end of it - and after the call to test_unit_ready - at least as I see it - which may be wrong. thx Lutz
