Sticky
SULDR Forums Supported Printers Printing Questions Scanning Questions General Questions Samsung Installer

Author Topic: SUCCESS SCANNING WITH SAMSUNG SCX-4521F UBUNTU 16.04 64BIT  (Read 4597 times)

FredK

  • Testing the water
  • **
  • Posts: 1
    • View Profile
  • Linux Distribution: UBUNTU 16.04
  • Printer: SAMSUNG SCX-4521F
SUCCESS SCANNING WITH SAMSUNG SCX-4521F USING UBUNTU 16.04 64bit and suld-driver-4.00.39

Printing worked with splix driver native to ubuntu 16.04, but scanning took quite some work!

PART ONE: INSTALLING THE DRIVERS

SAMSUNG SCX-4521F SCANNER HOW TO INSTALL IN UBUNTU 16.04
04e8:3419 [VendorID:ProductID]

1. In a terminal type the line below and press enter:

sudo gedit /etc/apt/sources.list

insert in the bottom of the page that opens:

    deb debian extra http://www.bchemnet.com/suldr/

save and close

2. Similarly in terminal, type then enter:

wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -

3. Similarly:

sudo apt-get update

4. Then:

sudo apt-get install suld-driver-4.00.39

Then SOME EARLIER DISTROS MAY REQUIRE THE FOLLOWING STEPS 5 AND 6. CONFIRM BEFORE PROCEEDING. IT SHOULD ALREADY BE EFFECTED IN UBUNTU 16.04, SO STEP 7 MAY BE NEXT IF YOU ARE RUNNING UBUNTU 16.04:

5. FOR UBUNTU 14.04 I ONCE DID:
sudo gedit /etc/sane.d/xerox_mfp.conf

Insert within the page that opens [in alignment with other entries already there]

   #Samsung SCX-4521F
   usb 0x04e8 0x3419

save and close

6. Then:

sudo gedit /lib/udev/rules.d/40-libsane.rules

and insert in the page that opens [in alignment with other entries already there]

   # Samsung SCX-4521F
   ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="3419", ENV{libsane_matched}="yes"

save and close

7. IF YOU ARE RUNNING UBUNTU 16.04 you may skip steps 5 and 6. Then:

sudo service udev restart

8. Unplug then plug in the scanner and it “should” work; mine said “Error during device I/O”

PERSONAL NOTE – I had installed the following in Ubuntu 14.04 which had been working, and in step 4 I had installed:

suld-driver-common-1 (1-6)
suld-ppd-2 (4.01.17-2)
suld-driver-4.01.17 (4.01.17-3)
samsungmfp-scanner (2:2)

References:
http://landodomenico.altervista.org/index.php/linux/applicazioni/driver-samsung-scx-4521f.html
[Translated using Google Translate]
http://www.bchemnet.com/suldr/

PART TWO: SOLVING THE Error during device I/O – A PERMISSION ISSUE

I. The Problem Described
After installing drivers suld-driver-4.00.39, attempting to run xsane produced the following error:
Error during device I/O
I first kept uninstalling and installing almost every alternative driver—same results, so I came back to this one. I followed the uninstallation instructions appearing in the terminal. Found the following:
II. SOME INVESTIGATIVE STEPS (from an ubuntu forum)
1. First in a terminal run:
sane-find-scanner
It produced the following output for me:
found USB scanner (vendor=0x04e8 [Samsung], product=0x3419 [SCX-4x21 Series]) at libusb:005:006
2. Second in a terminal run:
scanimage
It produced the following output for me:
scanimage: open of device smfp:SAMSUNG SCX-4x21 Series on USB:0 failed: Error during device I/O
3. Third in a terminal run:
sudo scanimage
This worked for me, thus revealing a permissions issue!
NB: IS THIS A UDEV RULES BUG?
From https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/188552:
“This 'bug' is a direct result from the above link - sane does not have udev rules in place to give the device proper permissions when plugged in, resulting in the root:root ownership. If you put in a proper udev rule this problem goes away.” MAYBE EXPERTS MAY NEED TO RESEARCH THIS MORE, IT’S BEYOND MY PRESENT KNOWLEDGE!
III. A Partial Solution that Worked for Me
I call it a “Partial” solution because xsane reports a permission error while closing, but the scanning and saving works!
The issue is: sane udev rules are needed to give SCX-4521F scanner proper permissions.
The solution that worked for me follows. First ensure your scanner is plugged in.
Then edit the file /etc/udev/rules.d/60_smfpautoconf_samsung.rules as follows:
   1. First in a terminal run:

      sudo gedit /etc/udev/rules.d/60_smfpautoconf_samsung.rules

   2. Second in the "USB devices" section of that file, change "0664" to "0666". "664" gives    only the owner read/write permissions. "666" gives everyone read/write permissions.

      The original section may look like this:

      # libusb device files /dev/bus/usb/00*/*
ATTRS{idVendor}=="0419", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="664", GROUP="lp", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04e8", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="664", GROUP="lp", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="0924", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="664", GROUP="lp", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="413c", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="664", GROUP="lp", ENV{libsane_matched}="yes"

The edited section should look like this:

# libusb device files /dev/bus/usb/00*/*
ATTRS{idVendor}=="0419", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="666", GROUP="lp", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04e8", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="666", GROUP="lp", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="0924", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="666", GROUP="lp", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="413c", ENV{ID_USB_INTERFACES}=="*:0701*:", MODE="666", GROUP="lp", ENV{libsane_matched}="yes"
Save then restart the computer and check whether the scanner works without your being root. FOR ME IT DID! As mentioned above, I call it a “Partial” solution because xsane reports a permission error while closing, but the scanning and saving works! I believe there’s a better solution, but this works for me!
FOR INFORMATION, I HAD TRIED WHAT FOLLOWS BELOW; IT DIDN’T WORK:
1. I had tried the Bchemnet instructions on how to enable normal user to scan - add yourself to the "lp" group and that DIDN’T WORK FOR ME.
Also tried several websites giving other ways of accomplishing the same but still didn’t work.
2. Someone had suggested:

sudo chmod a+w /dev/bus/usb/006/002

IT DIDN’T WORK FOR ME.

Hope my experience helps someone. God bless you!

FredK

 

Repository Information Legal Contact Alternative Drivers