Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am on a Ubuntu 14.04 LTS machine.
I downloaded early this year the printer and scanner drivers for my Epson stylus SX235W from the Epson download page.
me@SATELLITE-L50-A-161:~ $ dpkg -l | grep iscan
ii iscan 2.30.3-1 amd64 simple, easy to use scanner utility for EPSON scanners
ii iscan-data 1.38.0-1 all Image Scan! for Linux data files
ii iscan-network-nt 1.1.1-1 amd64
The device has a dedicated static ip in my router: 192.168.0.102
Once installed my all-in-one device was working fine via wifi until recently: the printer still works as before but the scanner is no longer recognised.
Now simple scan reports:
Failed to scan
No scanners available. Please connect a scanner
me@SATELLITE-L50-A-161:~ $ scanimage -L
No scanners were identified.
I tried to edit etc/sane.d/epkowa.conf adding 'net autodiscovery' or 'net 192.168.0.102' but nothing changed.
xsane too does not detect the scanner: no devices available.
I recently enabled ufw with the default set of rules and made no other changes.
My system is regurarly updated.
The scanner works via usb.
Welcome to LXQ Fangorn72. Some ideas to start with...I'm assuming from the information that you've provided already that you can ping the scanner at the fixed IP address without issue? Check that etc/sane.d/dll.conf contains an uncommented 'epkowa' entry. Have you tried disabling the firewall temporarily, flush the firewall rules with 'sudo iptables -F' and check the scanner function again?
Here is a thread which seems to match the symptoms you describe... https://forums.linuxmint.com/viewtopic.php?t=228387
It mentions a possible change in the way a particular kernel version and netfilter operate.
Assuming that you actually need a firewall running on your machine, then it may be that a simple rule for your scanner will take care of discovery/connectivity issues
I tried to disable ufw and the scanner started working again.
That the issue was with my firewall seemed unlikely to me because the printer with ufw enabled was working regularly.
So I added a rule to ufw for 192.168.0.102 as suggested by @ferrari and now it works.
There is another issue though.
If I use 'net autodiscovery' or 'net 192.168.0.102' in /etc/sane.d/epkowa.conf, both Simple Scan and xsane need minutes to find the scanner. If I remove them, Simple Scan is the only utility that works, and it does it quickly enough.
So it looks that for sane to work it is necessary to edit the appropriate configuration file, but this would slow down the scanner discovery.
What is confusing is that if you look at the sane supported devices, under my device name (Stylus SX235W) it seems that the correct backend should be 'epson2', which is already uncommented in /etc/sane.d/dll.conf and already configured with the rule 'net autodiscovery'. However it is not enough for sane to work.
What remains to understad is why when this backend is configured properly all the scan utility are so slow to find the scanner, they need good 4-5 minutes, which is not acceptable.
I tried to disable ufw and the scanner started working again.
That the issue was with my firewall seemed unlikely to me because the printer with ufw enabled was working regularly.
So I added a rule to ufw for 192.168.0.102 as suggested by @ferrari and now it works.
Good to know.
BTW, the printer communication uses a different port/protocol, so not relevant here. In any case, if you have it defined by IP address explicitly CUPS doesn't need to discover it as such.
There is another issue though.
If I use 'net autodiscovery' or 'net 192.168.0.102' in /etc/sane.d/epkowa.conf, both Simple Scan and xsane need minutes to find the scanner. If I remove them, Simple Scan is the only utility that works, and it does it quickly enough.
So it looks that for sane to work it is necessary to edit the appropriate configuration file, but this would slow down the scanner discovery.
What is confusing is that if you look at the sane supported devices, under my device name (Stylus SX235W) it seems that the correct backend should be 'epson2', which is already uncommented in /etc/sane.d/dll.conf and already configured with the rule 'net autodiscovery'. However it is not enough for sane to work.
What happens if you comment out the 'epson2' backend in /etc/sane.d/dll.conf? Does that speed things up? I assume you don't have 'autodiscovery' and explicit IP address both present in epkowa.conf?
I tried as you suggested to comment out 'epson2' in /etc/sane.d/dll.conf
In epkowa.conf I only added the explicit IP address.
After launching simple scan and xsane I waited 5 minutes for a response:
xsane: no devices available
simple scan: no scanners available. Please connect a scanner
I noticed that /etc/sane.d/dll.conf did not contain a 'epkowa' entry, so I manually added it.
Nothing changed:
xsane: no devices available
simple scan: no scanners available. Please connect a scanner
All this puzzles me, because the only configurations that work are two:
1. the 'epson2' entry in /etc/sane.d/dll.conf plus the epkowa.conf file correctly configured.
With this configuration both simple scan and xsane are able to connect to the scanner but with a time response of at least 5 min
2. Without configuring the epkowa.conf file, only simple scan is able to establish a connection, xsane fails.
Probably in this case what is used is the 'epson2' backend in /etc/sane.d/dll.conf in connection with epson2.conf
Case 1 is really weird. It looks as if dll.conf calls epkowa.conf instead of epson2.conf (which is already configured with net autodiscovery)
The 'iscan' application (Image scan! for Linux) works in no case.
I was never able to use it, neither in case 1 nor in case 2.
Could not send command to scanner
Check the scanner's status
Probably the application does not work because I installed iscan bundle (included the application) before installing sane. As it is written in the User's guide, "The SANE package version 1.0.3 or later must be installed before installing Image Scan! for Linux."
However, now suddenly I am able to use both simple scan and sane (through xsane) using the epson2 backend (case2).
So, after many faulty attempts, sane too like simple scan is able now to connect to the scanner via the epson2 backend.
In the end the device needs the epson2 backend, as documented in the sane supported devices.
The slow response time was due, as you presumed, to a conflict with the epkowa backend.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.