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

HP LaserJet MFP m436dn scanimage commands work sometimes, not others #174

Open
colinbrogan opened this issue Sep 2, 2021 · 1 comment
Open

Comments

@colinbrogan
Copy link

I am running scanserv-js (which I know is not your software) on a raspberry pi. I got it working by building your sane-airscan from source, and using it exclusively as the backend for sane (I commented everything else out). It is operating over a standard ethernet connection (no ipp over usb business).

I've noticed that it will work some times, and not others. Below are the commands ran by scanserv-js to scanimage:

/usr/bin/scanimage -d 'airscan:w1:HP LaserJet MFP M436 (NPI846449)' --mode 'Gray' --source 'Flatbed' --resolution 100 -l 0 -t 0 -x 129 -y 198.7 --format 'tiff' --brightness 0 --contrast 0 > data/temp/~tmp-scan-0-0001.tif

When it fails, I get this result:
exited with code: 1, stderr: scanimage: open of device airscan:w1:HP LaserJet MFP M436 (NPI846449) failed: Invalid argument

Another command (preview button):
/usr/bin/scanimage -d 'airscan:w1:HP LaserJet MFP M436 (NPI846449)' --mode 'Gray' --source 'Flatbed' --resolution 100 -l 0 -t 0 -x 297 -y 420 --format 'tiff' --brightness 0 --contrast 0 > data/temp/~tmp-scan-0-0001.tif > data/preview/preview.tif

When it fails, I get this result:
exited with code: 9, stderr: scanimage: sane_read: Error during device I/O

I've noticed that sometimes these commands trigger the MFP to scan (I can hear it), and when they fail, they usually don't trigger the MFP at all (no noises from the MFP). It almost seems as if scanimage (through your sane-airscan backend) is having trouble "waking up" the printer (sometimes it will wake it up from sleep, sometimes not).

Let me know if you need any log reports. I don't know where the sane logs are, but if you tell me where they are, I am happy to output the results.

@heinrichat
Copy link

It almost seems as if scanimage (through your sane-airscan backend) is having trouble "waking up" the printer (sometimes it will wake it up from sleep, sometimes not).

For me it doesn't wake up the printer when scanning via the ADF. When scanning via flatbed it always works.
A workaround I found is to issue scanimage -T to wake it up remotely.

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