Closed ilya-fedin closed 10 months ago
Hi, could you help me understand this:
Scanning with feeder via the net plugin works just fine What is the "net plugin"? Which application (SANE frontend) are you using when it works?
Also, could you try scanimage
in batch mode and see whether that works?
Thank you!
I used gnome-scan. The net plugin is the sane's native protocol for network scanning. I also noticed that with the net plugin I get the preview on the fly while with airsane it hangs for multiple seconds after a page is scanned and displays the preview only then.
/sane scanimage -d "airscan:e0:Hewlett-Packard hp_LaserJet_3380" -b
Output format is not set, using pnm as a default.
Scanning infinity pages, incrementing by 1, numbering from 1
Scanning page 1
Scanned page 1. (scanner status = 5)
Scanning page 2
scanimage: sane_read: Error during device I/O
Scanned page 2. (scanner status = 9)
Batch terminated, 2 pages scanned
Lines in airsaned output after the client error:
Sep 27 15:22:18 rpi4 airsaned[105150]: hpaio: hpaioScannerToSaneError: pmlError=0.
Sep 27 15:22:19 rpi4 airsaned[105150]: io/hpmud/musb.c 976: removed HP-SCAN channel=4 clientCnt=0 channelCnt=1
Sep 27 15:22:19 rpi4 airsaned[105150]: io/hpmud/musb.c 562: released 7/1/3 interface
Sep 27 15:22:20 rpi4 airsaned[105150]: io/hpmud/musb.c 976: removed HP-MESSAGE channel=1 clientCnt=0 channelCnt=0
Sep 27 15:22:20 rpi4 airsaned[105150]: sane_hpaio_cancel: already cancelled!
Sep 27 15:22:20 rpi4 airsaned[105150]: io/hpmud/hpmud.c 721: invalid channel_write state
Sep 27 15:22:20 rpi4 airsaned[105150]: io/hpmud/pml.c 374: SetPml channel_write failed ret=31
I also noticed it scans way slower than with the net plugin and hangs when a half of the first page is printed. It finishes scanning the first page though, starts scanning the second one, hangs and errors out.
With the net plugin, it works fast and scans as it should.
OK, so you have a machine on the network which is physically attached to the scanner, and that machine is running both saned
and airsaned
. You try scanning from a second machine using gnome-scan, once through the saned
protocol, and once through the eSCL/AirScan
protocol. With the saned
protocol, it works fine, with eSCL
it does not.
Is that correct?
Yes, absolutely correct.
When I asked for the scanimage
output, I was referring to the machine the scanner is attached to, not the network. Sorry if I was unclear.
The log from airsaned
contains information from the SANE hpaio driver, not from airsaned
itself. If you want output from airsaned
, run it with --debug=true
as an argument.
Here it is:
ilya@rpi4 /sane scanimage -d "hpaio:/usb/hp_LaserJet_3380?serial=00CNBN115268" -b
Output format is not set, using pnm as a default.
Scanning infinity pages, incrementing by 1, numbering from 1
Scanning page 1
Scanned page 1. (scanner status = 5)
Scanning page 2
Scanned page 2. (scanner status = 5)
Scanning page 3
scanimage: sane_start: Error during device I/O
Batch terminated, 2 pages scanned
(for whatever reason it thought there's a third page but there were only two so it expectedly failed when attempting to scan the third one)
Sep 27 15:42:55 rpi4 airsaned[121557]: hpaio: hpaioScannerToSaneError: pmlError=0.
Sep 27 15:42:55 rpi4 airsaned[121557]: sane_cancel(0x7f74048b70)
Sep 27 15:42:55 rpi4 airsaned[121557]: io/hpmud/musb.c 976: removed HP-SCAN channel=4 clientCnt=0 channelCnt=1
Sep 27 15:42:55 rpi4 airsaned[121557]: io/hpmud/musb.c 562: released 7/1/3 interface
Sep 27 15:42:56 rpi4 airsaned[121557]: io/hpmud/musb.c 976: removed HP-MESSAGE channel=1 clientCnt=0 channelCnt=0
Sep 27 15:42:56 rpi4 airsaned[121557]: sane_cancel(0x7f74048b70)
Sep 27 15:42:56 rpi4 airsaned[121557]: sane_close(0x7f74048b70)
Sep 27 15:42:56 rpi4 airsaned[121557]: sane_hpaio_cancel: already cancelled!
Sep 27 15:42:56 rpi4 airsaned[121557]: sane_exit()
Sep 27 15:42:56 rpi4 airsaned[121557]: io/hpmud/hpmud.c 721: invalid channel_write state
Sep 27 15:42:56 rpi4 airsaned[121557]: io/hpmud/pml.c 374: SetPml channel_write failed ret=31
I see the scanner prints "Device is busy. Try again later." on its display when airsaned fails.
Another test I ask you to perform: If you go to <ip-of-scanserver>:8090
, follow the link to your scanner, and choose "Feeder" and "PDF" as data format, will you be able to scan multiple pages without error? Thank you!
Seem to work just fine!
This log entry is strange:
hpaio: hpaioScannerToSaneError: pmlError=0.
It basically says "there is no error" but still results in aborting the scan (as viewed from hpaio's side, whereas the scanner itself seems to be fine).
Which version of HPLIP do you have installed? The current one (3.23.8) is relatively new, and may be downloaded from SourceForge (https://sourceforge.net/projects/hplip/files/hplip/) if you want to give it a try.
3.23.5
I have this problem since I started using airsaned (2 years)
Do you have a macOS or Windows 10/11 machine or VM around to test? That AirSane's web interface works suggests the issue might not be on the server side but on the client side, so trying a different client might lead to some insight.
I have a Mopria on smartphone. Would that work for the test?
I think so, yes. If you start a scan from the feeder, will it behave well?
Mopria Scan has the same problem with the same log
Sep 27 18:35:12 rpi4 airsaned[121557]: hpaio: hpaioScannerToSaneError: pmlError=0.
Sep 27 18:35:12 rpi4 airsaned[121557]: sane_cancel(0x7f74044fb0)
Sep 27 18:35:12 rpi4 airsaned[121557]: io/hpmud/musb.c 976: removed HP-SCAN channel=4 clientCnt=0 channelCnt=1
Sep 27 18:35:12 rpi4 airsaned[121557]: io/hpmud/musb.c 562: released 7/1/3 interface
Sep 27 18:35:13 rpi4 airsaned[121557]: io/hpmud/musb.c 976: removed HP-MESSAGE channel=1 clientCnt=0 channelCnt=0
Sep 27 18:35:13 rpi4 airsaned[121557]: sane_cancel(0x7f74044fb0)
Sep 27 18:35:13 rpi4 airsaned[121557]: sane_close(0x7f74044fb0)
Sep 27 18:35:13 rpi4 airsaned[121557]: sane_hpaio_cancel: already cancelled!
Sep 27 18:35:13 rpi4 airsaned[121557]: sane_exit()
Sep 27 18:35:13 rpi4 airsaned[121557]: io/hpmud/hpmud.c 721: invalid channel_write state
Sep 27 18:35:13 rpi4 airsaned[121557]: io/hpmud/pml.c 374: SetPml channel_write failed ret=31
Thanks for the log. Maybe I can fix the issue.
As my problem is similar with a Brother MFP7360N scanner , I did a scan from the web GUI and it worked for me too. There seems to be no issue for the GUI .
What I am noticing however is that on feeder scans over escl protocol to AirSane files start to transfer before the scanning is complete. After having worked a lot with this escl protocol on my own projects, it seems to me that the files should not begin to transfer until all pages have been scanned.
I have modified AirSane to improve behavior with ADFs. Please give it a try.
It says that the scanning has ended due to ADF error but otherwise works fine now, scans all the pages. Not sure whose fault it is, the ADF state is not really good and I have to help it to avoid paper jam.
It scans only 1.5 page and then hangs
Scanning with feeder via the net plugin works just fine