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

README.md: add troubleshooting instructions for use with scanbd #99

Closed rrthomas closed 1 year ago

rrthomas commented 1 year ago

Thanks very much for AirScan. Although I had to make a couple of changes to get it to work with my system, it was by far the easiest part of the process!

SimulPiscator commented 1 year ago

This is very helpful, thank you so much!

watou commented 1 year ago

Hating to be a negative nelly, but these instructions did not lead to peaceful coexistence between scanbd 1.5.1-6 and current build-from-source AirSane on my RPi 4 at latest RPi OS. Perhaps I misunderstood what successes are expected with these instructions.

airsaned will not successfully scan if scanbd is running. If scanbd service is started first, no scanners are found by airsaned. If scanbd started second, airsane scan proceeds as if possible but fails to start scanning.

I'm happy to provide any further info towards coexistence of both services functioning. Thanks for AirSane and all contributors's efforts.

SimulPiscator commented 1 year ago

Thanks for your feedback. Did your scanbd setup work before AirSane came into play? Especially, can you make sure that, without AirSane, you are able to scan using scanimage as user saned: sudo -u saned scanimage > test.pnm

watou commented 1 year ago

Thank you for replying, @SimulPiscator. scanbd has been working well for me for a long time, and stopping that service and starting airsaned service has also worked for airsaned to work. But having both services running does not let airsaned work.

$ sudo -u saned scanimage > /tmp/test.pnm
Output format is not set, using pnm as a default.
$ ls -al /tmp/test.pnm
-rw-r--r-- 1 xxx xxx 4204233 Mar 24 15:54 /tmp/test.pnm
$ sudo systemctl start scanbd
$ sudo -u saned scanimage > /tmp/test2.pnm
Output format is not set, using pnm as a default.
scanimage: no SANE devices found
SimulPiscator commented 1 year ago

It seems that scanimage is not able to identify the scanner when running under the saned account while scanbd is active. I'll try to replicate that problem here and will come back to you.

rrthomas commented 1 year ago

Author of the instructions here: it is certainly possible that Debian/Ubuntu integration does something extra that I haven't accounted for. As @SimulPiscator says:

It seems that scanimage is not able to identify the scanner when running under the saned account while scanbd is active. I'll try to replicate that problem here and will come back to you.

That's correct, but I took it into account. scanbd works by taking over the raw scanners. If you want to see what it can see, then you have to run:

$ sudo SANE_CONFIG_DIR=/etc/scanbd scanimage -L

This is the problem I work around by having airsane instead find the scanner as a network scanner.

watou commented 1 year ago

I also have these settings:

$ cat /etc/airsane/ignore.conf 
# ignore SANE eSCL backends to avoid loops
escl:.*
airscan:.*
SimulPiscator commented 1 year ago

If you want to see what it can see, then you have to run: $ sudo SANE_CONFIG_DIR=/etc/scanbd scanimage -L

scanimage does not recognize my scanner when I run this.

rrthomas commented 1 year ago

If you want to see what it can see, then you have to run: $ sudo SANE_CONFIG_DIR=/etc/scanbd scanimage -L

scanimage does not recognize my scanner when I run this.

It seems then that scanbd is not correctly set up. My understanding is that scanbd's SANE_CONFIG_DIR should find scanners in the way that a normal saned setup would; essentially you transfer your usual saned config to scanbd.

SimulPiscator commented 1 year ago

What I'm trying to do is to have scanimage connect to scanbm through the net backend configured at the SANE default location. I cannot get this to work.

rrthomas commented 1 year ago

What I'm trying to do is to have scanimage connect to scanbm through the net backend configured at the SANE default location. I cannot get this to work.

I admit that it was not easy, but the Arch wiki is helpful: https://wiki.archlinux.org/title/Scanner_Button_Daemon

SimulPiscator commented 1 year ago

I got it working. I can call scanimage -L and it will list my scanner. Also, I can scan from my scanner. airsaned works as well if started after scanbd (setup as suggested by @rrthomas).