Re: Microtek, Net, NetBSD

From: abel deuring (adeuring@gmx.net)
Date: Mon May 28 2001 - 15:47:40 PDT

  • Next message: Aristide Aragon: "Re: Microtek, Net, NetBSD"

    Aristide Aragon wrote:
    >
    > Hello
    > I have a Microtek ScanMaker II scanner that I've been using successfuly under SuSE Linux 6.3 with the shipped sane.
    > I wanted to make a 'scanning server' with an old Sun SPARCStation IPC that I have and that is running NetBSD 1.3, so I downloded the latest sane-backends, compiled and installed (actually the ports collection did that for me).
    > When I type "scanimage" the scanner (which is a 3 pass scanner) gives one pass and returns, and when it reaches the initial position, I get an error "scanimage: sane_start: Invalid argument"
    > I also set up saned in that machine to be able to scan through the network. When I set up my SuSE's sane to search that host for scanners, everytme I ran sane (for instance sane --list-devices) produced a segmentation fault (after the Sun machine reported a connection from the other host). I decided to upgrade to the latest sane veion, so I uninstalled the RPM sane that came with my SuSE, downloaded, compiled and installed the latest sane-backends (which should be the same version the Sun machine has, since I installed it there only yesterday) and configured net.conf again. Now everytime I type scanimage I get no devices found. (or no scanners were identified...)
    > Um... Help?
    > The Sun does't have a mouse, so I can't try any UI other than scanimage, but I don't think it's scanimage's fault anyway.

    As I remember (long time ago that I used a Scanmaker II, so I can of
    course be wrong with this guess), the scanner is quite slow, especially
    with color scans. Perhaps you are getting a timeout for the first
    command needed for thew second pass. The parts of sanei_scsi.for BSD
    seems to use a timeout value for SCSI command of 1 minute, while Linux
    uses 10 minutes. Line 2294 of sanei_scsi.c (Sane 1.0.4, for USE ==
    BSD_INTERFAC) reads:

      hdr.timeout = 60000; /* 1 minute timeout */

    and line 2386 (for USE == FREEBSD_CAM_INTERFACE):

       cam_fill_csio(&ccb->csio,
                     /* retries */ 1,
                     /* cbfncp */ NULL,
                     /* flags */ ccb_flags,
                     /* tag_action */ MSG_SIMPLE_Q_TAG,
                     /* data_ptr */ (u_int8_t *)data_buf,
                     /* dxfer_len */ data_len,
                     /* sense_len */ SSD_FULL_SIZE,
                     /* cdb_len */ cmd_size,
                     /* timeout */ 60 * 1000);

    So, if the Scanmaker II needs more than one minute for a command
    (perhaps the one to change the light filter), you will get an error
    under BSD (and also with many other operating systems supported by Sane
    that use too a timeout of 1 minute).

    Abel

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Mon May 28 2001 - 15:29:15 PDT