Skip to content

Install and configure network scanner

Volodymyr Huz edited this page Nov 2, 2018 · 1 revision

Install and configure network scanner with using sane

Install sane

sudo apt-get install sane
sudo apt-get install sane-utils
sudo apt-get install libsane-extras

Check your USB scanner

sudo sane-find-scanner

Configure your scanner, my scanner is Canon

sudo nano /etc/sane.d/canon_dr.conf

# MF3240
usb 0x04a9 0x2684

Configure network access with your Raspberry Pi IP Address, my Raspberry PI IP is 192.168.1.100

sudo nano /etc/sane.d/net.conf

192.168.1.100
::1
localhost

sudo nano /etc/sane.d/saned.conf

192.168.1.0/24

Configure sane to work as daemon service and start on boot

sudo nano /etc/systemd/system/saned.socket

# Defaults for the saned initscript, from sane-utils

# To enable under systemd please read README.Debian
# Set to yes to start saned under SysV
RUN=yes

# Set to the user saned should run as
RUN_AS_USER=saned

[Unit]
Description=saned incoming socket

[Socket]
ListenStream=6566
Accept=yes
MaxConnections=1

[Install]
WantedBy=sockets.target

sudo nano /etc/systemd/system/saned@.service

[Unit]
Description=Scanner Service
Requires=saned.socket

[Service]
ExecStart=/usr/sbin/saned
User=saned
Group=saned
StandardInput=socket
Environment=SANE_CONFIG_DIR=/etc/sane.d

[Install]
Also=saned.socket

sudo nano /etc/default/saned

RUN=no
RUN_AS_USER=saned
sudo /etc/init.d/saned stop
sudo rm /lib/systemd/system/saned.service
sudo rm /lib/systemd/system/saned.socket
sudo rm /lib/systemd/system/saned@.service

sudo systemctl daemon-reload

sudo systemctl start saned
sudo systemctl enable saned
sudo systemctl status saned

Check sane open ports

cat /etc/services | grep sane

Check plugged on scanners

sudo scanimage --list-devices

sudo scanimage -L

Scan image

sudo scanimage --format pnm > scan-copy.pnm

Windows TWAIN Drivers WiaSane

Clone this wiki locally