scanbd unable to detect scanner

544 Views Asked by At

I am trying to setup a scan station using my Canon CanoScan LiDE 110 connected to a pi zero w running DietPi 8.1.2. Initially I had saned running and it worked fine.

scanimage -L listed my scanner and I was able to scan from a networked system using xsane.

I decided to try to use scanbd to make scanning easier with the buttons on the scanner.

following docs here and here

I installed the scanbd package,

copied the original config to /etc/scanbd/sane.d

root@cscan:/etc/scanbd/sane.d# egrep -v '^#|^$' {dll,net}.conf
dll.conf:genesys

Created a symlink for good measure

root@cscan:/var/log# ls -la /usr/local/etc/scanbd
lrwxrwxrwx 1 root root 12 Feb  7 08:53 /usr/local/etc/scanbd -> /etc/scanbd/

modified the existing saned config to point to net only and localhost, so that it wouldn't try to connect directly to the scanner,

root@cscan:/etc/sane.d# egrep -v '^#|^$' {net,dll}.conf
net.conf: connect_timeout = 3
net.conf: localhost
dll.conf:net

enable and start systemd stuff

root@cscan:/var/log# systemctl status {scanbd,scanbm.socket}
? scanbd.service - Scanner button polling Service
   Loaded: loaded (/lib/systemd/system/scanbd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2022-02-07 08:53:41 EST; 36min ago
 Main PID: 2438 (scanbd)
    Tasks: 5 (limit: 991)
   CGroup: /system.slice/scanbd.service
           ??2438 /usr/sbin/scanbd -f -c /etc/scanbd/scanbd.conf

Feb 07 08:53:41 cscan systemd[1]: Started Scanner button polling Service.
Feb 07 08:53:41 cscan scanbd[2438]: /usr/sbin/scanbd: dbus match type='signal',interface='or
g.freedesktop.Hal.Manager'
Feb 07 08:57:59 cscan scanbd[2438]: /usr/sbin/scanbd: trigger action for scan for device gen
esys:libusb:001:003 with script test.script
Feb 07 08:58:00 cscan scanbd[2475]: /usr/share/scanbd/scripts/test.script: Begin of scan for
 device genesys:libusb:001:003
Feb 07 08:58:00 cscan scanbd[2478]: /usr/share/scanbd/scripts/test.script: End   of scan for
 device genesys:libusb:001:003

? scanbm.socket - scanbd/saned incoming socket
   Loaded: loaded (/lib/systemd/system/scanbm.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Mon 2022-02-07 08:53:49 EST; 36min ago
   Listen: [::]:6566 (Stream)
 Accepted: 5; Connected: 0;
    Tasks: 0 (limit: 991)
   CGroup: /system.slice/scanbm.socket

Feb 07 08:53:49 cscan systemd[1]: Listening on scanbd/saned incoming socket.

It appears that the scan button is launching the test.script as expected (see above) but scanbd -f doesn't seem to connect to my scanner.

root@cscan:/etc/scanbd# scanbd -d7 -f
scanbd: foreground
scanbd: reading config file /etc/scanbd/scanbd.conf
scanbd: debug on: level: 7
scanbd: dropping privs to uid saned
scanbd: dropping privs to gid scanner
scanbd: group scanner has member:
scanbd: saned
scanbd: drop privileges to gid: 115
scanbd: Running as effective gid 115
scanbd: drop privileges to uid: 108
scanbd: Running as effective uid 108
scanbd: dbus_init
scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
scanbd: SANE_CONFIG_DIR not set
scanbd: sane version 1.0
scanbd: Scanning for local-only devices
scanbd: start_sane_threads
scanbd: no devices, not starting any polling thread
scanbd: start dbus thread
scanbd: Not Primary Owner (2)
scanbd: udev init
scanbd: get udev monitor
scanbd: udev fd is non-blocking, now setting to blocking mode
scanbd: start udev thread
scanbd: timeout: 500 ms
scanbd: Iteration on dbus call
scanbd: udev thread started
scanbd: Iteration on dbus call

SANE_CONFIG_DIR variable appears to be defined in scanbd.conf

root@cscan:/etc/scanbd# grep -r SANE_CONFIG_DIR
scanbd.conf:            saned_env  = { "SANE_CONFIG_DIR=/etc/scanbd" } # list of environment vars for saned

And, scanimage -L does work locally, but not remotely

root@cscan:~# scanimage -L
device `net:localhost:genesys:libusb:001:002' is a Canon LiDE 110 flatbed scanner

user@desktop:/etc/sane.d $ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

At this point I have run out of ideas. Is there anyone out there who can help me out with this? My ultimate goal is to be able to network scan via saned using xsane and saneTwain, and use the front panel buttons to do script magic.

0

There are 0 best solutions below