Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] SANE client can no longer see my networked scanner
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
m27315
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 253
Location: 2 workstations down

PostPosted: Fri Nov 20, 2015 5:50 pm    Post subject: [SOLVED] SANE client can no longer see my networked scanner Reply with quote

Previously, I was able to scan from my HP Photosmart 7520 over my network using SANE (XSANE), GIMP, and hplip. However, a few months ago, something got upgraded or changed, and now I can no longer scan. Whenever I use Gimp (File > Create > XSane: Device Dialog..), it comes back almost immediate after "scanning for devices", complaining:

Code:
no devices available


I have tried to follow this guide: https://wiki.gentoo.org/wiki/HPLIP.

And, everything seems to be fine.

How can I troubleshoot this? Has anybody else had this problem?

Thanks!


Last edited by m27315 on Tue Nov 24, 2015 6:17 pm; edited 2 times in total
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Sun Nov 22, 2015 3:38 pm    Post subject: Reply with quote

Hi,

are you running saned via xinetd or as standalone service? I had a similiar issue as i was running it via xinetd. As soon as i switched back to standalone service, i was able to use my hp deskjet scanner/printer combination again.

greets, bb
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Sun Nov 22, 2015 5:16 pm    Post subject: Re: SANE can no longer see my networked scanner Reply with quote

m27315 wrote:
Previously, I was able to scan from my HP Photosmart 7520 over my network using SANE (XSANE), GIMP, and hplip. However, a few months ago, something got upgraded or changed, and now I can no longer scan. Whenever I use Gimp (File > Create > XSane: Device Dialog..), it comes back almost immediate after "scanning for devices", complaining:

Code:
no devices available


I have tried to follow this guide: https://wiki.gentoo.org/wiki/HPLIP.

And, everything seems to be fine.

How can I troubleshoot this? Has anybody else had this problem?

Thanks!


I had this problem with a brother mfc, after a sane update - no devices. In that case the backend file got nuked from
Code:
/etc/sane.d/dll.conf

For HP scanners the backend is hpaio so if
Code:
grep hpaio /etc/sane.d/dll.conf
returns nothing, you could try adding it back. That worked for me.
Back to top
View user's profile Send private message
m27315
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 253
Location: 2 workstations down

PostPosted: Mon Nov 23, 2015 11:14 pm    Post subject: Re: SANE can no longer see my networked scanner Reply with quote

bbgermany wrote:
are you running saned via xinetd or as standalone service? I had a similiar issue as i was running it via xinetd. As soon as i switched back to standalone service, i was able to use my hp deskjet scanner/printer combination again.

Actually, I did not have either one running. 8O I started saned, but it did not make any difference. I still get the same error message almost immediately - "no devices found". ... Is saned required for networked scanners?

ian.au wrote:
I had this problem with a brother mfc, after a sane update - no devices. In that case the backend file got nuked from
Code:
/etc/sane.d/dll.conf

For HP scanners the backend is hpaio so if
Code:
grep hpaio /etc/sane.d/dll.conf
returns nothing, you could try adding it back. That worked for me.

It is still listed, so I think that's ok.

Code:
$ grep hp /etc/sane.d/dll.conf
31:hp
32:hp3900
33:hpsj5s
34:hp3500
35:hp4200
36:hp5400
37:hp5590
38:hpljm1005
88:# Add support for the HP-specific backend.  Needs net-print/hplip installed.
89:hpaio

Thanks for the suggestions, both of you. I appreciate the help very much.

Any other suggestions?
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Tue Nov 24, 2015 7:59 am    Post subject: Reply with quote

Hi,

i think i misunderstood you a bit. You should check your /etc/sane.d/net.conf if your device is listed via ip or dns-name there. IIRC this file is used if you want to connect to a network scanner as client ;)

greets bb
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
m27315
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 253
Location: 2 workstations down

PostPosted: Tue Nov 24, 2015 2:11 pm    Post subject: Reply with quote

bbgermany wrote:
i think i misunderstood you a bit. You should check your /etc/sane.d/net.conf if your device is listed via ip or dns-name there. IIRC this file is used if you want to connect to a network scanner as client ;)

