Closed gh0ztbuster closed 1 year ago
Thank you for the detailed report. Does this exception happen on the very first call to acquireImage, or on the 2nd or subsequent?
First call to acquireImage, I tried only doing one acquisition as well, didn't work.
Upon further investigation, I discovered an additional option titled "Number of options":
option [name=, title=Number of options, type=BOOLEAN, units=UNIT_NONE]
I am unsure whether this is an intended feature, but thought I should mention it just in case.
This is the complete list of options (there were no null options in the list):
option [name=, title=Number of options, type=BOOLEAN, units=UNIT_NONE] option [name=mode, title=Scan mode, type=STRING, units=UNIT_NONE] option [name=resolution, title=Scan resolution, type=INT, units=UNIT_DPI] option [name=source, title=Scan source, type=STRING, units=UNIT_NONE] option [name=brightness, title=Brightness, type=FIXED, units=UNIT_PERCENT] option [name=contrast, title=Contrast, type=FIXED, units=UNIT_PERCENT] option [name=MultifeedDetection, title=Multifeed Detection, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDocumentSize, title=Auto Document Size, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDeskew, title=Auto Deskew, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPage, title=Skip Blank Page, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPageSensitivity, title=Skip Blank Page sensitivity, type=FIXED, units=UNIT_PERCENT] option [name=tl-x, title=Top-left x, type=FIXED, units=UNIT_MM] option [name=tl-y, title=Top-left y, type=FIXED, units=UNIT_MM] option [name=br-x, title=Bottom-right x, type=FIXED, units=UNIT_MM] option [name=br-y, title=Bottom-right y, type=FIXED, units=UNIT_MM]
The scanner runs at over 40 pages per minute; I am unsure as to whether this could have an effect as well.
I have found a quick fix by downgrading to brother config 4 instead of 5 (although I lose some options):
sudo brsaneconfig5 -r CustomScanner sudo brsaneconfig4 -a name=CustomScanner model=ADS-2800W ip=xx.xx.xx.xx
I lose the following options by doing so making this a less than idea fix:
option [name=MultifeedDetection, title=Multifeed Detection, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDocumentSize, title=Auto Document Size, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDeskew, title=Auto Deskew, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPage, title=Skip Blank Page, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPageSensitivity, title=Skip Blank Page sensitivity, type=FIXED, units=UNIT_PERCENT]
I will also attempt to reach out to Brother with respect to the sane driver.
The thing that bothers me is that Xsane and other front-end sane worked on brscan5, just not this implementation.
I have found a quick fix by downgrading to brother config 4 instead of 5 (although I lose some options):
sudo brsaneconfig5 -r CustomScanner sudo brsaneconfig4 -a name=CustomScanner model=ADS-2800W ip=xx.xx.xx.xx
I lose the following options by doing so making this a less than idea fix:
option [name=MultifeedDetection, title=Multifeed Detection, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDocumentSize, title=Auto Document Size, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDeskew, title=Auto Deskew, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPage, title=Skip Blank Page, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPageSensitivity, title=Skip Blank Page sensitivity, type=FIXED, units=UNIT_PERCENT]
I will also attempt to reach out to Brother with respect to the sane driver.
The thing that bothers me is that Xsane and other front-end sane worked on brscan5, just not this implementation.
The device is unusable without these features. Xsane allows me to enable all of them perfectly fine in brsaneconfig5:
"XSANE_DEVICE_RC" "Brother:CustomScanner" "xsane-version" "0.999" "mode" "24bit Color[Fast]" "resolution" 100 "source" "Automatic Document Feeder(left aligned,Duplex)" "MultifeedDetection" 1 "AutoDocumentSize" 1 "AutoDeskew" 1 "SkipBlankPage" 1 "SkipBlankPageSensitivity" 3276800 "tl-x" 0 "tl-y" 0 "br-x" 13885807 "br-y" 23302468 ...
Closing was an accident ^
Upon further investigation, I discovered an additional option titled "Number of options":
option [name=, title=Number of options, type=BOOLEAN, units=UNIT_NONE]
I am unsure whether this is an intended feature, but thought I should mention it just in case.
This is the complete list of options (there were no null options in the list):
option [name=, title=Number of options, type=BOOLEAN, units=UNIT_NONE] option [name=mode, title=Scan mode, type=STRING, units=UNIT_NONE] option [name=resolution, title=Scan resolution, type=INT, units=UNIT_DPI] option [name=source, title=Scan source, type=STRING, units=UNIT_NONE] option [name=brightness, title=Brightness, type=FIXED, units=UNIT_PERCENT] option [name=contrast, title=Contrast, type=FIXED, units=UNIT_PERCENT] option [name=MultifeedDetection, title=Multifeed Detection, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDocumentSize, title=Auto Document Size, type=BOOLEAN, units=UNIT_NONE] option [name=AutoDeskew, title=Auto Deskew, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPage, title=Skip Blank Page, type=BOOLEAN, units=UNIT_NONE] option [name=SkipBlankPageSensitivity, title=Skip Blank Page sensitivity, type=FIXED, units=UNIT_PERCENT] option [name=tl-x, title=Top-left x, type=FIXED, units=UNIT_MM] option [name=tl-y, title=Top-left y, type=FIXED, units=UNIT_MM] option [name=br-x, title=Bottom-right x, type=FIXED, units=UNIT_MM] option [name=br-y, title=Bottom-right y, type=FIXED, units=UNIT_MM]
Confirmed that "Number of options" was present with the brsaneconfig4 which worked, is likely not related.
I take notice that Xsane seems to save these as integers and not doubles:
"SkipBlankPageSensitivity" 3276800 "tl-x" 0 "tl-y" 0 "br-x" 13885807 "br-y" 23302468
I wonder if this could have something to do with it.
Also, I take notice that this is the first time (excluding "Number of options") that boolean is used:
"MultifeedDetection" 1 "AutoDocumentSize" 1 "AutoDeskew" 1 "SkipBlankPage" 1
CONFIRMED: The firmware is up to date. [R1512]
scanadf for the device fails...
scanadf --verbose --device-name "brother5:net1;dev0" --resolution 150 --MultifeedDetection=yes --AutoDocumentSize=yes --AutoDeskew=yes --SkipBlankPage=yes -o "/tmp/testscan%04d.pnm" Segmentation fault (core dumped) scanadf --verbose --device-name "brother5:net1;dev0" -o "/tmp/testscan%04d.pnm" Segmentation fault (core dumped)
scanimage for the device succeeds...
scanimage --device-name "brother5:net1;dev0" --resolution 150 --MultifeedDetection=yes --AutoDocumentSize=yes --AutoDeskew=yes --SkipBlankPage=yes > "/tmp/testscan.pnm" scanimage: rounded value of br-x from 215.9 to 215.88 scanimage: rounded value of br-y from 355.6 to 355.567
can confirm the issue with brother ADS-3600W also
quick update on this, i debugged and figured out, that this is not an issue with jfreesane but an issue with saned instead, https://gitlab.com/sane-project/backends/-/issues/478 link for reference
Nicely done, thank you!
Ubuntu 18.04 (5.4.0-67-generic) Xsane and Simple Scan works I have tested various device options given the error but have been unsuccessful:
The error:
Xsane works with these device settings (Brother:CustomScanner.drc):
My code:
I used brother sane drivers (https://download.brother.com/welcome/dlf104033/brscan5-1.2.6-0.amd64.deb):
Various options provided by printer: DEFAULTS:
CONSTRAINTS:
scanimage -h: