Unable to communicate with scanner part of printer/scanner

I try to activate the scanner part of a Brother DCP-J4120DW printer/scanner. I downloaded and installed the driver supplied by Brother. The scanner is detected by Yast, but XSane cannot communicate with the device. It reports

Could not find device 'brother4:bus4;dev1
Error during device communication

lsusb gives a (one) Brother-device, but uncertain of the printer part (which is working correct, by the way) or the scanner part, or both, are meant by that entry.

I am running Leap 42.3 on this system.

Any clues about how to get this working? Thanks!

Hello jehojakim. Can you show us the kernel output generated when the scanner is first plugged in? First, run the following in a terminal

dmesg --follow

then plug in the device and capture the output.

BTW, do you prefer to connect to this device by USB rather than via wireless network?

This could be a failed USB hub; in this case printing remains possible because it is monodirectional but anything bidirectional like scanning fails. Plug a USB stick into the same USB socket and see if you can copy anything to/from it. If not, the USB has failed. If you can, it is a driver problem.

Output of dmesg is

 131.835658] fuse init (API version 7.23)
  393.158522] usb 5-2: USB disconnect, device number 2
  393.158758] usblp0: removed
  397.984758] usb 5-2: new high-speed USB device number 4 using ehci-pci
  398.118788] usb 5-2: New USB device found, idVendor=04f9, idProduct=0339
  398.118799] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
  398.118802] usb 5-2: Product: DCP-J4120DW
  398.118805] usb 5-2: Manufacturer: Brother
  398.118807] usb 5-2: SerialNumber: BROB6F116643
  398.120142] usblp 5-2:1.0: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x04F9 pid 0x0339
  398.120478] usb-storage 5-2:1.2: USB Mass Storage device detected
  398.123142] scsi host1: usb-storage 5-2:1.2
  399.136190] scsi 1:0:0:0: Direct-Access     Brother  DCP-J4120DW      1.00 PQ: 0 ANSI: 2
  399.137755] sd 1:0:0:0: Attached scsi generic sg1 type 0
  399.206043] sd 1:0:0:0: [sdb] Attached SCSI removable disk

I’m not sure what the messages regarding the SCSI disk imply, is the Brother seen as a removable disk? Anyway, the printer is seen.

Regarding using the wireless network access, I can see the device’s IP-address, but how do I use that to give the device scanning commands? I’ll dive deeper into the manual, but it’s Windows-oriented of course…

I can read and write on a USB-stick connected on the same USB-socket, so it’s not a hardware problem on the system side, it seems.

Did you already try YaST’s scanner module? If not, try and see if YaST detects the device ( as a scanner )

EDIT: Sorry, the answer was already in your post.

Okay, that checks out as expected. It could be a permissions issue I guess. One quick way to find out is to run

lsusb

and get the bus and device number pertaining to the Brother multifunction device, then check the device node permissions eg for bus 002, device 003 do

ls -l /dev/bus/usb/002/003

If it has group root ownership that is the problem. It needs to be assigned to group ‘lp’, and that is done with a udev rule (refer below).

Another way is to examine the output from the following two scanner discovery commands…

scanimage -L
sane-find-scanner
  • Run as user first, then if no scanner device detected run again as root. If it is detected as root then that signifies a permissions issue.

If a custom udev rule is required to reassign group and flag the device as a scanner, then create /etc/udev/rules.d/40-Brother.rules and add the following entry

ATTR{idVendor}=="04f9", ATTR{idProduct}=="0339", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"

When the device is reconnected, it should take effect and you can check the device node permissions again.

Regarding using the wireless network access, I can see the device’s IP-address, but how do I use that to give the device scanning commands? I’ll dive deeper into the manual, but it’s Windows-oriented of course…

For a network-attached Brother device, read the following…
http://support.brother.com/g/s/id/linux/en/instruction_scn1b.html?c=us_ot&lang=en&comple=on&redirect=on

For example, if the scanner IP address is 192.168.1.100, then do something like

brsaneconfig4 -a name=Brother_scanner model=DCP-J4120DW ip=192.168.1.100

Query the configuration with

brsaneconfig4 -q | grep Brother_scanner

then try scanning with xsane, or simple-scan.

