Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airsane discards backend without scan area options (ricoh2) #123

Open
ValdikSS opened this issue May 9, 2024 · 5 comments
Open

Airsane discards backend without scan area options (ricoh2) #123

ValdikSS opened this issue May 9, 2024 · 5 comments

Comments

@ValdikSS
Copy link

ValdikSS commented May 9, 2024

AirSane/server/scanner.cpp

Lines 607 to 608 in 776acdc

if (tl_x.is_null() || tl_y.is_null() || br_x.is_null() || br_y.is_null())
return "missing scan area parameter(s)";

Full log (spoiler)
git commit: a908079 (branch HEAD, rev 280+)
build date: 2024-03-10T13:40:19Z
reading access rules from file /etc/airsane/access.conf
start time is 14287.55
reading device options from '/etc/airsane/options.conf'
enumerating  devices...
sane_init(nullptr, nullptr)
sane_get_devices() ...
... sane_get_devices() -> SANE_Status Success
sane_exit()
found: ricoh2:libusb:001:002 (Ricoh Aficio SP-100SU)
stable unique name: ricoh2:Ricoh Aficio SP-100SU:1
uuid: f59be082-7322-551d-8b38-2e32f8840b53
sane_init(nullptr, nullptr)
sane_open(ricoh2:libusb:001:002) -> 0xb45a7790
sane_close(0xb45a7790)
sane_exit()
error: missing scan area parameter(s)
end time is 14296.45
startup took 8.90 secconds
listening on 127.0.0.1:8090
listening on 192.168.54.1:8090
listening on 192.168.0.13:8090
listening on [::1]:8090
listening on [fe80::208:22ff:fef3:a8c6]:8090
allowing 127.0.0.1: access file is empty

Airsane does not accept printers which backend does not supply scan area parameters. One of such backend is ricoh2.

SANE documentation states that the frontend MUST accept scanners with this parameter missing.

A frontend must work properly with any or all of these options missing.

Also filled bug in sane: https://gitlab.com/sane-project/backends/-/issues/750

@SimulPiscator
Copy link
Owner

SimulPiscator commented May 10, 2024

Thanks!
Though I don't know how to fix it.
I'm getting the maximum scan area from those parameters, and eSCL requires me to publish that. So I would need to publish a fake scan area, and ignore any scan area user settings. I'm not sure whether that works out.

@ValdikSS
Copy link
Author

So I would need to publish a fake scan area, and ignore any scan area user settings.

Yes, I guess the default value would be Letter or A4 for most devices.

@SimulPiscator
Copy link
Owner

eSCL will now announce a max scan area width of 216mm (US Letter) and a max scan area height of 297mm (A4). That should accommodate for most cases.

I need to ask you to test with the Ricoh scanner because I don't have such a device available.

@ValdikSS
Copy link
Author

It detects the scanner now but fails to scan. Can't tell whether this is an AirSane fail or just the backend, will debug further in several weeks.

P.S. also just wanted to be sure that you have received my emails and not interested in the donation.

@SimulPiscator
Copy link
Owner

Thanks for debugging it.

Regarding the donation, "not interested" would not be quite accurate. I just don't think it is the time now.
Anyway, I am very happy with the popularity boost you gave AirSane through your project, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants