I have set up a Raspberry Pi B v1 with a minimal Jessie image and configured it for printing via cups and scanning via saned.
The local setup is without issues; a
pi@EMK-RPiBv1:~$ scanimage -L
device 'fujitsu:ScanSnap S1500:25959' is a FUJITSU ScanSnap S1500 scanner
However, the scanner is not visible on the network. a scanimage -L on another machine shows
emk2203@XPS12-9Q33:~$ scanimage -L
device 'hpaio:/net/HP_LaserJet_CM1415fn?ip=192.168.1.30' is a Hewlett-Packard HP_LaserJet_CM1415fn all-in-one
device 'hpaio:/net/HP_Officejet_Pro_276dw_MFP?ip=192.168.1.40' is a Hewlett-Packard HP_Officejet_Pro_276dw_MFP all-in-one
So, the scanimage -L works - it finds the two other networked scanners, but not the scanner attached to the Raspi.
If I issue netstat -tulpn on the pi and check the status of saned.service and saned.socket, I get
pi@EMK-RPiBv1:~$ netstat -tulpn
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::6566 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::631 :::* LISTEN
udp 0 0 0.0.0.0:42976 0.0.0.0:*
udp 0 0 0.0.0.0:5353 0.0.0.0:*
udp 0 0 0.0.0.0:29987 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 192.168.1.34:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:*-
udp 0 0 0.0.0.0:123 0.0.0.0:*-
udp6 0 0 :::35810 :::* -
udp6 0 0 :::5353 :::* -
udp6 0 0 :::49009 :::* -
udp6 0 0 fe80::ba27:ebff:fe4:123 :::* -
udp6 0 0 2a02:8070:a182:ce00:123 :::* -
udp6 0 0 ::1:123 :::* -
udp6 0 0 :::123 :::* -
pi@EMK-RPiBv1:~$ systemctl status saned.socket
● saned.socket - saned incoming socket
Loaded: loaded (/lib/systemd/system/saned.socket; enabled)
Active: active (listening) since Sun 2015-10-11 20:01:52 CEST; 2min 18s ago
Listen: [::]:6566 (Stream)
Accepted: 0; Connected: 0
pi@EMK-RPiBv1:~$ systemctl status saned.service
● saned.service - LSB: SANE network scanner server
Loaded: loaded (/etc/init.d/saned)
Active: active (exited) since Sun 2015-10-11 20:01:53 CEST; 2min 26s ago
Process: 342 ExecStart=/etc/init.d/saned start (code=exited, status=0/SUCCESS)
The open port is shown for tcp6 only, but according to pi@EMK-RPiBv1:~$ sudo sysctl net.ipv6.bindv6only I get net.ipv6.bindv6only = 0 - this shouldn't be a problem, since ipv6 is not bound to only v6, but includes ipv4 as well.
But when I try to telnet into the open port on the pi, the connection is refused:
pi@EMK-RPiBv1:~$ telnet localhost 6566
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
This indicates that I can't reach my saned.
If I kill the systemd service and socket for saned and try to debug, I get the following:
root@EMK-RPiBv1:~# systemctl stop saned.service
root@EMK-RPiBv1:~# systemctl stop saned.socket
root@EMK-RPiBv1:~# lsof -i :6566
So, nothing listening at the moment - no output.
root@EMK-RPiBv1:~# saned -d128 -a saned
[saned] main: starting debug mode (level 128)
[saned] read_config: searching for config file
[saned] read_config: done reading config
[saned] saned (AF-indep+IPv6) from sane-backends 1.0.24 starting up
[saned] do_bindings: trying to get port for service "sane-port" (getaddrinfo)
[saned] do_bindings: [1] socket () using IPv6
[saned] do_bindings: [1] setsockopt ()
[saned] do_bindings: [1] bind () to port 6566
[saned] do_bindings: [1] listen ()
[saned] do_bindings: [0] socket () using IPv4
[saned] do_bindings: [0] setsockopt ()
[saned] do_bindings: [0] bind () to port 6566
[saned] do_bindings: [0] bind failed: Address already in use
[saned] run_standalone: spawning Avahi process
[saned] run_standalone: waiting for control connection
[saned] saned_avahi_callback: AVAHI_CLIENT_S_RUNNING
[saned] saned_create_avahi_services: adding service 'saned'
[saned] saned_avahi_group_callback: service 'saned' successfully established
What do I need to do to open the connection? Without installing inetd or xinetd, please. This should work with systemd alone.