For more options…

brsaneconfig4 --help

The device is at 005:006, and /dev/bus/usb/005/006 has root as owner, lp as group, and is rw for both owner and group.
scanimage -L, issued as user, reports

device `brother4:bus4:dev1'is a Brother DCP-J4120DW scanner

The bus4:dev1 puzzles me; shouldn’t that be bus5:dev6?

sane-find-scanner works only as root (access denied as user) and reports

found USB scanner (vel
ndor=0x4f9 [Brother], product=0x0339 [DCP-J4120DW) at libusb:005:006

which seems correct.

/etc/udev/rules.d/ has a file 55-libsane.rules, with lots of Brother entries, but none for product 0x0339. I added that rule conform your advice, (in the 55-libsane.rules file)
unplugged and replugged the scanner, and ran scanimage -L again, but the result is the same.
sane-find-scanner reports the device now at libusb:005:00[b]7, instead of libusb:005:006, but maybe that’s simply the cause of unplugging/replugging, and hence irrelevant?

/etc/udev/rules.d/ has also a file 56-sane-backends-autoconfig.rules, which has no Brother entries. It seems to me that this is to allow access through the network?

No, I think that discrepancy with numbering is usual with scanimage. The important thing is that the scanner was reported as user. The device node permissions determine that.

sane-find-scanner works only as root (access denied as user) and reports

found USB scanner (vel
ndor=0x4f9 [Brother], product=0x0339 [DCP-J4120DW) at libusb:005:006

which seems correct.

Ah, this might be a clue. Is the user a member of the ‘lp’ group? I would expect this to work as user as well.

/etc/udev/rules.d/ has a file 55-libsane.rules, with lots of Brother entries, but none for product 0x0339. I added that rule conform your advice, (in the 55-libsane.rules file)
unplugged and replugged the scanner, and ran scanimage -L again, but the result is the same.
sane-find-scanner reports the device now at libusb:005:00[b]7, instead of libusb:005:006, but maybe that’s simply the cause of unplugging/replugging, and hence irrelevant?

Yes, the device numbering can change when unplugging and plugging in again.

/etc/udev/rules.d/ has also a file 56-sane-backends-autoconfig.rules, which has no Brother entries. It seems to me that this is to allow access through the network?

No, the udev rules are purely there for USB-connected scanners. For network-attached scanners, no such rules are needed, and the IP address (or hostname) is generally added to the backend config file (or similar). In the case of Brother (via brscanconfig4), the network config file is located in /etc/opt/brother/scanner/brscan4//brsanenetdevice4.cfg.

Le 01/11/2017 à 19:16, deano ferrari a écrit :

> > > device `brother4:bus4:dev1’is a Brother DCP-J4120DW scanner

sorry if I jump on the conversation, but I just subscribed to this
forum, I have a network brother printer/scanner and it works perfectly
under 42.3.

I did only two steps: install drivers from brother’s web site and check
I’m in the lp group…

jdd

A Brother multifunction device?

I did only two steps: install drivers from brother’s web site and check
I’m in the lp group…

jdd

Yes, usually not hard to get up and running. :slight_smile:

