On Mon, Dec 04, 2023 at 05:48:55PM +0100, Why 42? The lists account. wrote:
> 
> Hi All,
> 
> I just noticed that "simple-scan" no longer works, it cannot find my
> scanner. This used to work just fine.
> 
> I'm running the latest (installed today) snapshot, but I don't know when
> this stopped working - I try not to do much scanning :-)
> 
> The scanner is a Canon Pixma "Multi Function" device, connected via
> Ethernet. (I never ever got it to print.)

How did simple-scan find the scanner?  Is the IP address hardcoded
somewhere in its config?  Maybe the printer/scanner got a different IP
from the DHCP server.  (BTW, this is a very good reason for NOT putting
network printers with dynamic IPs.  I've seen one instance of Windows
having 7 or 8 different "copies" of the same printer, all automatically
setup each time the printer got a different address, and the user then
had to go round-robin trying to figure out which was the IP-of-the-day.)

> 
> Running simple-scan in debug mode doesn't show me much, I see:
> > simple-scan -d
> > [+0.00s] DEBUG: simple-scan.vala:2015: Starting simple-scan 44.0, PID=91216
> > [+0.01s] DEBUG: unsetenv() is not thread-safe and should not be used after 
> > threads are created
> > [+0.04s] DEBUG: _g_io_module_get_default: Found default implementation gvfs 
> > (GDaemonVfs) for ‘gio-vfs’
> > [+0.18s] DEBUG: Portal not found: 
> > GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
> > org.freedesktop.portal.Desktop was not provided by any .service files
> > [+0.18s] DEBUG: Portal not found: 
> > GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
> > org.freedesktop.portal.Desktop was not provided by any .service files
> > [+0.18s] DEBUG: Portal not found: 
> > GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
> > org.freedesktop.portal.Desktop was not provided by any .service files
> > [+0.18s] DEBUG: _g_io_module_get_default: Found default implementation 
> > dconf (DConfSettingsBackend) for ‘gsettings-backend’
> > [+0.18s] WARNING: Using GtkSettings:gtk-application-prefer-dark-theme 
> > together with HdyStyleManager is unsupported. Please use 
> > HdyStyleManager:color-scheme instead.
> > [+0.66s] DEBUG: app-window.vala:2002: Loading state from 
> > /home/robb/.config/simple-scan/state
> > [+0.66s] DEBUG: app-window.vala:1981: Restoring window to 1002x1235 pixels
> > [+0.72s] DEBUG: scanner.vala:1619: sane_init () -> SANE_STATUS_GOOD
> > [+0.72s] DEBUG: scanner.vala:1625: SANE version 1.2.1
> > [+0.72s] DEBUG: scanner.vala:1686: Requesting redetection of scan devices
> > [+0.72s] DEBUG: scanner.vala:863: Processing request
> > [+0.86s] DEBUG: app-window.vala:2078: Saving state to 
> > /home/robb/.config/simple-scan/state
> > [+2.67s] DEBUG: scanner.vala:348: sane_get_devices () -> SANE_STATUS_GOOD
> > [+2.67s] DEBUG: platform does not do hotplug, using polling
> > ...
> 
> I have the saned daemon running, it seems to run OK. No matter what I
> tried I have been unable to trick it into logging any debug output e.g.
> even with "-d 32" I just see this logged:
> > mjoelnir:log 4.12 17:10:14 # grep sane *       
> > messages:Dec  4 10:02:07 mjoelnir pkg_add: Added 
> > sane-backends-1.2.1p0->1.2.1p0
> > messages:Dec  4 16:58:31 mjoelnir pkg_add: Added xsane-0.999p7

saned is for sharing a local scanner to over the network (i.e. as a
server, not as a client).  I don't think you need it.

> (The second message is me adding xsane, but it also fails to find the
> scanner.)
> 
> The README "sane-backends" ends with this cryptic (to me) advice, but
> I don't know what a "scanner device node" is for a thing with an IP
> address:
> > ...
> > NETWORK
> > =======
> > By default, the saned(8) daemon runs as _saned, so you need to allow the
> > _saned user access to the scanner device node.

Yes, this is for local (scsi/parallel/usb/etc) devices.

> What am I missing? Any tips for me?

According to the SANE project's webpage, your device is probably
supported by the pixma backend (you don't specify the model, so I can't
be sure).  This means that, in theory, all you need is to enable it in
/etc/sane.d/dll.conf, by making sure it is uncommented.  You can comment
everything else in there.

/etc/sane.d/pixma.conf configures the backend itself.  Defaults should
be enough for most cases but, as the comments in the file state, network
detection is none via broadcast, so both the scanner and your machine
must be on the same subnet.  Otherwise you need to specify the scanner's
address.

"scanimage -L" should find it.  Otherwise, I've had success in the past
with a networked epson multifunction device by using xsane like this:

    xsane epson2:net:10.17.18.40

where 10.17.18.40 is the IP address of the scanner.
Best of luck.

Cheers
Zé

> (Oh, I also tried "pfctl -d" to disable the local firewall, didn't seem
> to make any difference.)
> 
> Cheers,
> Robb.
> 
> mjoelnir:/etc 4.12 17:14:41 # uname -a
> OpenBSD mjoelnir.fritz.box 7.4 GENERIC.MP#1471 amd64
> 
> mjoelnir:/etc 4.12 17:14:46 # pkg_info | egrep '(scan|sane)'
> arp-scan-1.10.0p1   ARP scanning and fingerprinting tool
> nmap-7.91p5         scan ports and fingerprint stack of network hosts
> py3-ruamel.yaml.clib-0.2.8 C based reader/scanner and emitter for ruamel.yaml
> sane-backends-1.2.1p0 API for accessing scanners, backends
> simple-scan-44.0p0  simple scanning utility
> unpaper-7.0.0       post-processing tool for scanned paper sheets
> xsane-0.999p7       scanner frontend for SANE
> 
> mjoelnir:/etc 4.12 17:15:55 # ps aux | grep sane
> root     55249  0.0  0.0   880  1236 ??  S       4:36PM    0:00.07 
> /usr/local/libexec/saned -a -d 32
> root      5814  0.0  0.0  3956  2016 p1  R+/2    5:15PM    0:00.00 grep sane 
> (zsh)
> robb     24135  0.0  0.0  1628  2656 p3  I+p    11:52AM    0:00.01 less 
> sane-backends
> 

-- 
 

Reply via email to