Thanks for the tip. I had already found that one via Google, and I added my ip:

Code:
$ cat /etc/sane.d/net.conf
192.168.0.11

Am I missing something? Is there a special format maybe? I haven't been able to find any examples, except of people using either hostnames or IP addresses directly.

Thanks!
Back to top
View user's profile Send private message
m27315
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 253
Location: 2 workstations down

PostPosted: Tue Nov 24, 2015 3:57 pm    Post subject: installed packages Reply with quote

What relevant packages do you two have installed with use flags? I have:

Code:
$ emerge -pvt cups xsane sane-backends hplip avahi

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] net-print/hplip-3.14.10::gentoo  USE="X fax hpcups kde libnotify (policykit) qt4 scanner snmp static-ppds -doc -hpijs -libusb0 -minimal -parport" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ]  media-gfx/xsane-0.999-r1::gentoo  USE="gimp jpeg lcms nls ocr png tiff" 0 KiB
[ebuild   R    ]   media-gfx/sane-backends-1.0.24-r5::gentoo  USE="avahi ipv6 snmp threads usb -doc -gphoto2 -systemd -v4l -xinetd" ABI_X86="32 (64) (-x32)" SANE_BACKENDS="hp net -abaton -agfafocus -apple -artec -artec_eplus48u -as6e -avision -bh -canon -canon630u -canon_dr -canon_pp -cardscan -coolscan -coolscan2 -coolscan3 -dc210 -dc240 -dc25 -dell1600n_net -dmc -epjitsu -epson -epson2 -fujitsu -genesys -gt68xx -hp3500 -hp3900 -hp4200 -hp5400 -hp5590 -hpljm1005 -hpsj5s -hs2p -ibm -kodak -kodakaio -kvs1025 -kvs20xx -kvs40xx -leo -lexmark -ma1509 -magicolor -matsushita -microtek -microtek2 -mustek -mustek_pp -mustek_usb -mustek_usb2 -nec -niash -p5 -pie -pixma -plustek -plustek_pp -pnm -qcam -ricoh -rts8891 -s9036 -sceptre -sharp -sm3600 -sm3840 -snapscan -sp15c -st400 -stv680 -tamarack -teco1 -teco2 -teco3 {-test} -u12 -umax -umax1220u -umax_pp -xerox_mfp" 0 KiB
[ebuild   R    ]    net-dns/avahi-0.6.31-r10::gentoo  USE="dbus gdbm gtk introspection ipv6 nls qt4 -autoipd -bookmarks -doc -gtk3 -howl-compat -mdnsresponder-compat -mono -python (-selinux) {-test} -utils" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ]  net-print/cups-2.0.3::gentoo  USE="X acl dbus pam ssl threads usb -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd -xinetd -zeroconf" ABI_X86="32 (64) (-x32)" LINGUAS="ca cs de es fr it ja pt_BR ru" PYTHON_TARGETS="python2_7" 0 KiB

Total: 5 packages (5 reinstalls), Size of downloads: 0 KiB

Do you have anything different?
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Tue Nov 24, 2015 4:41 pm    Post subject: Reply with quote

Hi,

i dont have a real network based scanner/printer. I have a HP Deskjet 1050A AIO system which is connected via usb to a cubietruck. I have sane-backends-1.0.25 installed with the useflags for net and hp systems. I share the scanner with Windows machines and linux machines. i havent looked into the linux system fully, but i think the backend for net should be enough.

bb
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
m27315
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 253
Location: 2 workstations down

PostPosted: Tue Nov 24, 2015 4:43 pm    Post subject: Reply with quote

bbgermany wrote:
i dont have a real network based scanner/printer. I have a HP Deskjet 1050A AIO system which is connected via usb to a cubietruck. I have sane-backends-1.0.25 installed with the useflags for net and hp systems. I share the scanner with Windows machines and linux machines. i havent looked into the linux system fully, but i think the backend for net should be enough.

