Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 164107

Summary: hplip-1.6.12 breaks scanning with hp psc-1315
Product: Gentoo Linux Reporter: jim stead <jstead1>
Component: [OLD] PrintingAssignee: Printing Team <printing>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description jim stead 2007-01-27 21:42:05 UTC
There is a problem with hplip 1.6.12 and 1.7
With a PSC 1315, scanning does not work.

It does not work because the PSC 1315 identifies itself as 
ATTRS{product}=="psc 1310 series " with a space before the end of the quote. 
The space is incorporated as an underscore in the device uri for cups and for 
sane backend hpaio.  (My cups uri is as setup by hp-setup is: 
hp:/usb/psc_1310_series_?serial=CN48IB72SYO2 (note the underscore after 
series.

When hpaio looks at /usr/share/hplip/data/models/models.dat, it only finds 
[psc_1310_series] (no trailing underscore).  As a result, it has no usable 
scanners.  Adding an underscore to the model.dat file [psc_1310_series_] 
enables scanning, but breaks recognition by hp-setup (and probably everything 
else that works correctly).  Under hplip-1.6.10, everything worked correctly.

hpaio is using the model number to look in models.dat, when it should be using 
the model number without the trailing underscore.

I have also sent e-mail to hplip-help@lists.sourceforge.net

Proof is as follows:

After installation with hp-setup and exporting SANE_DEBUG_HPAIO=8 
SANE_DEBUG_DLL=12

sane-find-scanner
found USB scanner (vendor=0x03f0 [hp], product=0x3f11 [psc 1310 series ]) at 
libusb:004:002

scanimage -L
[sanei_debug] Setting debug level of dll to 128.
[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.18
[dll] sane_init: reading dll.conf
[dll] add_backend: adding backend `hpaio'
[dll] sane_get_devices
[dll] load: searching backend `hpaio' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-hpaio.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-hpaio.so.1'
[dll] init: initializing backend `hpaio'
[sanei_debug] Setting debug level of hpaio to 8.
[hpaio] sane_hpaio_init(): scan/sane/hpaio.c 1808
[dll] init: backend `hpaio' is version 1.0.6
[hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 1834
[hpaio] no psc_1310_series_ attributes found in models.dat: api/model.c 402
[dll] sane_get_devices: found 0 devices

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).
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `hpaio's exit function
[hpaio] sane_hpaio_exit(): scan/sane/hpaio.c 1827
[dll] sane_exit: finished

Since it seems that hpaio finds "no psc_1310_series_ attributes found in 
models.dat" (note the underscore after series) in its second to last message 
before exiting I looked at /usr/share/hplip/data/models/models.dat and found

[psc_1310_series]

I changed it to 

[psc_1310_series_]
note the extra underscore at the end.
Now I run scanimage -L and everything works.

scanimage -L
[sanei_debug] Setting debug level of dll to 128.
[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.18
[dll] sane_init: reading dll.conf
[dll] add_backend: adding backend `hpaio'
[dll] sane_get_devices
[dll] load: searching backend `hpaio' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-hpaio.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-hpaio.so.1'
[dll] init: initializing backend `hpaio'
[sanei_debug] Setting debug level of hpaio to 8.
[hpaio] sane_hpaio_init(): scan/sane/hpaio.c 1808
[dll] init: backend `hpaio' is version 1.0.6
[hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 1834
[dll] sane_get_devices: found 1 devices
device `hpaio:/usb/psc_1310_series_?serial=CN48IB72SYO2' is a Hewlett-Packard 
psc_1310_series_ all-in-one
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `hpaio's exit function
[hpaio] sane_hpaio_exit(): scan/sane/hpaio.c 1827
[dll] sane_exit: finished

But if I run hp-setup it can't find the device until I delete the underscore 
that I added.  Which breaks scanning again.

I think the trailing underscore is coming from the PSC itself.  When I run
# udevinfo -a -p `udevinfo -q path -n /dev/bus/usb/004/004`
 looking at parent device '/devices/pci0000:00/0000:00:0b.1/usb4/4-1':
    KERNELS=="4-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{serial}=="CN48IB72SYO2"
    ATTRS{product}=="psc 1310 series "

And viola, that is where the trailing underscore comes from, note the space 
before the closing double quote in ATTRS{product}, it is hard to see in some 
fonts.

Reproducible: Always

Steps to Reproduce:
1.Have a PSC 1315
2.install hplip-1.6.12
3.try to scan, it don't work

Actual Results:  
Couldn't scan, scanimage -L doesn't find a scanner.

Expected Results:  
It should find the scanner. hpaio should look for "psc_1310_series" in models.dat, not "psc_1310_series_"

None
Comment 1 jim stead 2007-02-03 15:09:34 UTC
I received a response back from the hplip developers that a bug crept back into versions 1.6.12 and 1.7.1.  The bug affects how hpaio deals with scanner models that report themselves with a trailing space for their model.  The bug will be corrected in the next version.  1.6.10 works for me.  Or if you need to use the later version, you can add a trailing underscore in models.dat (be advised, this breaks all the other hp tools, but it does allow scanning).
Comment 2 Marcelo Goes (RETIRED) gentoo-dev 2007-02-24 16:12:25 UTC

*** This bug has been marked as a duplicate of bug 161926 ***