[sane-devel] Mac OS X 10.3.3- Sane Backend 1.0.14 - Microtek ScanMaker II - New Information

2004-05-08 Thread abel deuring
since noboby with more knowlegde about MacOS has yet answered, here are 
my 2 cents:

David B Brown wrote:
 Hi,
 
 every time a new version of the Sane Backend's becomes available I 
 always have another go to see if anything has changed to make my 
 configuration work. I also find that when I come back to this afresh I 
 always get a little further forward.
 
 When you run scanimage, the Microtek scanner incorretly reports itself 8 
 times, each under a different LUN, this has been consistent since the 
 new Max OSX SCSI code was implemented to support Mac OS X 10.3.
 
 [MacCoylton:~] dave% scanimage -L
 device `microtek:iokitscsi@0163331e2a70b923' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@0163381e28c472d6' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@01633a1e18c239cd' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@0162c41e05d02fe7' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@01633d1e0530106a' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@0162cc1e04869288' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@0162cf1e03c78ee9' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 device `microtek:iokitscsi@0161e11e02a59e9b' is a Microtek 
 ScanMaker II/IIXE flatbed scanner
 [MacCoylton:~] dave%
 
 If you check using ioreg, each of these is on the same SCSI ID, but a 
 different LUN, the last one reported is actually on LUN 0.
 
 If I run scanimage without specifically specifying a device, then I 
 always get and error about the scsi buffer being smaller than one scan 
 line. The error is a bit of a red herring, and the real issue is that 
 the code is trying to communicate with the scanner using the wrong LUN, 
 in this case on LUN 7 in the above example which is the first one listed.
 
 ISSUE: My coding is rusty and my knowledge of the SCSI API used for Mac 
 OS X is worse, but I believe that the Mac OS X scsi code doesn't support 
 specifying a LUN and SCSI ID in the microtek.conf file. From my testing 
 if the code has to search for the scanners it only uses the vendor and 
 device name, and ends up attached to the wrong LUN

Right, from a quick look into the MacOS X part of sani_scsi.c, it seems 
that from the two functions possibly called by sanei_scsi_find_devices, 
only sanei_scsi_find_devices_old_api recognizes the LUN, while 
sanei_scsi_find_devices_stuc_api ignores any LUN specification. While it 
is essentially a bug of the scanner to respond to INQUIRY commands on 
all LUNs, applications should be able to deal with it.

 
 If I run scanimage with the -d option set to the last device listed ie 
 the one thats LUN 0, the scan actually starts. I then have two scenarios 
 each with there own problems as follows
 
 
 Scenario 1:- If I run with an unconstrained size, then the first pass 
 happens ok, and then scanimage exists with an error before the scanner 
 physically returns to the start for the second pass. Here's some debug 
 trace:-
 
 [microtek] sane_read: buffsize: 130900, unscanned: 13
 [microtek] pack_into_ring...
 [microtek] pack_into_dest...
 [microtek] pack_into_dest: rl: 32768 sz: 130900 hc: 0
 [microtek] sane_read...
 [microtek] pack_into_dest...
 [microtek] pack_into_dest: rl: 32768 sz: 130900 hc: 32768
 [microtek] sane_read...
 [microtek] pack_into_dest...
 [microtek] pack_into_dest: rl: 32768 sz: 130900 hc: 65536
 [microtek] sane_read...
 [microtek] pack_into_dest...
 [microtek] pack_into_dest: rl: 32596 sz: 130900 hc: 98304
 [microtek] sane_read...
 [microtek] read_from_scanner...
 [microtek] .get_scan_status 0...
 [sanei_scsi] cmd2: cmd_size:6 src_size:0 dst_size:6 isWrite:0
 [sanei_scsi] isRead dst_size:6
 [sanei_scsi] Executing command
 [sanei_scsi] ExecuteTaskSync OK Trasferred 6 bytes
 [microtek] get_scan_status(6): 0, 850, 13 - #0
 [microtek]  0 52 3 d 0 0
 [microtek] read_from_scanner: gss busy, linewidth, remaining: 0, 850, 13
 [microtek] sane_read: max_scsi: 154, rem: 13, nlines: 13
 [microtek] .read_scan_data...
 [sanei_scsi] cmd2: cmd_size:6 src_size:0 dst_size:11050 isWrite:0
 [sanei_scsi] isRead dst_size:11050
 [sanei_scsi] Executing command
 [sanei_scsi] ExecuteTaskSync OK Trasferred 11050 bytes
 [microtek] sane_read: buffsize: 11050, unscanned: 0
 [microtek] pack_into_ring...
 [microtek] pack_into_dest...
 [microtek] pack_into_dest: rl: 11050 sz: 130900 hc: 0
 [microtek] sane_read...
 [microtek] end_scan...
 [microtek] .stop_scan...
 [sanei_scsi] cmd2: cmd_size:6 src_size:0 dst_size:0 isWrite:1
 [sanei_scsi] isWrite src_size:0
 [sanei_scsi] Executing command
 [sanei_scsi] ExecuteTaskSync OK Trasferred 0 bytes
 [microtek] sane_start...
 [microtek] sane_get_parameters...
 [microtek] sane_get_parameters: regular 3-pass color
 [microtek] sane_get_parameters: res_code = 33 (21)
 [microtek] sane_get_parameters: dots_per_mm: 

[sane-devel] Epson 1640SU + ADF

2004-05-08 Thread Alex
Hi !

It seems i got problems with my precedent message. Sorry if I sent two...

 scanimage -h
 ...
  Optional equipment:
 --source Flatbed|Transparency Unit [Flatbed]
 Selects the scan source (such as a document-feeder).
 ...

Well, I don't know really why but now I have the ADF option and the feeder
initialize when I turn on the scanner...

scanimage -h

returns

 Optional equipment:
--source Flatbed|Automatic Document Feeder [Flatbed]
Selects the scan source (such as a document-feeder).


 I use an Epson 1640SU too and it works here, but not out of the box.
 I use kernel 2.6.6-rc3.  In  sane-backends-1.0.14/backend/epson.c
 make the feed() function to immediately return SANE_STATUS_GOOD;

Thank you Klaus... But I have a little question. I am using Debian and I
don't have any epson.c file...

dpkg -l | grep sane
ii  libsane1.0.13-4   API library for scanners
ii  sane   1.0.11-3   Scanner graphical frontends
ii  sane-utils 1.0.13-4   API library for scanners -- utilities
ii  xsane  0.92-2 A gtk-based X11 frontend for SANE


Do I have to install manually the sane-backends-1.0.14 ? The debian
package for sane-backends is libsane, isn't it? If I install a new one
manually, won't it be in conflict?


 Then use scanimage -d epson:libusb:00x:00x  --source Automatic Document
 Feeder .. and it should work.

I tested with my actual configuration and got

scanimage: sane_start: Error during device I/O


Thank you!
Alex






[sane-devel] Epson 1640SU + ADF

2004-05-08 Thread Alex
Hi again,

 Thank you Klaus... But I have a little question. I am using Debian and I
 don't have any epson.c file...

Well, I guess this is in the debian-source package... Sorry.

So Klaus, I just have 2 questions:

Is the 1.0.14 version absolutely needed or may it work with the
1.0.13?
Same question with 2.6.6-rc3 kernel?

Thank you!
Alex