Ok, thanks! ... How do you like the cubietruck? ... I also had to fire up my Windows VM to get some scanning done. :(
Back to top
View user's profile Send private message
m27315
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 253
Location: 2 workstations down

PostPosted: Tue Nov 24, 2015 6:16 pm    Post subject: SOLVED - finally!!!! Reply with quote

Thanks to bbgermany and ian.au for all the help! :)

Short Answer:

In addition to other requirements, the CUPS print URI must match a specific format; otherwise, the printer will be unrecognized. My new, working printer.conf looks like:

Code:
$ cat /etc/cups/printers.conf
# Printer configuration file for CUPS v2.0.3
# Written by cupsd on 2015-11-24 11:50
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer HP_Photosmart_7520_series>
UUID urn:uuid:112e87a4-b284-33f3-4ea3-4748f44fd861
Info HP Photosmart 7520 series
Location Office
DeviceURI hp:/net/Photosmart_7520_series?ip=192.168.0.11
State Stopped
StateMessage Rendering completed
StateTime 1448380948
Reason paused
Type 4
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

The DeviceURI is the critical line for this case.

Code:
DeviceURI hp:/net/Photosmart_7520_series?ip=192.168.0.11

Previously, I had:
Code:
DeviceURI hp:/net/HP_Photosmart_7520_series?ip=192.168.0.11

Which was auto-generated and did NOT work.

Troubleshooting:

This pointed me in the right direction:

Code:
$ hp-check -t
...
HP Linux Imaging and Printing System (ver. 3.14.10)
Dependency/Version Check Utility ver. 15.1
...
-----------------------
|  Scan Configuration |
-----------------------

 hpaio                HPLIP-SANE-Backend        REQUIRED        -               3.14.10         OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension       REQUIRED        -               3.14.10         OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

No Scanner found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------


Photosmart_7520_series
----------------------
Type: Printer
Device URI: hp:/net/HP_Photosmart_7520_series?ip=192.168.0.11
error: Unsupported model: HP_Photosmart_7520_series
error: Communication status: Failed


Also, this post suggests that the connection method (hp vs socket) is critical:

http://lists.alioth.debian.org/pipermail/sane-devel/2009-February/024117.html

So, I played with variations of the printer name that I had seen in various auto-detection results, restarting cups after each change, and testing with "scanimage -L" until it was found.

Now, the checking tool reports:

Code:
$ hp-check -t
...
-----------------------
|  Scan Configuration |
-----------------------

 hpaio                HPLIP-SANE-Backend        REQUIRED        -               3.14.10         OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension       REQUIRED        -               3.14.10         OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

device `hpaio:/net/Photosmart_7520_series?ip=192.168.0.11' is a Hewlett-Packard Photosmart_7520_series all-in-one


--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------


HP_Photosmart_7520_series
-------------------------
Type: Printer
Device URI: hp:/net/Photosmart_7520_series?ip=192.168.0.11
PPD: /etc/cups/ppd/HP_Photosmart_7520_series.ppd
PPD Description: HP Photosmart 7520 Series, hpcups 3.14.10
Printer Rendering completedPhotosmart_7520_series disabled since Tue 24 Nov 2015 10:02:28 AM CST -
Communication status: Good
...

And, scanimage reports:

Code:
$ scanimage -L
device `hpaio:/net/Photosmart_7520_series?ip=192.168.0.11' is a Hewlett-Packard Photosmart_7520_series all-in-one


Other Requirements and Facets:

Here are the contents of other configuration files, which may be helpful. (Incidentally, I do not know which are absolutely required, because I did not test all of these exhaustively.)

Code:
$ cat /etc/portage/make.conf
...
SANE_BACKENDS="hp net"
...

You must rebuild sane-backends, if you modify the above setting.

Code:
$ cat /etc/sane.d/dll.conf
# enable the next line if you want to allow access through the network:
net
hp
# Add support for the HP-specific backend.  Needs net-print/hplip installed.
hpaio

I trimmed the above file, so that sane did not try to load every conceivable plug-in under the sun. The above is all that is required for the HP Photosmart 7520.

