Note that it makes things easier if --prefix above points to the same path where
saned will be installed on the target. This is because this path is compiled into
the code and used for looking for configuration files, etc. In this case saned gets
installed in /opt/sane

Server install

Tar up the /opt/sane directory you just created at the end of the build process in the previous section:

tar cvjf sane-backends-1.0.22.tar.bz2 /opt/sane

Copy that over to the linkstation and untar it into /opt/sane

chown -R root:root /opt/sane

Add a new user and group for sane:

root@LS$ adduser saned

Add a new file /opt/sane/sbin/saned_wrap and make it executable:

#!/bin/bash
# All in the same line
SANE_CONFIG_DIR=/opt/sane/etc/sane.d LD_LIBRARY_PATH=/opt/sane/lib /opt/sane/sbin/saned $@

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9 [Canon], product=0x1725 [MP610 series]) at libusb:001:017
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

Now that you can access the scanner from localhost (i.e. the linkstation) let's allow all other hosts in the LAN to access the scanner. Add the following to /opt/sane/etc/sane.d/saned.conf:

192.168.15.0/24

or whatever your LAN settings are. Of course you can also enable access per host. Check saned documentation.

Finally we need to make sure the USB device is accessible by user saned. We also need to ensure that this accessibility persists across reboots or plug/unplug USB cycles. This is achieved by adding a new file libusbscanner.hotplug in /etc/hotplug.d/usb_device:

Client install

Edit /usr/local/etc/sane.d/net.conf (or /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.15.33