[sane-devel] How to scan via WiFi over a LAN

Media Mouth communque at gmail.com
Sun May 9 18:45:32 BST 2021


> On May 9, 2021, at 10:23 AM, Media Mouth <communque at gmail.com> wrote:
> 
> 
> 
>> On May 8, 2021, at 3:59 PM, Ralph Little <skelband at gmail.com <mailto:skelband at gmail.com>> wrote:
>> 
>> That seems to imply you have an incoming connection from that address (192.168.1.182) which is weird, but might be unimportant.
> I've been bouncing between different systems each with a client/client/scanner (so maybe best to just express them as ClientIP and ServerIP)
> The above LAN is a client IP.
> 
>> Let's try to simplify the situation a little.
>> We can try to run saned manually, no need to stop the service, we can choose a different port.
>> 
>> saned -l -p 7000 -b 192.168.0.Server -e -d10
> From this I get:
> saned: invalid option -- 'l'
> So wasn't able to test via port change.
> 
>> This will run saned binding to the port 7000 in the foreground, channeling the diag to stderr instead of syslog.
>> Perhaps list the output of that in a reply here.
>> 
>> You won't be able to connect a client to it without editing the client's /etc/services file to change sane-port to 7000 from 6566 which is a bit of a faff.
>> There is no way to configure the client's net backend to choose a non-standard port. It merely looks at the machine's services configuration. :(
>> 
>> Please check that you do not have SANE_CONFIG_DIR set in your environment, unless it is set to /etc/sane.d.
>> That optionally contains the directories to search for the config file. If it still cannot find saned.conf, and you do not have the var set, you could set it to /etc/sane.d and try again.
> This was not set (i.e. no evidence of it from `printenv`, but based on your note I added the following line to /etc/environment on the server: SANE_CONFIG_DIR="/etc/sane.d"
> LMK if I did that correctly.  Wasn't sure if /etc/environment is the right file, or whether to put /etc/sane.d vs /etc/sane.d/ (i.e. with or without trailing slash)
> Tested both but still getting the same results from SANE_DEBUG_NET=10 scanimage -L

Also...

FROM CLIENT: stdout from SANE_DEBUG_NET=10 scanimage -L

[10:28:21.174838] [sanei_debug] Setting debug level of net to 10.
[10:28:21.175096] [net] sane_init: authorize != null, version_code != null
[10:28:21.175101] [net] sane_init: SANE net backend version 1.0.14 (AF-indep) from sane-backends 1.0.32
[10:28:21.175104] [net] sane_init: Client has little endian byte order
[10:28:21.175107] [net] sane_init: searching for config file
[10:28:21.175157] [net] sane_init: trying to add [ServerIP]
[10:28:21.175162] [net] add_device: adding backend [ServerIP]
[10:28:21.772986] [net] add_device: backend [ServerIP] added
[10:28:21.773022] [net] sane_init: done reading config
[10:28:21.773028] [net] sane_init: evaluating environment variable SANE_NET_HOSTS
[10:28:21.773037] [net] sane_init: evaluating environment variable SANE_NET_TIMEOUT
[10:28:21.773042] [net] sane_init: done
[10:28:21.773046] [net] sane_get_devices: local_only = 0
[10:28:21.773060] [net] connect_dev: trying to connect to [ServerIP]
[10:28:21.779465] [net] connect_dev: [0] connection succeeded (IPv4)
[10:28:21.779511] [net] connect_dev: sanei_w_init
[10:28:21.779772] [net] connect_dev: net_init (user=[ClientUserName], local version=1.0.3) #<----NOTABLE DELAY HERE
[10:29:11.948981] [net] connect_dev: freeing init reply (status=Unknown SANE status code 796226418, remote version=47.115.25193)
[10:29:11.949135] [net] connect_dev: access to [ServerIP] denied
[10:29:11.949150] [net] connect_dev: closing connection to [ServerIP]
[10:29:11.949180] [net] sane_get_devices: ignoring failure to connect to [ServerIP]
[10:29:11.949212] [net] sane_get_devices: finished (0 devices)

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).
[10:29:11.954537] [net] sane_exit: exiting
[10:29:11.954560] [net] sane_exit: closing dev 0x7fd4764066f0, ctl=-1
[10:29:11.954588] [net] sane_exit: finished.





FROM SERVER: syslog

May  9 10:28:21 [serverName] systemd[1]: Started Scanner Service (ClientIP:55062).
May  9 10:28:22 [serverName] scanbm: /usr/sbin/scanbm: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
May  9 10:28:22 [serverName] dbus-daemon[343]: [system] Activating via systemd: service name='de.kmux.scanbd.server' unit='dbus-de.kmux.scanbd.server.service' requested by ':1.107' (uid=1 pid=5914 comm="/usr/sbin/scanbm -c /etc/scanbd/scanbd.conf ")
May  9 10:28:47 [serverName] saned[5915]: read_config: could not open config file (saned.conf): No such file or directory #<----ISSUE HERE
May  9 10:28:47 [serverName] saned[5915]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up
May  9 10:28:47 [serverName] saned[5915]: check_host: access by remote host: ::ffff:ClientIP
May  9 10:28:47 [serverName] saned[5915]: init: access by host ::ffff:ClientIP denied #<----
May  9 10:28:47 [serverName] saned[5915]: saned exiting


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20210509/5f0c5ca3/attachment-0001.htm>


More information about the sane-devel mailing list