cannot detect scanner (hpaio) shared with saned daemon

Asked by Antonin Vecera

Hi!

I can't detect my scanner shared on my network. I am not sure but I think there could be a bug in hplip package.
Here is description of my configuration:

I have in my network these devices:
1. All-in-one printer+scanner HP LaserJet Pro MFP M125nw connected with network cable
2. pc1 - Fedora server 23 with CUPS and saned daemon
3. pc2 - Fedora Workstation 23 where I want to use scanner shared on pc1

on pc1 (server) - everything is working as expected:
- CUPS has defined my printer with URI as hp:/net/HP_LaserJet_Pro_MFP_M125nw?hostname=mfp
- I can print via CUPS
- scanner is detected/listed with "scanimage -L"
- I can scan images with "hp-scan" or "scanimage"

on pc2 (client):
- I can print via CUPS
- I can scan images but I MUST DEFINE used device (scanimage -d net:pc1:hpaio:/net/HP_LaserJet_Pro_MFP_M125nw?hostname=mfp)
- I CANNOT SEE MY SCANNER ON LISTED DEVICES WITH "scanimage -L"

The problem is that I cannot see my scanner in detected devices on pc2.
The scanner is defined in CUPS on pc1 (server) and shared to my network with "saned" daemon.
But on pc2 (client) the scanner is not detected and every time I want to scan I must to explicitly define it on command line.

----------------------------

For testing purposes I enabled on pc1 (server) "sane-test" backend.
This virtual scanner was detected on pc1 and pc2 with no problem:

pc1:~$ scanimage -L
device `test:0' is a Noname frontend-tester virtual device
device `test:1' is a Noname frontend-tester virtual device
device `hpaio:/net/HP_LaserJet_Pro_MFP_M125nw?hostname=mfp' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M125nw all-in-one

pc2:~$ scanimage -L
device `net:pc1:test:0' is a Noname frontend-tester virtual device
device `net:pc1:test:1' is a Noname frontend-tester virtual device

I think this proves that my configuration (iptables, CUPS, saned, ...) is OK.

----------------------------

So I think there could be an bug in hplip package.
I looked in sources and I found in file hplip-3.16.2/scan/sane/hpaio.c
that there is "DevDiscovery()" function where is:

    /* Look for Network Scan devices if localonly flag if FALSE. */
    if (!localOnly)
    {
        /* Look for all-in-one scan devices for which print queue created */
        cnt = GetCupsPrinters(&cups_printer);
        ....

My opinion is you should not treat CUPS printers as non-local devices.
There should not be the condition for "localOnly" variable.

Actually a printer could be non-local (networked) but its definition (with URI) is local (in CUPS).

Thanks for reading.

Antonin Vecera
<email address hidden>

Question information

Language:
English Edit question
Status:
Open
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Antonin Vecera for more information if necessary.

To post a message you must log in.