[CentOS] Problems getting scanner to work from xsane (from Gnome Menu or GIMP)

Thu Oct 1 22:41:50 UTC 2009
Robert Heller <heller at deepsoft.com>

At Thu, 01 Oct 2009 17:58:32 -0400 CentOS mailing list <centos at centos.org> wrote:

> 
> Robert Heller wrote:
> > We have a networked HP OfficeJet All-In-One.  I have the scanner working
> > with the CentOS 5.3, except xsane is ignoring SANE_DEFAULT_DEVICE. 
> > scanimage does however take this environment variable just fine:
> >
> > server1.wendellfreelibrary.org% scanimage -L
> >
> > No scanners were identified. If you were expecting something different,
> > check that the scanner is plugged in, turned on and detected by the
> > sane-find-scanner tool (if appropriate). Please read the documentation
> > which came with this software (README, FAQ, manpages).
> > default device is `hpaio:/net/Officejet_Pro_L7700?ip=192.168.1.253'
> > server1.wendellfreelibrary.org% scanimage -T
> > scanimage: scanning image of size 638x1125 pixels at 24 bits/pixel
> > scanimage: acquiring RGB frame, 8 bits/sample
> > scanimage: reading one scanline, 1914 bytes...  PASS
> > scanimage: reading one byte...          PASS
> > scanimage: stepped read, 2 bytes...     PASS
> > scanimage: stepped read, 4 bytes...     PASS
> > scanimage: stepped read, 8 bytes...     PASS
> > scanimage: stepped read, 16 bytes...    PASS
> > scanimage: stepped read, 32 bytes...    PASS
> > scanimage: stepped read, 64 bytes...    PASS
> > scanimage: stepped read, 128 bytes...   PASS
> > scanimage: stepped read, 256 bytes...   PASS
> > scanimage: stepped read, 512 bytes...   PASS
> > scanimage: stepped read, 1024 bytes...  PASS
> > scanimage: stepped read, 2048 bytes...  PASS
> > scanimage: stepped read, 2047 bytes...  PASS
> > scanimage: stepped read, 1023 bytes...  PASS
> > scanimage: stepped read, 511 bytes...   PASS
> > scanimage: stepped read, 255 bytes...   PASS
> > scanimage: stepped read, 127 bytes...   PASS
> > scanimage: stepped read, 63 bytes...    PASS
> > scanimage: stepped read, 31 bytes...    PASS
> > scanimage: stepped read, 15 bytes...    PASS
> > scanimage: stepped read, 7 bytes...     PASS
> > scanimage: stepped read, 3 bytes...     PASS
> > server1.wendellfreelibrary.org% echo "$SANE_DEFAULT_DEVICE"
> > hpaio:/net/Officejet_Pro_L7700?ip=192.168.1.253
> >
> > xsane just pops up a little window "scanning for devices", the "no
> > devices available".
> >
> > I believe I have things properly setup with cups:
> >
> > In /etc/cups/printers.conf:
> >
> > <Printer Officejet_Color>
> > Info 
> > Location Printer Area
> > #DeviceURI socket://192.168.1.253:9100
> > DeviceURI hp:/net/Officejet_Pro_L7700?ip=192.168.1.253
> > State Idle
> > StateTime 1211313246
> > Accepting Yes
> > Shared Yes
> > JobSheets none none
> > QuotaPeriod 0
> > PageLimit 0
> > KLimit 0
> > OpPolicy default
> > ErrorPolicy retry-job
> > </Printer>
> >
> >
> >   
> I am very interested in this problem as I seem to have it myself.  My 
> Printer/Scanner is HPc6180.
> Do you have HPLIP installed? 
> The version that comes with CentOS is so old that (1.67, I think) that 
> if you have a printer newer than
> about four years old it won't be supported.  I seem to be able to fake 
> the printing part by selecting another
> printer that should be similar.  The scanning part however is not so 
> simple it seems.  I installed HPLIP
> version 3.9.8 and after a grueling effort to satisfy the dependencies, 
> except for dbus-python or python-dbus,
> it seems to be referred to both ways.  HPLIP still claims that it is not 
> installed even though it is.  Perhaps my version,
> although up to date according to yum, is too old.  In any case my 
> printer is supported and I was able to scan
> one frame and then it never worked again.  On any attempt to scan xsane 
> puts up a dialog that says "Failed to open device 'v4l:/dev/video': 
> Invalid argument" and then quits.  That device I think is the camera 
> which was there and working fine when the single scan succeeded.  My 
> Windows XP computer is able to scan so I am confident that the printer 
> hardware is
> not at fault.

The beast works just fine as both a printer and a scanner (I have not
tried to send or receive a fax).  xsane, if given the hpaio:<mumble>
url on the command line, works just fine and scanimage is perfectly
happy to use the URL defined in the SANE_DEFAULT_DEVICE environment
variable.  The problem is that the people who will be using it are
non-techies and want to be able to just click on the Gnome menu (or use
Gimp's File=>Acquire=>scan menu item).  This is where it does not work.
Somehow, sane/xscan is not finding the device by scanning for it,
which seems to be what is needed, since xscan seems to be ignoring
SANE_DEFAULT_DEVICE, if the device is not found first by scanning for it.

> 
> Every time I install a newer version of CentOS (now Linux rwells-cts 
> 2.6.18-128.7.1.el5.centos.plus #1 SMP Mon Aug 24 10:03:38 EDT 2009 
> x86_64 x86_64 x86_64 GNU/Linux) on a Lenovo X200 Thinkpad this scanner 
> setup is a real
> PITA.
> Any way I am looking forward to anything you learn as we go forward.
> 
> cheers,
> roger wells
> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/