SimulPiscator / AirSane

Publish SANE scanners to MacOS, Android, and Windows via Apple AirScan.
GNU General Public License v3.0
243 stars 26 forks source link

scanimage shows available printer, yet airsaned reports no printer available #78

Closed dev-zero closed 2 years ago

dev-zero commented 2 years ago
# sudo -u saned scanimage -L
[21:40:48.530714] [bjnp] create_broadcast_socket: ERROR - bind socket to local address failed - Cannot assign requested address
[21:40:48.530827] [bjnp] create_broadcast_socket: ERROR - bind socket to local address failed - Cannot assign requested address
device `pixma:MX860_CanonMX860.home' is a CANON Canon PIXMA MX860 multi-function peripheral
# sudo -u saned airsaned --debug=true --access-log=- --interface=eno1
git commit: 0266fbb (branch master, rev 193)
build date: 2021-09-03T19:21:19Z
reading device options from '/etc/airsane/options.conf'
enumerating local devices...
sane_init(nullptr, nullptr)
sane_get_devices() ...
... sane_get_devices() -> SANE_Status Success
sane_exit()
listening on 192.168.179.30:0
listening on [fdb4:dc3:3b52::1e]:0
listening on [fdb4:dc3:3b52:0:aaa1:59ff:fe66:1b4b]:0
listening on [fe80::aaa1:59ff:fe66:1b4b]:0

besides that but likely unrelated, I have to specify the interface because airsaned otherwise fails:

# sudo -u saned airsaned --debug=true --access-log=-
git commit: 0266fbb (branch master, rev 193)
build date: 2021-09-03T19:21:19Z
reading device options from '/etc/airsane/options.conf'
enumerating local devices...
sane_init(nullptr, nullptr)
sane_get_devices() ...
... sane_get_devices() -> SANE_Status Success
sane_exit()
listening on 127.0.0.1:0
listening on 192.168.179.30:0
listening on 172.17.0.1:0
listening on 172.20.0.1:0
listening on 172.18.0.1:0
listening on 172.22.0.1:0
listening on 172.19.0.1:0
listening on 172.21.0.1:0
listening on 172.24.0.1:0
listening on 172.23.0.1:0
listening on [::1]:0
listening on [fe80::aaa1:59ff:fe66:1b4b]:0
listening on [fe80::42:1cff:fe62:3739]:0
listening on [fe80::42:afff:fec9:cb70]:0
listening on [fe80::42:10ff:fe4f:3e8f]:0
listening on [fe80::42:44ff:fe4e:a569]:0
listening on [fe80::42:55ff:fe55:d75e]:0
listening on [fe80::42:cfff:fee2:13cd]:0
listening on [fe80::6cae:40ff:feee:617f]:0
listening on [fe80::88e0:65ff:fe53:fd88]:0
listening on [fe80::80ec:37ff:fea6:62e]:0
listening on [fe80::d89f:adff:fe40:101a]:0
listening on [fe80::48d5:f2ff:febd:1cde]:0
listening on [fe80::60b0:52ff:fef6:7f2]:0
server finished with error status -1, last error was 99: Cannot assign requested address
SimulPiscator commented 2 years ago

You could try with --local-only=false, maybe the scanner is declared as remote?

server finished with error status -1, last error was 99: Cannot assign requested address

What does lsof -t -i tcp:8090 say?

dev-zero commented 2 years ago

You could try with --local-only=false, maybe the scanner is declared as remote?

That was it, thanks! The printer is actually a network printer. Since there's no supported driver anymore on macOS I am sharing it via my Linux-based router as an AirPrint-based printer and now as an AirScan-scanner :-)

Does airsaned do a periodic rescan for scanners?

server finished with error status -1, last error was 99: Cannot assign requested address

What does lsof -t -i tcp:8090 say?

Empty when airsaned is not running, otherwise the airsaned pid. Since I'm running Docker on that host is it possible that airsaned tries to bind to a virtual ethernet device it has no access to? Like one which is attached to a bridge?

SimulPiscator commented 2 years ago

Does airsaned do a periodic rescan for scanners?

No, it does not. Originally, it was intended for sharing locally attached scanners, with the idea that network scanners would be available to clients anyway. Now that it seems people are in fact using it to share network scanners, a periodic rescan for scanners might be a worthwile addition. What default interval would you find convenient?

Since I'm running Docker on that host is it possible that airsaned tries to bind to a virtual ethernet device it has no access to? Like one which is attached to a bridge?

I'm not familiar with Docker, but a Google search turned up some results that point into that direction, yes.