sane - bunnyamin/bunnix GitHub Wiki
| Distribution | Package |
|---|---|
| Arch Linux | sane |
| Arch Linux | sane-airscan |
| Arch Linux | xsane-gimp |
- Arch Linux Wiki SANE
- Arch Linux Wiki SANE/Scanner-specific problems
USB connection requires the IPP protocol, normally designed for network printers, and can be used for USB printers.
- Arch Linux IPP-USB
systemctl enable --now ipp-usb
| Command | Example | Comment |
|---|---|---|
| List devices |
scanimage -L -> device `xerox_mfp:tcp 192.168.0.109' is a Samsung C460 Series multi-function peripheral
|
|
| List device options |
scanimage -A -> All options specific to device `xerox_mfp:tcp 192.168.0.109': ...
|
- SystemD
systemctl status saned.socket
-
sane-find-scannerand note thelibusb:000:000 - Note the permission
ls -la /dev/bus/usb/007/008 - The device ID
0000:0000:lsusb - Test if device is defined in configuration files:
grep '0000.*0000' /etc/sane.d/*.conf
/etc/udev/rules.d/40-sane.rules
ATTRS{idVendor}=="0000", ATTRS{idProduct}=="0000", ENV{libsane_matched}="yes", MODE="0664", GROUP="scanner"
- Expose network interface to local network:
interface = all systemctl restart ipp-usb
/etc/sane.d/dll.conf
Enable
-
airscanor - `"backend"
Determine backend support for hardware model: SANE: Supported Devices.
For example, the backend for CanoScan LiDE 100 is genesys. ensure that it
is present, and not commented out, in /etc/sane.d/dll.conf.
Configuration file to identify scanner:
-
echo usb 0x00000 0x0000>/etc/sane.d/name.conf - Attempts to open library
/usr/lib/sane/libsane-<name>.so[.version]
- Enable
net,esclin/etc/sane.d/dll.confor disable them and enableairscanenabled in/etc/sane.d/dll.d/airscan.
- Note the relevant device:
airscan-discover
- Add host names, IP or subnets to "Access list":
/etc/sane.d/saned.conf - Enable "localhost":
/etc/sane.d/net.conf
Enable network on device.
Create a network configuration. For example:
lan-ether-name.network
[Match]
Name=<network device>
[Link]
RequiredForOnline=false
[Network]
ConfigureWithoutCarrier=false
DHCP=yes
DHCPServer=true
IPv4Forwarding=true
IPv6Forwarding=true
IPMasquerade=both
Address=<IP for DHCP Server>
[Link]
RequiredForOnline=false
[DHCP]
UseDNS=true
The command airscan-discover should return devices served on IPv4 and IPv6.
- Note the relevant device:
airscan-discover - The device should be shared on network. For example:
"Device name (WSD)" = http://1.2.3.4:80/WebServices/Device, WSD
- Install "airscan"
- Add the relevant device noted on server to client configuration section
[device]in/etc/sane.d/airscan.conf- The device should be found on access. For example:
xsaneorscanimage -L
- The device should be found on access. For example:
- What scanner capabilities:
http://<SERVER IP:PORT>/<eSCL, WSD>/ScannerCapabilities
Manual connect to server:
- Add server IP:
/etc/sane.d/net.conf xsane [driver]:net:<SERVER IP>
- If scanner not found after setup, try unplugging and re-plugging the USB.
- Is the SANE port open on server?
nmap <SERVER IP> export SANE_DEBUG_DLL=255 && scanimage -Lscanimage -d "net:<SERVER IP>" --output-file test.pngscanimage -d "airscan:e0:<SCANNER>" --output-file test.png-
systemctl status saned.socketprovides information on number of connections that have been "Accepted" "Connected" "Refused".
| Event | Error | Cause | Consequence | Remedy |
|---|---|---|---|---|
scanimage -d ... |
Failed to open device net:<SERVER IP><br />Invalid argument. |
|||
scanimage -d ... |
Failed to open device net:<SERVER IP><br />Error during device I/O. |
scanner capabilities query: Internal Server Error |
Enable debug for airscan /etc/sane.d/airscan.conf
[debug]
trace = ~/airscan/trace
enable = true
- Download "scanner driver"
- Extract the package
- Copy the driver
brscan4-0.4.11-1_amd64/usr/lib64/sane/libsane-brother4.so.1.0.7- to
/usr/lib/sane/ - and version links:
ln -s libsane-brother4.so.1.0.7 libsane-brother4.so.1.0ln -s libsane-brother4.so.1.0.7 libsane-brother4.so