Code:
 cat /etc/sane.d/net.conf
# This is the net backend config file.

## net backend options
# Timeout for the initial connection to saned. This will prevent the backend
# from blocking for several minutes trying to connect to an unresponsive
# saned host (network outage, host down, ...). Value in seconds.
# connect_timeout = 60

## saned hosts
# Each line names a host to attach to.
# If you list "localhost" then your backends can be accessed either
# directly or through the net backend.  Going through the net backend
# may be necessary to access devices that need special privileges.
# localhost
192.168.0.11

Replace with the IP address of your remote networked scanner.

Code:
$ emerge -pvt xsane sane-backends hplip cups

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] net-print/hplip-3.14.10::gentoo  USE="X fax hpcups kde libnotify (policykit) qt4 scanner snmp static-ppds -doc -hpijs -libusb0 -minimal -parport" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ]  net-print/cups-2.0.3::gentoo  USE="X acl dbus pam ssl threads usb -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd -xinetd -zeroconf" ABI_X86="32 (64) (-x32)" LINGUAS="ca cs de es fr it ja pt_BR ru" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ]  media-gfx/xsane-0.999-r1::gentoo  USE="gimp jpeg lcms nls ocr png tiff" 0 KiB
[ebuild   R    ]   media-gfx/sane-backends-1.0.24-r5::gentoo  USE="avahi ipv6 snmp threads usb -doc -gphoto2 -systemd -v4l -xinetd" ABI_X86="32 (64) (-x32)" SANE_BACKENDS="hp net -abaton -agfafocus -apple -artec -artec_eplus48u -as6e -avision -bh -canon -canon630u -canon_dr -canon_pp -cardscan -coolscan -coolscan2 -coolscan3 -dc210 -dc240 -dc25 -dell1600n_net -dmc -epjitsu -epson -epson2 -fujitsu -genesys -gt68xx -hp3500 -hp3900 -hp4200 -hp5400 -hp5590 -hpljm1005 -hpsj5s -hs2p -ibm -kodak -kodakaio -kvs1025 -kvs20xx -kvs40xx -leo -lexmark -ma1509 -magicolor -matsushita -microtek -microtek2 -mustek -mustek_pp -mustek_usb -mustek_usb2 -nec -niash -p5 -pie -pixma -plustek -plustek_pp -pnm -qcam -ricoh -rts8891 -s9036 -sceptre -sharp -sm3600 -sm3840 -snapscan -sp15c -st400 -stv680 -tamarack -teco1 -teco2 -teco3 {-test} -u12 -umax -umax1220u -umax_pp -xerox_mfp" 0 KiB

Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB

The versions and use flags for the relevant packages, which works for me. Here are portage configs for me:

Code:
$ cat /etc/portage/package.use/use.use
...
media-gfx/xsane gimp ocr
media-gfx/sane-backends snmp avahi
net-print/hplip fax scanner snmp static-ppds


Conclusion:

Thanks again for all the help! I'm thankful this is fixed. Now that my OCD has been soothed, I can return to my normal life. ;)
Back to top
View user's profile Send private message
Frautoincnam
Apprentice
Apprentice


Joined: 19 May 2017
Posts: 294

PostPosted: Sun Jul 14, 2019 5:03 pm    Post subject: Reply with quote

bbgermany wrote:
are you running saned via xinetd or as standalone service? I had a similiar issue as i was running it via xinetd. As soon as i switched back to standalone service, i was able to use my hp deskjet scanner/printer combination again.


Same problem for me today with "HP Deskjet 1050 J410 series".
Never could scan with saned via xinetd, and worked when switched to saned service (openrc).
_________________
OS: Gentoo KDE x86_64 (4.19.97-gentoo)
MB: Z370 GAMING PLUS (MS-7B61)
CPU: Coffeelake Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
GPU: NVIDIA MSI GeForce GTX 1050 TI 4GT LP & i915 CPU Integrated
SSD: Samsung SSD 860 250GB
RAM: G.Skill 32GB DDR4-2133
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum