weird scanner issues with exagear

weird scanner issues with exagear

Postby penguinjeff » Fri Jan 05, 2018 1:46 pm

I have a brother printer MFC240C
I have been using it successfully as a printer under exagear on my raspberry pi for some time.
I have been working on a project to scan from a webpage
https://bitbucket.org/jeffsadowski/phpsaneng
Which I recently finished the part I needed to start testing scanning.
It worked great on the test scanner so I wanted to try it out on my brother scanner.
And here is where I hit a few snags.

If I try scanning from the command line I get some weird behavior.

scanimage -L

shows

brother2:bus1;dev1

as my device name so I have to quote it as expected as I use to use this scanner on a true x86 system

scanimage -h -d 'brother2:bus1;dev1'

shows me the max x and y values so I try the command

Code: Select all
/usr/bin/scanimage  "-v" "-p" "--batch=preview.jpg" "--batch-count" "1" "--format" "jpeg" "-l" "0" "-t" "0" "-x" "215.9" "-y" "355.6" "-d" "brother2:bus1;dev1"

and this appears to work. The scanner starts scanning and data seems to be coming.

Code: Select all
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567
Scanning 1 pages, incrementing by 1, numbering from 1
Scanning page 1
scanimage: scanning image of size 1648x2314 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
Progress: 100%
scanimage: min/max graylevel value = 11/255
scanimage: read 11440416 bytes in total
Scanned page 1. (scanner status = 5)


When it finishes I try to look at the file and it isn't proper.

I tried opening the file with "hexdump -c preview.jpg|head"

Code: Select all
0000000   P   6  \n   #       S   A   N   E       d   a   t   a       f
0000010   o   l   l   o   w   s  \n   1   6   4   8       2   3   1   4
0000020  \n   2   5   5  \n  \f 021 031  \r 022 032  \f 021 030  \f 021
0000030 030  \f 021 030  \f 021 030  \f 021 030  \r 022 031  \r 022 031
0000040  \f 023 031  \f 021 030  \f 021 030  \f 021 030  \f 021 031  \f
0000050 021 030  \f 021 030  \f 021 030  \v 020 027  \f 021 030  \r 022
0000060 031  \v 020 027  \r 022 031  \f 023 031  \f 021 030  \f 021 030
0000070  \v 020 027  \r 022 032  \r 022 031  \f 021 030  \f 021 030  \f
0000080 021 030  \f 021 030  \f 021 030  \v 020 027  \f 021 030  \f 021
0000090 030  \f 021 030  \f 021 030  \r 022 031  \r 024 032  \f 023 031


And I can clearly see text in the file that doesn't look right.

Code: Select all
P6
# SANE data follows


I have been using scanners for some time now and I decided on another approach first using saned.

saned without -d 2 or greater just exits

if I put "saned -d 2" in a loop it seems to allow me to get most of the way.

from my other server I can see the scanner as

net:192.168.1.27:brother2:bus1;dev1

It lets me start scanning

Code: Select all
/usr/bin/scanimage  "-v" "-p" "--batch=preview.jpg" "--batch-count" "1" "--format" "jpeg" "-l" "0" "-t" "0" "-x" "215.9" "-y" "355.6" "-d" "net:192.168.1.27:brother2:bus1;dev1"


after it gets to about 96% it dies

Code: Select all
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567
Scanning 1 page, incrementing by 1, numbering from 1
Scanning page 1
scanimage: scanning image of size 1648x2314 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
Progress: 96%
scanimage: min/max graylevel value = 11/255
Application transferred too few scanlines


however its preview.jpg.part file the image it was getting Is viewable with a error of incomplete.

hexdump -c preview.jpg.part|head looks like so

Code: Select all
0000000 377 330 377 340  \0 020   J   F   I   F  \0 001 001 001  \0 310
0000010  \0 310  \0  \0 377 333  \0   C  \0  \b 006 006  \a 006 005  \b
0000020  \a  \a  \a  \t  \t  \b  \n  \f 024  \r  \f  \v  \v  \f 031 022
0000030 023 017 024 035 032 037 036 035 032 034 034       $   .   '   
0000040   "   ,   # 034 034   (   7   )   ,   0   1   4   4   4 037   '
0000050   9   =   8   2   <   .   3   4   2 377 333  \0   C 001  \t  \t
0000060  \t  \f  \v  \f 030  \r  \r 030   2   ! 034   !   2   2   2   2
0000070   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
*
0000090   2   2   2   2   2   2   2   2   2   2   2   2   2   2 377 300


I'd like to get past these issues if anyone has had any ideas?
penguinjeff
 
Posts: 8
Joined: Thu Sep 14, 2017 7:56 am

Re: weird scanner issues with exagear

Postby penguinjeff » Sat Jan 06, 2018 9:59 pm

So after some research the output file I was getting from scanimage directly connected was a pnm file. Turns out scanimage on the debian virtual os only supports pnm and tiff.
That just isn't going to work for me. Maybe I can install a different image.
penguinjeff
 
Posts: 8
Joined: Thu Sep 14, 2017 7:56 am

Re: weird scanner issues with exagear

Postby goha » Thu Mar 22, 2018 2:40 pm

penguinjeff wrote:Maybe I can install a different image.


If the host image is Ubuntu Mate thenthe guest x86 image willbe Ubuntu 16.04. Just reinstall ExaGear from scratch on ARM Ubuntu Mate.
goha
 
Posts: 150
Joined: Wed Oct 08, 2014 9:22 am


Return to ExaGear Desktop

Who is online

Users browsing this forum: No registered users and 5 guests