Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
inbox:docs:guide-user:services:scanner_server:saned [2018/09/20 19:08] – [Configuration: enable saned to be accessible from the LAN] vgaeteradocs:guide-user:services:scanner_server:saned [2023/12/02 13:50] (current) – [Zeroconf] wording cm
Line 1: Line 1:
-====== saned scanner server ======+====== saned Scanner Server ======
 This page attempts to document how to get a simple USB scanner working and accessible via network by using [[http://www.sane-project.org/|The SANE project]]. This page attempts to document how to get a simple USB scanner working and accessible via network by using [[http://www.sane-project.org/|The SANE project]].
 +
 ===== Requirements ===== ===== Requirements =====
   - [[docs:guide-user:storage:usb-installing]] (or support for the parallel port, if you have a parallel port scanners)   - [[docs:guide-user:storage:usb-installing]] (or support for the parallel port, if you have a parallel port scanners)
Line 8: Line 9:
 ==== USB port ==== ==== USB port ====
 Note: I'm having a printer-scanner, which is why the "scanner" is recognized as a printer. I'm not actually sure, if this is needed for scanning functionality! Note: I'm having a printer-scanner, which is why the "scanner" is recognized as a printer. I'm not actually sure, if this is needed for scanning functionality!
-<code>opkg update+<code> 
 +opkg update
 opkg install kmod-usb-printer opkg install kmod-usb-printer
 </code> </code>
Line 19: Line 21:
 usb.c: USB disconnect on ice 01:02.0-1 address 2 usb.c: USB disconnect on ice 01:02.0-1 address 2
 hub.c: new USB ice 01:02.0-1, assigned address 3 hub.c: new USB ice 01:02.0-1, assigned address 3
-printer.c: usblp1: USB Bidirectional printer  3 if 0 alt 0 proto 2 vid 0x04A9 pid 0x1094</code> +printer.c: usblp1: USB Bidirectional printer  3 if 0 alt 0 proto 2 vid 0x04A9 pid 0x1094 
 +</code>
  
 ==== Parallel port ==== ==== Parallel port ====
Line 32: Line 34:
  
 **''TIP:''** p910nd is reported as working with some noname USB-to-Parport adapter/converter as well; maybe the same is true for some scanners? **''TIP:''** p910nd is reported as working with some noname USB-to-Parport adapter/converter as well; maybe the same is true for some scanners?
 +
 ==== Install xinetd ==== ==== Install xinetd ====
 Xinet makes possible to run saned only when the port is accessed via network. Because we're lazy, let's go trough this route. Install xinetd (if not already installed): Xinet makes possible to run saned only when the port is accessed via network. Because we're lazy, let's go trough this route. Install xinetd (if not already installed):
 <code>opkg install xinetd</code> <code>opkg install xinetd</code>
 +
 +
 ===== Installation ===== ===== Installation =====
 ==== Command line ==== ==== Command line ====
Line 42: Line 47:
  
 [[docs:guide-user:additional-software:opkg]] [[docs:guide-user:additional-software:opkg]]
 +
 +Basis-system
 <code> <code>
 opkg update opkg update
-opkg install sane-daemon sane-frontends sane-xerox_mfp+opkg install sane-daemon  
 +</code> 
 + 
 +Scanner  
 +<code> 
 +opkg install sane-xerox_mfp 
 +#if you have a xerox scanner 
 +opkg install sane-plustek 
 +#example for Canon lide 20 (canon use sometimes plustek hardware)  
 +</code> 
 + 
 +all availble scanner can be install with  
 +<code> 
 +opkg install sane-backends-all 
 +</code> 
 + 
 +[[packages:pkgdata:sane-backends-all|package: sane-backends-all]] 
 +there are also list of all avaible single scanner package 
 + 
 +Optional 
 +<code> 
 +opkg install sane-frontend
 </code> </code>
  
 ===== (Optional): testing the scanner ===== ===== (Optional): testing the scanner =====
-Run this on the router to see if the scanner is found and working:+Run this on the router to see if the scanner is found and working :
 <code>scanimage -L</code> <code>scanimage -L</code>
 If you get this: If you get this:
Line 56: Line 84:
 which came with this software (README, FAQ, manpages).</code> which came with this software (README, FAQ, manpages).</code>
 You most probably do not have the right backend installed. Please try again after installing the right backend. You should get something similar to this: You most probably do not have the right backend installed. Please try again after installing the right backend. You should get something similar to this:
-<code>device `xerox_mfp:libusb:002:003' is a SAMSUNG ORION multi-function peripheral + 
-</code>+<code>device `xerox_mfp:libusb:002:003' is a SAMSUNG ORION multi-function peripheral</code> 
 Presumably you could try to brute-force, install all backends and then remove them as scanimage will tell you which backend it is using if/when it finds your scanner. Presumably you could try to brute-force, install all backends and then remove them as scanimage will tell you which backend it is using if/when it finds your scanner.
-===== Configuration: use xinetd to start saned ===== + 
-sane-daemon should have come with a configuration file, enable it in /etc/xinet.d/sane-port: + 
-<code>sane-port +===== Configuration ===== 
 +==== Use xinetd to start saned ==== 
 +sane-daemon should have come with a configuration file, enable it in /etc/xinetd.d/sane-port  
 +<code>
 # default: off # default: off
 # description: The saned provides scanner service via the network.  \ # description: The saned provides scanner service via the network.  \
-      Applications like kooka, xsane or xscanimage can use the remote \ +# Applications like kooka, xsane or xscanimage can use the remote \ 
-      scanner. +# scanner. 
 service sane-port service sane-port
 { {
-        socket_type = stream + socket_type = stream 
-        port        = 6566 + port        = 6566 
-        wait        = no + wait        = no 
-        user        = root + user        = saned 
-        group       root + group       scanner 
-        server      = /usr/sbin/saned + server      = /usr/sbin/saned 
-        disable     = no + disable     = no
 } }
 </code> </code>
 +
 (i.e. change disable = yes to no) (i.e. change disable = yes to no)
-===== Configuration (alternative): start saned without xinetd ===== + 
-**TODO:** Tell how to do this without xinetd and enable saned. +==== Start saned without xinetd ==== 
-===== Configuration: enable saned to be accessible from the LAN ===== +saned is already a deamon by default 
-Put your subnet in /etc/sane.d/saned.conf:+ 
 +you can start saned with rc.local 
 + 
 +<code> 
 +saned -a 
 +</code> 
 + 
 +The -a 
 +flag requests that saned run in standalone daemon mode. In this  mode, saned  will  
 +detach  from  the  console  and  run  in  the  background,  listening  for incoming client 
 +connections; inetd is not required for saned operations in  this  mode If  the  optional 
 +username  is  given  after  -a , saned will drop root privileges and run as this user (and group). 
 + 
 + [[https://manpages.ubuntu.com/manpages/xenial/man8/saned.8.html|saned manpage ]] 
 + 
 +==== Enable saned to be accessible from the LAN ==== 
 +Put your subnet in ''/etc/sane.d/saned.conf'' :
 <code>192.168.1.1/24</code> <code>192.168.1.1/24</code>
 +
 **TODO:** IPv6 LAN addressing for those who need it? **TODO:** IPv6 LAN addressing for those who need it?
-===== Configuration: Firewall rules =====+ 
 +==== Firewall rules ====
 **TODO:** Placeholder. Add examples here to open port 6566 if closed. **TODO:** Placeholder. Add examples here to open port 6566 if closed.
 +
 +==== Zeroconf ====
 +AirSane exposes a sane scanner over AirScan/eSCL, which is available by default on Windows and macOS.
 +See [[https://github.com/cmangla/AirSane-openwrt]].
 +
 ===== Access from your computer (client) on the network ===== ===== Access from your computer (client) on the network =====
 You probably want to access the scanner from some client software. You probably want to access the scanner from some client software.
 +
 ==== Linux ==== ==== Linux ====
-If you are using Linux, enable saned on all your computers you want to access the scanner from, and add your router IP in /etc/sane.d/net.conf on **the client machine** (if you have name resolving working on your LAN, presumably you can also use your router name here).+If you are using Linux, enable saned on all your computers you want to access the scanner from, and add your router IP in ''/etc/sane.d/net.conf'' on **the client machine** (if you have name resolving working on your LAN, presumably you can also use your router name here). 
 + 
 +After adding the IP address, running ''scanimage -L'' on the client should produce something like this: 
 + 
 +<code>device 'net:192.168.1.1:xerox_mfp:libusb:002:003' is a SAMSUNG ORION multi-function peripheral</code>
  
-After adding the IP address, running 'scanimage -L' on the client should produce something like this: 
-<code>device `net:192.168.1.1:xerox_mfp:libusb:002:003' is a SAMSUNG ORION multi-function peripheral 
-</code> 
 Your scanner is now ready to use! Your scanner is now ready to use!
-==== OS X, Windows ant other OSes ====+ 
 +==== OS X, Windows and other OSes ====
 The SANE project has [[http://www.sane-project.org/sane-frontends.html|a list of frontends (applications)]], which includes a few choices for Windows and a choice for OS X. How to use these might be out of scope on this Wiki, but feel free to add links here to tips and right documentation. One thing worth mentioning is that at least on Linux, LibreOffice can use sane backend. The SANE project has [[http://www.sane-project.org/sane-frontends.html|a list of frontends (applications)]], which includes a few choices for Windows and a choice for OS X. How to use these might be out of scope on this Wiki, but feel free to add links here to tips and right documentation. One thing worth mentioning is that at least on Linux, LibreOffice can use sane backend.
  
 **TODO:** find out if LibreOffice requires a local running saned, or is it usable without one, and us such usable OOTB for a saned running somewhere on the network? **TODO:** find out if LibreOffice requires a local running saned, or is it usable without one, and us such usable OOTB for a saned running somewhere on the network?
 +
 ===== Troubleshooting ===== ===== Troubleshooting =====
-  * Run "scanimage -Lon the router, if it does not find your scanner, you need to solve this first +  * Run ''scanimage -L'' on the router, if it does not find your scanner, you need to solve this first 
-  * If scanimage does not find your scanner, install "sane-alland try again? +  * If scanimage does not find your scanner, install ''sane-all'' and try again? 
-  * Run "scanimage -Lon your client (Linux), it should find the scanner. If it doesn't, but your router does, the saned on the client is not configured correctly +  * Run ''scanimage -L'' on your client (Linux), it should find the scanner. If it doesn't, but your router does, the saned on the client is not configured correctly
-===== "Ideas" ===== +
-**TODO:** Just some placeholders here. If not feasible / applicable, delete this paragraph. +
-==== Zeroconf with avahi-daemon ====+
  
  • Last modified: 2023/12/02 13:50
  • by cm