Le 01/11/2017 à 21:26, deano ferrari a écrit :
>
> jdd;2843693 Wrote:
>> Le 01/11/2017 à 19:16, deano ferrari a écrit :
>>
>>> > > device `brother4:bus4:dev1’is a Brother DCP-J4120DW scanner
>>
>> sorry if I jump on the conversation, but I just subscribed to this
>> forum, I have a network brother printer/scanner and it works perfectly
>> under 42.3.
> A Brother multifunction device?

yes laser + scanner, wifi

it’s sometime seen without the proprietary driver but not working

jdd

Returning to your opening post - I was wondering if perhaps the issue might be to do with the installed brscan4 package version perhaps. Check with

rpm -qi brscan4

I note that ‘brscan4-0.4.2-1.x86_64’ does NOT have the required support for the DCP-J4210DW model ie nothing returned by

brsaneconfig4 -q|grep DCP-J4210DW

However, ‘brscan4-0.4.4-4.x86_64.rpm’ does have the required support for your device model…
http://support.brother.com/g/b/downloadtop.aspx?c=as_ot&lang=en&prod=dcpj4120dw_eu_as

I downloaded and installed this package, and annoyingly I then found that the -q (query) option was now missing from the brsaneconfig4 utility, unlike the previous version. So instead, I ran a grep on the .ini files located in /etc/opt/brother/scanner/brscan4/models4/* for the applicable model chipset (0x0339) and got a positive response…

# grep 0339 /etc/opt/brother/scanner/brscan4/models4/*
/etc/opt/brother/scanner/brscan4/models4/ext_11.ini:0x0339,214,2,"DCP-J4120DW"

Could this be your problem? Just a thought.

That did the trick. The user was part of the ‘scanner’-group, not of lp. But while printing worked, and scanning not, I didn’t think about this possibility. Thanks a lot!

Glad that it was just a group membership issue. :slight_smile:

Now you should try configuring for network connectivity. It’s more convenient IMHO (unless desktop environment with adjacent printer/scanner perhaps).

Hi,
(I’m never sure whether to start a new thread for what is a continuation of the same issue, as I prefer to only read one thread, so here goes)

Leap 15.0, connecting to Epson ET-7750 AiO printer/scanner via wifi (home LAN); it previuosly worked out-of-the-box in Leap 42.3 (after adding user to lp group, as described above); now printer works (after some confusion with the new firewall config) but scanner function is no longer working

I’ve tried activating epson2 and epsonds in /etc/sane.d/dll.conf; and added net 192.168.1.92 to both epson2.conf and epsonds.conf, with no success (sane backend epkowa no longer seems to be included in the current package (1.0.27-lp150.4.1) - I’ve seen this mentioned in other threads, but don’t know if this is relevant).

I’ve noticed that in our router’s config interface the printer is identified as EPSOND3183B, but it’s definitely the one (we really don’t have any other secret Epson printers on our LAN). I can ping the printer.

I’ve updated the printer’s driver to most recent (ESC/PR 1.6.18-lp150.1.1), and installed the scanner driver (including network plug-ins) from http://support.epson.net/linux/en/imagescanv3.php

I’ve configured /etc/imagescan/imagescan.conf, as per instructions on Epson support documentation, to:

net.udi    = esci:networkscan://192.168.1.92:1865
net.vendor = Epson
net.model  = ET-7750
net.name = ET-7750

Scanner is now detected by YAST, scanimage -L (as user, not root) but not sane-find-scanner (even with firewalld stopped).

When I run imagescan, it opens, but fails to connect, with (seemingly incomplete message) :

Cannot access ET-7750
(esci:networkscan://192.168.1.92:1865)
//192.168.1.92:1865: error receiving

and now I’m stuck!

Does anyone have any suggestions?

thanks - JS

plus:

when I attempt run skanlite, it fails to start, with message “Sorry: opening the selected scanner failed”

explanation in console, is

 ~> skanlite
"deviceOption value="
("image/bmp", "image/jp2", "image/jpeg", "image/png", "image/tiff", "image/vnd.microsoft.icon", "image/vnd.wap.wbmp", "image/webp", "image/x-eps", "image/x-icns", "image/x-pcx", "image/x-pic", "image/x-portable-bitmap", "image/x-portable-graymap", "image/x-portable-pixmap", "image/x-rgb", "image/x-tga", "image/x-xbitmap", "image/x-xpixmap")
"imagescan:esci:networkscan://192.168.1.92:1865"
"imagescan:esci:networkscan://192.168.1.92:1865"
sane_open(" "imagescan:esci:networkscan://192.168.1.92:1865" ", &handle) failed! status =  Operation not supported

I would have recommended starting a new thread, rather than tacking onto an old thread like this. The main reason for this is that with an appropriate thread title, you have the best chance of attracting the attention that you require from those that can help.

When I run imagescan, it opens, but fails to connect, with (seemingly incomplete message) :

Cannot access ET-7750
(esci:networkscan://192.168.1.92:1865)
//192.168.1.92:1865: error receiving

and now I’m stuck!

Does anyone have any suggestions?

thanks - JS

You do need to know the appropriate sane backend for your Epson AiO model to configure correctly, so this is the likely reason for this error.