Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Unable to communicate with scanner part of printer/scanner

  1. #1
    Join Date
    Jun 2008
    Location
    Akkrum, Netherlands
    Posts
    169

    Default 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

    Code:
    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!

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Unable to communicate with scanner part of printer/scanner

    Hello jehojakim. Can you show us the kernel output generated when the scanner is first plugged in? First, run the following in a terminal
    Code:
    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?

  3. #3
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,611

    Default Re: Unable to communicate with scanner part of printer/scanner

    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.

  4. #4
    Join Date
    Jun 2008
    Location
    Akkrum, Netherlands
    Posts
    169

    Default Re: Unable to communicate with scanner part of printer/scanner

    Quote Originally Posted by deano_ferrari View Post
    Hello jehojakim. Can you show us the kernel output generated when the scanner is first plugged in? First, run the following in a terminal
    Code:
    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?
    Output of dmesg is
    Code:
     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...

  5. #5
    Join Date
    Jun 2008
    Location
    Akkrum, Netherlands
    Posts
    169

    Default Re: Unable to communicate with scanner part of printer/scanner

    Quote Originally Posted by john_hudson View Post
    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.
    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.

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Unable to communicate with scanner part of printer/scanner

    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.
    Last edited by Knurpht; 31-Oct-2017 at 07:48.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Unable to communicate with scanner part of printer/scanner

    Quote Originally Posted by jehojakim View Post
    Output of dmesg is
    Code:
     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
    Okay, that checks out as expected. It could be a permissions issue I guess. One quick way to find out is to run
    Code:
    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
    Code:
    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...

    Code:
    scanimage -L
    Code:
    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
    Code:
    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.
    Last edited by deano_ferrari; 31-Oct-2017 at 11:38.

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Unable to communicate with scanner part of printer/scanner

    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/li...on&redirect=on

    For example, if the scanner IP address is 192.168.1.100, then do something like
    Code:
    brsaneconfig4 -a name=Brother_scanner model=DCP-J4120DW ip=192.168.1.100
    Query the configuration with
    Code:
    brsaneconfig4 -q | grep Brother_scanner
    then try scanning with xsane, or simple-scan.

    For more options...
    Code:
    brsaneconfig4 --help

  9. #9
    Join Date
    Jun 2008
    Location
    Akkrum, Netherlands
    Posts
    169

    Default Re: Unable to communicate with scanner part of printer/scanner

    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
    Code:
    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
    Code:
    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:007, 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?

  10. #10
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Unable to communicate with scanner part of printer/scanner

    Quote Originally Posted by jehojakim View Post
    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
    Code:
    device `brother4:bus4:dev1'is a Brother DCP-J4120DW scanner
    The bus4:dev1 puzzles me; shouldn't that be bus5:dev6?
    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
    Code:
    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:007, 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.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •