Long story short – possible, but no walk in the park. Beginning to think we linux users are masochists. The price of absolute power, I suppose.
It’s a shame my ScanSnap 1500 broke down sometime ago. Not so much broke-down, rather some nasty looking goo started leaking out of it and I thought it a good idea not to power it up until I took a look under the hood and work out what’s going on. Like many things, this has been put on the back-burner.
There’s really not much need to scan documents anymore, and with the amount of time I spent on this particular technical safari, I wished I’d just added my signature to the required documents electronically.
Those who have been following along will know my Epson L3551 has a clogged print head such that it now only functions as a scanner. My backup scanner, if you will, which has been elevated to my primary one due to the issues with the ScanSnap.
Like Joko says, “If you’ve got two, you’ve got one.”
TL;DR – Success, of sorts, seems mostly acheivable
Keep in mind this post documents my experience in getting the L355 scanner working with the SANE backends in Ubuntu Trusty (14.04).
After 12 hours of struggle2 the solution appeared from an unlikely source. (original page in Spanish – translation here.)
For me, it was critical to have the epson2 SANE backend activated.
I’m glad I persevered to the point where I have a working linux front-end app (skanlite) which is able to communicate to my wifi connected Epson L355 and produce good quality scans. I need to start skanlite using the following: skanlite -d net:192.168.2.57 3 otherwise sometimes it doesn’t detect the scanner.
That’s enough for me – I was NOT able to get the Epson iscan app working or get xsane to detect the network-attached scanner4 (it would detect the scanner if connected via USB.)
Other folks seem to have both of the above configurations working. YMMV.
tROUBLESHOOTING – things to check
- RTFM
There’s some excellent info here. Work through the document it may well fix your issue and in many cases summerizes the information which follows. -
Check libsane is installed
If your distro doesn’t contain the required version then head here.
1234567/usr/local/lib$ dpkg -l|grep libsaneii libsane:i386 1.0.23-3ubuntu3.1 i386 API library for scannersii libsane-common 1.0.23-3ubuntu3.1 i386 API library for scanners -- documentation and support filesii libsane-dev 1.0.23-3ubuntu3.1 i386 API development library for scanners [development files]ii libsane-extras:i386 1.0.22.3ubuntu1 i386 API library for scanners -- extra backendsii libsane-extras-common 1.0.22.3ubuntu1 i386 API library for scanners -- documentation and support filesrc libsane-hpaio 3.14.3-0ubuntu3.2 i386 HP SANE backend for multi-function peripherals - Check the printer has been assigned a static IP address and is connected to your router via wifi, which will require you know the correct SSID/Network key
You’ll likely need to do this via the Windows-based Epson utilities or alternatively could try a WPS connection by pressing the wifi button on the printer for 3 seconds. One imagines DHCP would automatically assign the printer an IP address which you would then want to change.
Here’s a YT video which may help:
If this is completed correctly the wifi light on the front of the printer should be solid green.
-
Ensure scanimage can detect the printer and try out a test scan via the command line.
123/etc/sane.d$ scanimage -Ldevice `epson2:net:192.168.2.57' is a Epson PID 08A8 flatbed scanner/etc/sane.d$ sudo scanimage -x 100 -y 100 --format=tiff >~/image.tiff
- IF YOU WANT TO USE iscan (Image Scan app from Epson), download the correct linux drivers for the Epson L355.
Otherwise, they are not necessary.
Firstly, I had to check if I’m using a 32-bit or 64-bit version of Ubuntu using uname -m which returns i686 = 32-bit. Ok.
Then I had to download the correct iscan package iscan-bundle-2.30.4.x86.deb.tar.gz from Epson via this URL. Epson have kindly provided a handy manual. Read it!
Backstory
I took a look inside my Downloads directory to see similar files previously downloaded.
I have a memory of trying to get this working years ago, but ran into difficulties and ended up running it using a samba via a windows box. The above shows the battle took place in 2015 – all I can recall is I lost on that occasion 🙁
After extracting the payload from the tar.gz file I ran the install.sh script and then iscan, and received the following:
Googling “Could not send command to scanner. Check the scanner’s status“ you’ll likely come across this article:
Get Epson iScan to work in Ubuntu with a networked/wireless scanner
If you see this error upon starting iScan aka “Image Scan for Linux”: “Could not send command to scanner. Check the scanner’s status.” It means the iScan couldn’t find the scanner. This happens often if it’s not connected via USB, but lives in a wireless network for instance.
-
You may need to modify some symbolic links and update to libsane.so.1.0.26.
There are reports of a libsane update breaking 3rd-party plugins.
Here is what my current /usr/lib/sane folder contents:
123456789101112131415161718192021/usr/lib/sane$ ls -l-rw-r--r-- 1 root root 1099 Aug 21 06:27 libsane-epkowa.lalrwxrwxrwx 1 root root 24 Aug 21 06:27 libsane-epkowa.so.1 -> libsane-epkowa.so.1.0.15-rw-r--r-- 1 root root 273280 Aug 21 06:27 libsane-epkowa.so.1.0.15-rwxr-xr-x 1 root root 1114 Dec 1 2016 libsane-hpaio.lalrwxrwxrwx 1 root root 22 Dec 1 2016 libsane-hpaio.so -> libsane-hpaio.so.1.0.0lrwxrwxrwx 1 root root 22 Dec 1 2016 libsane-hpaio.so.1 -> libsane-hpaio.so.1.0.0-rwxr-xr-x 1 root root 474463 Dec 1 2016 libsane-hpaio.so.1.0.0/usr/local/lib$ ls libsane* -al-rwxr-xr-x 1 root root 1031 Nov 30 2016 libsane.lalrwxrwxrwx 1 root root 17 Nov 30 2016 libsane.so -> libsane.so.1.0.26lrwxrwxrwx 1 root root 17 Nov 30 2016 libsane.so.1 -> libsane.so.1.0.26-rwxr-xr-x 1 root root 498235 Nov 30 2016 libsane.so.1.0.26/usr/lib/i386-linux-gnu$ ls libsane* -al-rw-r--r-- 1 root root 45218 May 10 2014 libsane.a-rw-r--r-- 1 root root 952 May 10 2014 libsane.lalrwxrwxrwx 1 root root 17 May 10 2014 libsane.so -> libsane.so.1.0.23lrwxrwxrwx 1 root root 17 May 10 2014 libsane.so.1 -> libsane.so.1.0.23-rw-r--r-- 1 root root 30240 May 10 2014 libsane.so.1.0.23When looking at the above, I’m unsure why the files in /usr/local/lib appear to be newer than those in ../i386-linux-gnu. I’m hesitant to play with things here as it’s now working to a degree I’m happy with.
I believe it happened as a result of running this:
123sudo add-apt-repository ppa:rolfbensch/sane-gitsudo apt-get updatesudo apt-get dist-upgradeI have a memory of modifying the above symlinks based on this post from SO.
Epson GT-S50 scanner not working after upgrade to 18.04 from 16.04
Since the upgrade, my Epson scanner GT-S50 (Epkowa driver). It gets detected ( dmesg) when plugged in: [ 3755.680091] usb 3-4.4.1: new high-speed USB device number 8 using ehci-pci [ 3755.789893] usb 3-4.4.1: New USB device found, idVendor=04b8, idProduct=0137 [ 3755.789895] usb 3-4.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 3755.789896] usb 3-4.4.1: Product: EPSON Scanner [ 3755.789897] usb 3-4.4.1: Manufacturer: EPSON But when starting either “Image Scan!”
Q: Which config file is used? Which libsane is used?
1234567891011121314151617181920/usr/lib/i386-linux-gnu$ SANE_DEBUG_DLL=5 scanimage -L[sanei_debug] Setting debug level of dll to 5.[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.26git[dll] sane_init/read_dlld: attempting to open directory `./dll.d'[dll] sane_init/read_dlld: attempting to open directory `/usr/local/etc/sane.d/dll.d'[dll] sane_init/read_dlld: using config directory `/usr/local/etc/sane.d/dll.d'[dll] sane_init/read_dlld: done./etc/sane.d$ SANE_DEBUG_DLL=5 scanimage -L[sanei_debug] Setting debug level of dll to 5.[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.26git[dll] sane_init/read_dlld: attempting to open directory `./dll.d'[dll] sane_init/read_dlld: using config directory `./dll.d'[dll] sane_init/read_dlld: considering ./dll.d/libsane-extras[dll] sane_init/read_config: reading dll.d/libsane-extras/etc/sane.d/dll.d$ ls -l-rw-r--r-- 1 root root 38 May 14 2014 hplip-rw-r--r-- 1 root root 118 Aug 21 06:27 iscan-rw-r--r-- 1 root root 60 Jan 30 2014 libsane-extrasAs can be seen from the above, the current directory plays a part in how sane loads the backends. (Note the highlighted lines.)
As per the man page:
SANE_CONFIG_DIR
This environment variable specifies the list of directories that may contain the
configuration file. Under UNIX, the directories are separated by a colon (‘:’),
under OS/2, they are separated by a semi-colon (‘;’). If this variable is not set,
the configuration file is searched in two default directories: first, the current
working directory (“.”) and then in /etc/sane.d. If the value of the environment
variable ends with the directory separator character, then the default directories
are searched after the explicitly specified directories. For example, setting
SANE_CONFIG_DIR to “/tmp/config:” would result in directories “tmp/config”, “.”,
and “/etc/sane.d” being searched (in this order).You can see below I get different results depending on where the command-line invocation is issued.
Works if in the /etc/sane.d/ directory ; fails to find scanner otherwise.123456789/etc/sane.d$ scanimage -Ldevice `epson2:net:192.168.2.57' is a Epson PID 08A8 flatbed scanner/etc/sane.d$ cd ~~$ scanimage -LNo scanners were identified. If you were expecting something different,check that the scanner is plugged in, turned on and detected by thesane-find-scanner tool (if appropriate). Please read the documentationwhich came with this software (README, FAQ, manpages).I wanted to delve under the hood to determine which files and sockets were being opened when I fired up skanlite. Below is some truncated output using the lsof command.
1234567891011lsof -p 19717|grep libsaneskanlite 19717 xx mem REG 8,1 462043 11019403 /usr/local/lib/sane/libsane-epson2.so.1.0.26skanlite 19717 xx mem REG 8,1 163080 11019535 /usr/local/lib/sane/libsane-net.so.1.0.26skanlite 19717 xx mem REG 8,1 498235 11018472 /usr/local/lib/libsane.so.1.0.26lsof -p 19717|grep epsonskanlite 19717 xx mem REG 8,1 462043 11019403 /usr/local/lib/sane/libsane-epson2.so.1.0.26lsof -p 19717|grep ESTABLISHEDskanlite 19717 xx 12u IPv4 206829 0t0 TCP 192.168.2.xx:33362->Epson_L355:1865 (ESTABLISHED)skanlite 19717 xx 21u IPv4 208933 0t0 TCP localhost:33022->localhost:sane-port (ESTABLISHED)Ideally I need to fix this – have not done so at the time of writing. I also note the use of port 1865 on the Epson (default, specified explicitly in the config file) however nmap doesn’t list this as an open port on the printer?
- /etc/sane.d/dll.conf – The backend configuration file.
My working version contains the following lines:123netepkowaepson2 - Ensure the file /etc/udev/rules.d/79-udev-epson.rules is present.
Mine contains the following:12# chmod device EPSON groupATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"source: https://bugs.launchpad.net/debian/+source/sane-backends/+bug/1707352
If you need more information on udev rules read this - scanimage may detect your webcam.
12usr/lib/i386-linux-gnu/sane$ scanimage -Ldevice `v4l:/dev/video0' is a Noname HD WebCam virtual device
To fix this, edit your vl4.conf file and comment out all the device lines.
1234567891011/usr/local/etc/sane.d$ cat v4l.conf## In order to use the v4linux backend you have to give the device# You can enable multiple lines if# you really have multible v4l devices.##/dev/bttv0#/dev/video0#/dev/video1#/dev/video2#/dev/video3 - nmap is your friend
Firstly, scan your entire subnet to see what devices are active, and ensure your scanner is one of them.1234567sudo nmap -sn 192.168.2.0/24Starting Nmap 6.40 ( http://nmap.org ) at 2020-01-15 10:38 +07Nmap scan report for Epson_L355 (192.168.2.57)Host is up (0.062s latency).MAC Address: XX:XX:XX:XX:XX:XX (Seiko Epson)Nmap done: 256 IP addresses (5 hosts up) scanned in 4.44 secondsThen get specific open port information on your scanner. It should look something like this:
123456789101112sudo nmap 192.168.2.57Starting Nmap 6.40 ( http://nmap.org ) at 2020-01-15 15:17 +07Nmap scan report for epson_l355 (192.168.2.57)Host is up (0.034s latency).rDNS record for 192.168.2.57: Epson_L355Not shown: 997 closed portsPORT STATE SERVICE80/tcp open http515/tcp open printer9100/tcp open jetdirectNmap done: 1 IP address (1 host up) scanned in 0.50 secondsWhat are those strange ports you ask?
Ensure your printer is not connected to the internet lest you want be punkd.
- /etc/sane.d/net.conf
The only active line I have in this file is:1localhost - /etc/sane.d/epson2.conf
123456789101112# USBusb# For libusb support for unknown scanners use the following command# usb <product ID> <device ID># e.g.:# usb 0x4b8 0x110# Network#net 192.168.2.57# net autodiscovery
- /etc/sane.d/epkowa.conf
1net 192.168.2.57 1865
-
Check /etc/default/saned *if applicable*
12345678~$ cat /etc/default/saned# Defaults for the saned initscript, from sane-utils# Set to yes to start sanedRUN=yes# Set to the user saned should run asRUN_AS_USER=saned
Q: Does saned (daemon) need to be running? – NO ; I have been able to use skanlite to scan from my wifi networked Epson L355 without the daemon running.
saned is the SANE (Scanner Access Now Easy) daemon that allows remote clients to access image acquisition devices available on the local host.
Graphically, here’s the best explanation I’ve found (source: https://wiki.debian.org/SaneOverNetwork)
1234567SCANNER SERVER CLIENT+-------------------+ +------------------------+ +-----------------------------+| Non-networked | | libsane + sane-utils | | libsane || stand-alone or | USB | | cable/wireless | || multifunctional |<----->| saned.conf: permitted |<-------------->| dll.conf: uncomment net || device | | connections | | net.conf: server IP address |+-------------------+ +------------------------+ +-----------------------------+ -
Fallback to USB cable connection
It’s worth doing this fairly early on. Knowing it works via USB will provide warm fuzzies!
123/lib/udev/rules.d$ scanimage -Ldevice `v4l:/dev/video0' is a Noname HD WebCam virtual devicedevice `epson2:libusb:002:009' is a Epson PID 08A8 flatbed scanner -
Fallback to Windows, if you must
When you’ve worked these types of problems you usually know when it’s time to throw in the towel. During my early iterations of trying to get this up-and-running, I had to call time and go down this road
This type of troubleshooting tends to chew through the hours and I simply needed the problem solved i.e. the documents scanned.
It was time to get things working under Windows, which in my case meant firing up my Virtualbox VM with Win10 guest OS5.
Download the latest drivers/utilities (I thought I was smart having located the CD which came with the printer – a bad move as this version was not suited to Win 10 and I had to uninstall / re-install the correct one [Epsonnet setup manager 03-Aug-2015 31,32Mb]
Even this was no picnic but in the end it worked!
Notes
1. Purchased at Officemate in Thailand.
2. Some PEBKAC here – I had an unknown duplicate IP address issue. Argh!
3. source: https://bugs.launchpad.net/ubuntu/+source/skanlite/+bug/311953
4. Even xsane net:192.168.2.57 fails to work.
5. Yeah my WIN 10 hasn’t been activated – don’t see any downside here, downloaded the ISO from MS. Ref: https://www.tomshardware.com/reviews/get-windows-10-free-or-cheap,5717.html
6.strace worth a look if you are really stuck. Use the -o flag to redirect output for further investigation. Will help you locate what’s *really* going on under the hood.
source: https://alicious.com/iscan-linux-networked-epson/comment-page-1/#comments
7. Note to self – don’t buy another Epson printer. You’ve owned enough in this lifetime.
8. Restarting ubuntu networking: https://chrisjean.com/restart-the-network-in-ubuntu-from-ssh/
9. Confirming SANE support for Epson L355:
1 2 3 4 5 |
1091 :model "L355" 1092 :interface "USB" 1093 :usbid "0x04b8" "0x08a8" 1094 :status :complete 1095 :comment "network interface supported via DFSG non-free iscan-network-nt package<br>all-in-one" |
10. Webconfig doesn’t seem to work. Pointing the browser to the printers IP address just gives me the following screen:
11. A good SANE network tute here: https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/
12. When connected via USB, I managed to get the scanner working with xsane but the scan quality was poor. Setings? Maybe, I’ll admit. Interestingly, iscan still refused to play ball.
Leave a Reply
1 Comment on "How to scan with a wifi networked Epson L355 on Ubuntu 14.04 (trusty)"
I’d rather play bridge.