Forums

Mansoor
Mansoor
Offline
Resolved
0 votes
I have a Canon multifunction printer/scanner. I added the printer to my network using the cups server and wanted to make use of the scanner as well. I searched the Internet and found that the scanner server in the Linux work is called SANE, which had driven me insane for awhile :)

Initially, I installed the sane using the usual yum install command, but it could not recognize my scanner. I then learned that the compiled rpms don't usually come with all the drivers built-in. So, I searched for a "driver" rpm and found one. The later helped in recognizing my scanner locally, i.e. it scans from the server's CLI but not over the network.

To be able to scan remotely, one needs to prepare saned.socket, but unfortunately, the sane version installed by yum was old (ver. 1.0.24) and only has instructions for inetd and xinetd. As we all know, ClearOS 7.3 uses systemd, which not properly supported by sane ver. 1.0.24. Only in ver.1.0.25 the prober support came in. So, I uninstalled the rpms and built the sane from the source code.

I defined the socket files and the sane started listening on port 6566 using:
systemctl enable saned.socket
systemctl start saned.socket

Whenever a request comes to the socket, it passes it to the saned server to deal with. But the saned always fails and the request got rejected. I couldn't figure out what was the problem there. So, I decided to drop the socket and make the saned to run as a normal service (daemon) and it worked!

Here are the required files and commands needed to run the sane (ver. 1.0.27) on ClearOS 7.3.

1. Follow the instructions here to compile and install the sane server (you may need to look at the longer installation instructions, especially the part dealing with ldconfig): http://www.sane-project.org/INSTALL.linux

2. Plug in your scanner (or un-plug then re-plug it) and make sure it is recognized
scanimage -L

3. In "/usr/local/etc/sane.d/saned.conf" add the following:
## Access list
192.168.0.0/24 #your network scope

4. In "/usr/local/etc/sane.d/net.conf":
## saned hosts
192.168.0.1 #your server ip

5. Create the file "/etc/systemd/system/saned.service" and paste the following into it:
[Unit]
Description=Sane Scanner Service
[Service]
Type=forking
ExecStart=/usr/local/sbin/saned -a
ExecStop=killall saned
Environment=SANE_CONFIG_DIR=/usr/local/etc/sane.d
#uncomment if it does not work for the first time
#User=saned
#Group=scanner
#StandardInput=null
#StandardOutput=syslog
#StandardError=syslog
[Install]
WantedBy=multi-user.target

6. Enable and run the new saned service:
systemctl daemon-reload
systemctl enable saned.service
systemctl start saned.service

7. Make sure it runs. If not, start investigating the problem
ps -aux | grep saned
proceed only if saned process is not running:
systemctl --failed
tail -f /var/log/messages


Now, install a frontend from here: http://www.sane-project.org/sane-frontends.html on one of your PCs and try to scan from over the network.
Saturday, September 23 2017, 11:48 AM
Share this post:
Responses (0)
  • There are no replies here yet.
Your Reply