Re: SOLVED: 2 scanners scanning at the same time?

From: Douglas Gilbert (dgilbert@interlog.com)
Date: Sat May 27 2000 - 20:29:03 PDT

  • Next message: Bill Thompson: "Re: Xsane & no devices"

    Michaël van Eeden wrote:
    >
    > Douglas Gilbert wrote:
    > > The Linux sg driver prior to lk 2.2.6 couldn't do two or more
    > > things at once (unless the buffer size was 4096 bytes or less).
    > > Can you upgrade your version of Linux?
    >
    > Thanks for your help!
    >
    > I upgraded to 2.2.14, and the scanners still waited for each other. In the
    > mean time, i started to look at the debug output from sane-dll and sane-umax
    > while doing a 'scanimage'. I seems to look at the capabilities of both
    > scanners before a scan is made. I finally got it to work by setting the
    > environment variable SANE_CONFIG_DIR to two different directories for the
    > two different scanning sessions. One dir has a umax.conf with only:
    >
    > /dev/sg0
    >
    > in it, the other dir has a umax.conf with:
    >
    > /dev/sg1
    >
    > in it. Now it does work! But it seems to me this is a workaround that
    > shouldn't be necessary.

    Ah, thanks for bringing that up. SANE likes to open
    scanner devices for exclusive access (as does cdparanoia
    with cd devices) by using the O_EXCL flag. SANE also likes
    to probe all available SCSI devices when the "conf" file
    doesn't point to a functioning scanner.

    Now when SANE probes all available SCSI devices it should
    use the O_NONBLOCK flag otherwise it may well hang on some
    other app (e.g. another instance of SANE or cdparanoia)
    that holds exclusive access on the device being probed.

    As far as I can see, the O_NONBLOCK flag is not used by any
    source file in the sanei directory. Could someone look into
    this?

    Doug Gilbert

    --
    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 : Sat May 27 2000 - 20:58:49 PDT