Closed ilya-fedin closed 2 years ago
The [compression] = "JPEG" setting might be a problem. Try
compression=None
in /etc/airsane/options.conf.
Looks like airsane doesn't understand that line, I'm still getting [compression] = "JPEG"
in debug mode
Oh, it's because there's a device genesys:.*
line and I added the line to the end of the file.
So, the error in normal mode is still the same:
окт 16 00:37:32 rpi4 airsaned[25408]: sane_hpaio_cancel: already cancelled!
окт 16 00:37:32 rpi4 airsaned[25408]: io/hpmud/hpmud.c 721: invalid channel_write state
окт 16 00:37:32 rpi4 airsaned[25408]: io/hpmud/pml.c 374: SetPml channel_write failed ret=31
And I don't see any difference except of compression in debug mode:
git commit: 145ea99 (branch makepkg, rev 207+)
build date: 2021-10-15T19:16:40Z
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()
found: hpaio:/usb/hp_LaserJet_3380?serial=00CNBN115268 (Hewlett-Packard hp_LaserJet_3380)
stable unique name: hpaio:Hewlett-Packard hp_LaserJet_3380:1
uuid: 8fcc35e8-d849-578c-860a-c338aecd370f
sane_init(nullptr, nullptr)
sane_open(hpaio:/usb/hp_LaserJet_3380?serial=00CNBN115268) -> 0xb3536370
applying SANE option compression:=None
[compression] := "None" -> reload options
[source] := "ADF"
sane_close(0xb3536370)
sane_exit()
published as 'Hewlett-Packard hp_LaserJet_3380'
listening on 127.0.0.1:8090
listening on 192.168.1.254:8090
listening on 172.18.0.1:8090
listening on 172.19.0.1:8090
listening on 172.17.0.1:8090
listening on [::1]:8090
listening on [fe80::dea6:32ff:fe0d:eed6]:8090
listening on [fe80::42:a7ff:fe87:54be]:8090
listening on [fe80::42:21ff:fe08:9ac]:8090
listening on [fe80::f468:e7ff:fe5a:d433]:8090
listening on [fe80::7494:1dff:fe8f:37be]:8090
listening on [fe80::58c4:8eff:fed8:f177]:8090
document format requested: application/pdf
document format used: application/pdf
job kind: ADF single
using color gamma of 0.555555
sane_init(nullptr, nullptr)
sane_open(hpaio:/usb/hp_LaserJet_3380?serial=00CNBN115268) -> 0xaf20a6a8
[compression] := "None" -> reload options
[mode] := "Color"
[source] := "ADF"
[resolution] := 200dpi
[tl-x] := 0mm
[tl-y] := 0mm
[br-x] := 210mm
[br-y] := 297mm
sane_start(0xaf20a6a8) with options:
[batch-scan] = 0
[br-x] = 210mm
[br-y] = 297mm
[brightness] = 0
[compression] = "None"
[contrast] = 0
[length-measurement] = "Padded"
[mode] = "Color"
[resolution] = 200dpi
[source] = "ADF"
[tl-x] = 0mm
[tl-y] = 0mm
sane_cancel(0xaf20a6a8)
sane_cancel(0xaf20a6a8)
sane_close(0xaf20a6a8)
sane_exit()
Interesting, looks like airsane sets source to ADF forecfully and I'm not able to override that even with options.conf. scanimage says that the regular default is Auto:
--source Auto|ADF [Auto]
Selects the scan source (such as a document-feeder).
Apparently, that's the reason for fail since I put the sheet into the platen and the feeder is empty
:thinking:
I applied such a patch:
diff --git a/server/scanner.cpp b/server/scanner.cpp
index ed789c5..a2268c0 100644
--- a/server/scanner.cpp
+++ b/server/scanner.cpp
@@ -76,6 +76,8 @@ findFlatbedName(const std::vector<std::string>& names)
auto i = std::find(names.begin(), names.end(), "Flatbed");
if (i == names.end())
i = std::find(names.begin(), names.end(), "FlatBed");
+ if (i == names.end())
+ i = std::find(names.begin(), names.end(), "Auto");
if (i == names.end())
return "";
return *i;
And scanning started to work!
Cool, thank you! But doesn't "Auto" mean "use flatbed if no paper is in ADF"?
But doesn't "Auto" mean "use flatbed if no paper is in ADF"?
Most likely, yeah. I don't know whether there's any equivalent of 'Auto' in AirScan protocol, so I just made a fast hack to check whether my assumption is right or not :)
No, there is no equivalent of "Auto" in the AirScan protocol. I don't know how to handle this case.
I guess 'Auto' can mean only two things in practice:
I think you are right, I'll take your patch.
I have a weird issue that airsane detects the scanner, but can't scan (tried with mopria & web interface, both failing) while scanimage started as the same user works just fine.
Here's the log running in normal mode:
Here's the log running in debug mode: