[systemd-devel] Fedora 21: Cannot scan to EPSON WF-2540

poma pomidorabelisima at gmail.com
Wed Dec 24 05:08:48 PST 2014


On 16.12.2014 08:18, poma wrote:
> 
> Unlike the case with a network capable scanner i.e. the scanner connected directly to the network,
> these are the settings for sharing across a network scanner connected to a computer via USB.
> 
> 
> As root, on *server*:
> 
> 1. Create 'saned' user & group
> 
> # getent group saned >/dev/null 2>&1 || groupadd -r saned 2>&1
> # getent passwd saned >/dev/null 2>&1 || useradd -r -l -g saned -d /dev/null -s /sbin/nologin -c "SANE network daemon" saned >/dev/null 2>&1
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 2. Create template unit configuration service file
> 
> /etc/systemd/system/saned at .service 
> [Unit]
> Description=SANE network daemon
> Requires=saned.socket
> 
> [Service]
> ExecStart=/usr/sbin/saned
> User=saned
> Group=saned
> StandardInput=socket
> Environment=SANE_CONFIG_DIR=/etc/sane.d
> # Debug:
> #Environment=SANE_DEBUG_DLL=128 SANE_DEBUG_NET=128
> 
> [Install]
> Also=saned.socket
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 3. Create unit configuration socket file
> 
> /etc/systemd/system/saned.socket 
> [Unit]
> Description=saned incoming socket
> 
> [Socket]
> ListenStream=6566
> Accept=yes
> MaxConnections=1
> 
> [Install]
> WantedBy=sockets.target
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 4. Create udev rule file
> 
> /etc/udev/rules.d/70-saned.rules 
> ACTION=="add", ENV{libsane_matched}=="yes", GROUP="saned", MODE="0660"
> 
> ~~~~~~~~~~~~~~~~~~
> 
> 5. Apply udev rule
> 
> # udevadm trigger --action=add
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 6. Add clinet name, client IP address, or IP subnet
>    to saned configuration file, within 'Access list' section.
>    In this example clinet IP address is used
> 
> /etc/sane.d/saned.conf
> 192.168.1.2
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 7. Firewall - open SANE control port 6566/tcp
> 
> ~~~~
>         \~~~~\    /~~~~/
>          \~~~~\  /~~~~/
>           \~~~~\/~~~~/
>           /~~~~/\~~~~\
>          /~~~~/  \~~~~\
>         /~~~~/    \~~~~\
> ~~~~
> 
> As root, on *client*:
> 
> 1. Add server name or server IP address to net backend configuration file,
>    within 'saned hosts' section.
>    In this example server IP address is used
> 
> /etc/sane.d/net.conf
> 192.168.1.1
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 2. Fire up your favorite frontend,
>    xsane, scanimage, simple-scan, skanlite, ...
> 
> ~~~~
> 
> Tested and works.
> 
> poma
> 
> 
> Ref.
> saned systemd support
> https://bugzilla.redhat.com/show_bug.cgi?id=1091566
> 


The above mentioned setup is OK for the case of standalone scanner.
However in case of multifunction device i.e. combined printer and scanner sharing a common device node, the following settings are technically correct:

On *server*:

1. Create 'saned' user & add to already defined 'lp' group (see 'setup' package)

# getent passwd saned >/dev/null 2>&1 || useradd -r -l -g lp -d /dev/null -s /sbin/nologin -c "SANE network daemon" saned >/dev/null 2>&1


2. & 3. are OK


4. Create udev rule file

/etc/udev/rules.d/70-saned-cupsd.rules 
ACTION=="add", ENV{libsane_matched}=="yes", GROUP="lp", MODE="0660"


5. - 7. are OK

~~~~

On *client*:

1. & 2. are OK


Tested and works.


poma



More information about the systemd-devel mailing list