LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Unable to scan with XSane (https://www.linuxquestions.org/questions/slackware-14/unable-to-scan-with-xsane-4175500812/)

seskanda 04-07-2014 12:55 AM

Unable to scan with XSane
 
I have Slackware 64 14.1 and a Brother MFC-J870DW AIO. XSane detects the brother scanner, but when i click "Acquire preview" or "Scan" XSane just quits without any error message at all. I'm logged in as root, and run XSane with root privileges. Is there a logfile created somewhere that reports what happens on the exit?

Thanks in advance

allend 04-07-2014 02:23 AM

My Brother MFC-J825DW fails to scan when the default 24bit Color(Fast) scan mode is used. All is OK when I change to the 24bit Color scan mode.

The output of 'scanimage --help' on my setup is shown here. http://www.linuxquestions.org/questi...ml#post4871056

seskanda 04-07-2014 10:29 AM

Unfortunately, XSane 0.998 only gives me a 24 bit Color(fast) color mode, the other options are Black & White, True Gray, and Gray(Error Diffusion). Or are you using the scanimage command to do regular 24-bit color mode? If so, any way to get XSane in 24 bit color mode?

cwizardone 04-07-2014 01:54 PM

1 Attachment(s)
Quote:

Originally Posted by seskanda (Post 5147924)
...I'm logged in as root, and run XSane with root privileges...

Here is a list of Brother scanners supported by Sane:

http://sane-project.org/sane-mfgs.html#Z-BROTHER


Were you able to scan as user (whatever your user name)?
Xsane issues a warning when you fire it up as root.

allend 04-07-2014 07:00 PM

XSane can only use the modes that are supplied by the driver. I was actually using an earlier version of the Brother scanner driver (0.4.1-3) installed from a package built from brscan4-0.4.1-3.x86_64.rpm according to the method at SlackDocs. http://docs.slackware.com/howtos:har...installation?s[]=brother

I have downloaded and installed the latest scanner driver (0.4.2-1) now available from Brother that supports both my MFC-J825DW and your MFC-J870DW. I have no problems seeing the 24Bit Color mode or scanning from XSane.

seskanda 04-08-2014 01:29 AM

I installed the printer driver using the directions from Brother's FAQ: http://support.brother.com/g/s/id/li...&redirect=on#1 which says to use alien with -t and -c options. I used the same link provided from slackdocs to install the scanner, except I skipped the sections "Reviewing and updating the converted packages" and "Create a symlink" since I do not understand what ../ means in the first and third commands. So what i did is use alien to make the slackware package for the scanner, but when i install that XSane is still missing the 24 bit color mode


Also, the scanimage command does not show 24 bit color mode as well

Code:

Options specific to device `brother4:bus2;dev3':
  Mode:
    --mode Black & White|Gray[Error Diffusion]|True Gray|24bit Color[Fast] [24bit Color[Fast]]
        Select the scan mode
    --resolution 100|150|200|300|400|600|1200|2400|4800|9600dpi [200]
        Sets the resolution of the scanned image.
    --source FlatBed|Automatic Document Feeder(left aligned)|Automatic Document Feeder(centrally aligned) [Automatic Document Feeder(left aligned)]
        Selects the scan source (such as a document-feeder).
    --brightness -50..50% (in steps of 1) [inactive]
        Controls the brightness of the acquired image.
    --contrast -50..50% (in steps of 1) [inactive]
        Controls the contrast of the acquired image.
  Geometry:
    -l 0..215.9mm (in steps of 0.0999908) [0]
        Top-left x position of scan area.
    -t 0..355.6mm (in steps of 0.0999908) [0]
        Top-left y position of scan area.
    -x 0..215.9mm (in steps of 0.0999908) [215.88]
        Width of scan-area.
    -y 0..355.6mm (in steps of 0.0999908) [355.567]
        Height of scan-area.

And when i try scanimage it produces a 37 byte file that's literally blank. Either the latest scanner driver disabled 24 bit color mode for my MFC-J870DW, it simply does not support that mode, or i'm not installed the scanner driver correctly. I'd need an earlier scanner driver to confirm if the one i have is the issue, please can someone attach or link to an older brscan4 64 bit driver?

allend 04-08-2014 02:12 AM

This is starting to look like a bug in the Brother driver.
Just for giggles, can you run brsaneconfig4 specifying 'model=MFC-J825DW' and then collect the output of 'scanimage --help'? I am curious as to whether the 24bit Color mode then shows, as we know that it works with a genuine MFC-J825DW.

I do have a copy of the original 64bit rpm and a Slackware package prepared from it for the version 0.4.1-3 driver, but I cannot access them until I get home later. Feel free to PM me with an email address if you would like me to supply copies.

Quote:

used the same link provided from slackdocs to install the scanner, except I skipped the sections "Reviewing and updating the converted packages" and "Create a symlink"
This should not be problem. The symlink is only used when installing the printer driver.

Quote:

So what i did is use alien to make the slackware package for the scanner,
I have never used alien, but other people have reported that it has worked for them. The SlackDocs page shows a package conversion method that can be done using tools in a default Slackware install.

allend 04-08-2014 06:58 AM

One other thought I have had is to check that your MFC-J870DW is using the latest firmware. I have a multiboot machine, so I use the Brother Windows tool for this.

seskanda 04-08-2014 05:30 PM

I ran the brsaneconfig4 command exactly as shown in the slackdocs link provided above, but "scanimage --help", after several minutes, gives me:

Code:

scanimage: open of device SCANNER failed: Invalid argument
Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

Quote:

I do have a copy of the original 64bit rpm and a Slackware package prepared from it for the version 0.4.1-3 driver, but I cannot access them until I get home later. Feel free to PM me with an email address if you would like me to supply copies.
My account is not able to send or receive PMs. I'd appreciate it if you'd upload the file on some site, and provide the link in this thread. Also, do you know the date of the older driver? The MFC-J870DW is fairly new model, from less than a year ago, so it possible the old driver may not support MFC-J870DW.

Quote:

I have never used alien, but other people have reported that it has worked for them. The SlackDocs page shows a package conversion method that can be done using tools in a default Slackware install.
Since, unlike in Windows, the printer and scanner driver are separate, they do not depend on each other. So it should not matter whether alien or rpm2txz is used. Although, i prefer the way in the slackdocs link as there is no need to install anything, and it adds a description to the package in pkgtool.


Quote:

One other thought I have had is to check that your MFC-J870DW is using the latest firmware. I have a multiboot machine, so I use the Brother Windows tool for this.
I also have a multiboot setup. I'm wondering what Brother Windows tool shows firmware? When i access the MFC-J870DW directly via its onscreen controls, it leads me to Firmware Version D.

allend 04-08-2014 06:46 PM

Quote:

I ran the brsaneconfig4 command exactly as shown in the slackdocs link
That command would need to be modified to suit your setup, as it is for a device with a network connection, whereas you appear to be using a USB connection. Try 'brsaneconfig4 -a name=SCANNER model=MFC-J825DW' and 'brsaneconfig4 -d' for diagnostic information.

The 0.4.1-3 software version I have is earlier than 29 December 2012, which is when I downloaded. I think you will need to use the latest software version. I note that there is an entry for your model in /etc/opt/brother/scanner/brscan4//models4/ext_7.ini whereas the entry for my model is in /etc/opt/brother/scanner/brscan4//models4/ext_1.ini

I would just use the Firmware Update tool from within Windows to check that the firmware is up to date.

I am concerned that the MFC-J870DW is not reporting the 24bit Color option. I do not think that you are doing anything wrong. I suggest that you contact Brother support directly about this issue. I have done so in the past and have always received quick, courteous and knowledgeable replies.

seskanda 04-09-2014 10:01 AM

When i ran 'brsaneconfig4 -a name=SCANNER model=MFC-J825DW' i get Invalid argument 0. And scanimage --help gives me 'scanimage: open of device brother4:net1;dev0 failed: Invalid argument. Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.' I see your other driver is too old for the MFC-J870DW, but if their is an entry for my model, it may work, please can you upload it and provide the link here? The Firmware Update Tool does not report the current firmware version, it checks for newest version, and automatically updates it.

Quote:

I am concerned that the MFC-J870DW is not reporting the 24bit Color option. I do not think that you are doing anything wrong. I suggest that you contact Brother support directly about this issue. I have done so in the past and have always received quick, courteous and knowledgeable replies.
Well, i did contact the Live Chat, once I mentioned my OS is Linux, they told me they cannot provide phone or chat support, but sent me to this link: http://www.brother-usa.com/FAQs/Solu...2#.U0VgEPFVHeR where i filled out a form in the first link, and they are supposed to respond by the end of today, but I doubt it. I did manage to get an actual e-mail address for Brother's linux support, I'll try that if all else fails. They clearly are not knowledgeable, at least when it comes to Linux, which is to be expected.

seskanda 04-10-2014 10:13 AM

Well, i found an older driver version 0.4.1-6 from August 2013, and it is still missing a 24-bit color mode. I guess that means it is disabled in the driver for the MFC-J870DW, either intentionally or unintentionally, I'm not installing it right, or the firmware does not support it. I doubt a f/w upgrade will fix it, unless it specifically addresses this issue. I may be better off doing a f/w downgrade, if that's at all possible. As expected, i heard nothing back from Brother, it's time to e-mail them directly now. I will install the MFC-J870DW on Ubuntu and see if scanning in color works.

allend 04-10-2014 11:50 AM

There is a report that that your MFC-J870DW _will_ work. http://forums.linuxmint.com/viewtopic.php?f=51&t=161673
Are you sure that you have the right driver package? i.e. brscan4-0.4.2-1.x86_64.rpm
Brother printer drivers are 32bit only, but the scanner drivers are available in 32bit and 64bit versions.

Your expectations of service and mine obviously differ. If I get a response within 36 hours of an initial email, then I consider that fast.

seskanda 04-11-2014 01:19 AM

I'm absolutely using brscan4-0.4.2-1.x86_64.rpm and brscan4-0.4.1-6.x86_64.rpm is the older one. Both drivers were converted to txz using the slackdocs link or to tgz with alien, and herein i think lies the problem. Because I just installed the 64-bit .deb scanner driver on Ubuntu 13.10 x64, and after installing XSane and brother-udev-rule-type1-1.0.0-1.all.deb, scanning in color works!!! :eek: But here's the kicker, there is NO 24-bit color mode only 24-bit color[Fast] mode. I don't know what else would cause XSane to exit in Slackware but not in Ubuntu, except converting the package. I'm still wondering where the log of XSane is stored, so i look at it and maybe figure out what's going on.

Quote:

Your expectations of service and mine obviously differ. If I get a response within 36 hours of an initial email, then I consider that fast.
Well, that 36 hours is over, and still no response from Brother. I will be sending an email to them very shortly. They may direct me to Slackware support. I would not be surprised at all by that.

allend 04-11-2014 07:04 AM

Well, 'tis a puzzle!
With xsane in my setup, scanning using 24bit Color works, whereas scanning using 24bit Color[Fast] causes xsane to crash.
Code:

scanimage --device-name=`brother4:net1;dev0' --format=pnm --mode '24bit Color' > scantest1.pnm
produces a correct file, whereas
Code:

scanimage --device-name='brother4:net1;dev0' --format=pnm --mode '24bit Color[Fast]' > scantest2.pnm
produces an incorrect file 37 bytes in length. I had always thought that this was due to some Windows specific enhancement.

veeall 04-11-2014 06:15 PM

I wonder if 'vuescan' supports brother better, i just today bought it for my old hp 5370c which is detected by sane but it has never been able to handle it correctly. Vuescan demo is also on slackbuilds.

seskanda 04-12-2014 10:47 AM

Quote:

Originally Posted by allend
scanimage --device-name=`brother4:net1;dev0' --format=pnm --mode '24bit Color' > scantest1.pnm


scanimage --device-name='brother4:net1;dev0' --format=pnm --mode '24bit Color[Fast]' > scantest2.pnm

I tried these commands by replacing them with brother4:bus2;dev3 since im using USB, and both give me 37 bytes files each and output the following in terminal:

Code:

scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567

I don't know what that means. Also, not sure this matters, but i'm logged in as root in Slackware, as opposed to just a regular user in Ubuntu. So, i do not get the root warning prompt from XSane to "Continue at your own risk" in Ubuntu.

Quote:

Originally Posted by veeall
I wonder if 'vuescan' supports brother better, i just today bought it for my old hp 5370c which is detected by sane but it has never been able to handle it correctly. Vuescan demo is also on slackbuilds

Vuescan does list MFC-J870DW as supported on their website. Ubuntu has Simple Scan too, but i think that is based off XSane.

mradtke 09-28-2014 05:49 PM

Hello,

I just purchased a Brother MFCJ-870DW All-In-One but I am about to return it. I have the same problem described in this chain:

Slackware 14.1 (linux 3.10.17)
sane 1.0.24-x86_64-1
brscan4-0.4.2-3.x86_64

I choose the Brother printer because Brother has had good linux support in the past. I use the USB connection. The printer and FAX printer drivers installed OK and work fine.

The scanner driver installs OK, but doesn't appear to work. From either an ordinary user, or root:

cher:/home/mradtke scanimage -L
device `brother4:bus1;dev1' is a Brother MFC-J870DW USB scanner
cher:/home/mradtke

cher:/home/mradtke scanimage >piggy
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567
cher:/home/mradtke

In the second case, scanimage just quits. No error message. The
output file contains:

cher:/home/mradtke cat piggy
P6
# SANE data follows
1680 2322
255
cher:/home/mradtke

I tried the wired ethernet connection with the same results.

I tried a different computer with slackware 14.0, 32 bit, with the 32 bit drivers and got same results.

I too only have the 24-bit color[Fast] option. After reading this chain, I tried scanning with the True Grey option and it works fine.

Do you have any advice on how to proceed, or should I just return the printer?

Thanks,
Mike

mradtke 10-02-2014 10:05 PM

I returned the printer.

crxssi 01-01-2015 12:12 AM

Dejavu... Maybe this will help others...

I just bought a Brother MFC-L2740DW and have similar problems as everyone else is reporting. Printing is easy.... it just works. Scanning is not easy. Under Mageia 3 I loaded brscan4-0.4.3-0 and ran "brsaneconfig4 -a name=brother model=MFC-L2740DW ip=192.168.1.50" and xsane can see it and scan from it fine... as long as I don't choose color. There is only one color option- "24bit Color[Fast]" and if that is selected, Xsane 0.998 will simply die after the printer starts sending data. No error message, no core dump, just "poof". Same result if I switch to a USB connection (had to add the USB ID). All the non-color modes work fine (and as a bonus, one-pass-double-sided works in gscan2pdf !!)

Using my Fedora 20 laptop, if I connect with USB and load brscan4-0.4.3-0, it works fine in Xsane in color (I don't recall what the color profile name is, however). And I didn't get network scanning working on that laptop for some reason (and didn't put much effort into it).

I updated the firmware on the printer to the latest (D1410031627 1.01 B1407141000) (you can do this on the web interface automatically!!!) and it made no difference.

Called Brother to complain about the fact that the Brother "Linux" page doesn't list *any* MFC-L model as supported or which drivers to use and that you can't even get to recent versions of brscan from that page either (the one they keep pointing people to; I had to search around for 30 minutes to find it offered for a DIFFERENT MODEL PRINTER on one of their pages). Of course, 20 minutes later and three transfers and I just get the "we don't support Linux over the phone or chat" crap. Thanks, Brother. This is my first Brother device and I bought it because of recommendations about good Linux support. I now question that... but that is a different topic.

Anyway, I will be upgrading to Mageia 5 when it comes out in a month or so (I skipped upgrading to 4 since I don't like upgrading often) and hopefully that will give better results (like Fedora 20 did). For now, I set up the network scan-to-ftp feature and that does work great and will hold me over (the printer can even generate PDF's!). Other than the above scan issue, I am impressed with the device so far. I do wish it had gigabit instead of 100-base, and that it had a usb port for scan-to-usb-device and print-from-usb-device.

mradtke 05-01-2016 04:58 PM

Still Unable to scan with XSane
 
Hello,

If you read this chain, you'll see that in October of 2014 I bought a MFC-J870DW All-In-One. The printer
worked fine, but I could not get the scanner to work. I had the exact problems noted, in this chain.

Now, 18 months later, the Epson has reached end of life. I really wanted a Brother, so yesterday I purchased a MFC-J885DW figuring, this issue would have been solved by now. It wasn't.

I am using 64 bit Slackware 14.1. The scanner driver is brscan4-0.4.3-3.x86_64.

When listing the options using "scanimage -A" for modes I still only get:

--mode Black & White|Gray[Error Diffusion]|True Gray|24bit Color[Fast]

24bit Color[Fast] is listed as the default.

I have verified the behavior with both usb and network connections.

Has anybody found a solution to do color scanning, or do I need to return this printer too?

Thanks,
Mike

dugan 05-01-2016 05:39 PM

If you want a recommendation, I'm happily using a Brother DCP 7060D over USB. It scans fine.

I even have SlackBuilds for the drivers:

https://github.com/duganchen/my_slac...ther_dcp_7060d

mradtke 05-01-2016 06:04 PM

Thanks for the prompt reply dugan.

However, the Brother DCP 7060D is monochrome and I can do monochrome scans with my MFC-J870DW. It only crashes on color.

Mike

dugan 05-01-2016 06:39 PM

Quote:

Originally Posted by mradtke (Post 5539194)
Thanks for the prompt reply dugan.

However, the Brother DCP 7060D is monochrome and I can do monochrome scans with my MFC-J870DW. It only crashes on color.

Mike

The 7060D is a monochrome printer and a color scanner. It scans in color perfectly.

mradtke 05-02-2016 11:42 AM

dugan,

I thought about this last night. Duh! Sorry for the confusion. I'll take a look at your driver package and post the results back here.

Thanks,
Mike

mradtke 05-02-2016 12:31 PM

dugan,

I looked at your slackbuild script. It is for the same version of brscan4 that I'm using.

I also see your comment "24-bit Color Fast doesn't work. This is a well-known bug."

I am aware of that issue, but with my printer, only the 24bit Color[Fast] mode is available, which of course doesn't work. Does the driver compute the modes from a conversation with the printer, or are the modes for a particular printer configured somewhere?

Thanks,
Mike

dugan 05-02-2016 12:52 PM

Quote:

Originally Posted by mradtke (Post 5539593)
I am aware of that issue, but with my printer scanner, only the 24bit Color[Fast] mode is available, which of course doesn't work. Does the driver compute the modes from a conversation with the printer scanner, or are the modes for a particular printer scanner configured somewhere?

I don't know.

What I do know is that with the 7060D, you have both the 24-bit Color Fast mode, which does not work, and you also have the 24-Bit Color mode, which works perfectly.

mradtke 05-23-2016 04:34 PM

Hello,

On the last day that I could return the MFC-J885DW, Brother came through with a new version of libsane-brother4.so.1.0.7 (64 bit only). It fixed the scanner problem.

I've had several discussions with Brother support since then but I was not able to get a commitment as to whether the fix would be rolled into future versions of brscan4 or not. However, I do have Brother's permission to share the library with anyone who needs it. Since I cannot post a binary to this forum, I am open to suggestions on how to make the fix available to others.

Brother said that they will only support linux on a case by case basis.

Thanks,
Mike

seskanda 05-26-2016 05:23 PM

Do you know if this version of libsane-brother4.so.1.0.7 works with the MFC-J870DW also? Fill free to post the link to a file sharing site like mediafire.

Thanks in advance

mradtke 05-26-2016 08:06 PM

seskanda,

As far as I know, the fix works for all scanners that use brscan4 on 64 bit slackware 14.1. Brother seems to think that it will work for 14.2 as well, but they didn't share why they think so.

You can find a copy at http://5by9.net/brscan4/libsane-brother4.so.1.0.7

Please first make a backup copy of your current /usr/lib64/sane/libsane-brother4.so.1.0.7, and then copy the updated version into place. You now should be able to scan using the "24bit Color[Fast]" mode. "24bit Color" still segment faults for me, but that's OK since I can use the "24bit Color[Fast]" mode.

Please let us know whether it worked for you.

Thanks,
Mike

seskanda 06-02-2016 01:29 AM

Appreciate the link. And great job dealing with big Brother; I know they can be quite difficult at times. By the way, any idea when Slackware 14.2 comes out?

ReaperX7 06-02-2016 01:51 AM

When it's done.


All times are GMT -5. The time now is 03:01 AM.