Ubuntu – S1300I scanner issues under Ubuntu 16.04 using Sane

firmwaresanescanner

In theory this scanner does work under Linux and Ubuntu. I've found this document that I tried to follow.

http://luuklangens.nl/blog/howto-fujitsu-scansnap-s1300-s300-ubuntu-linux

I install sane, copy firmware, confirm the location in the config etc. Everything looks good.

Potential problem areas

sudo sane-find-scanner

output:

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

found SCSI processor "Marvell 91xx Config 1.01" at /dev/sg5
# Your SCSI scanner was detected. It may or may not be supported by SANE. Try
# scanimage -L and read the backend's manpage.

could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
found USB scanner (vendor=0x04c5 [FUJITSU], product=0x128d [ScanSnap S1300i]) at    libusb:005:007
could not fetch string descriptor: Pipe error
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

Okay. So the scanner is detected and listed, it prints a bunch of extra noise that

# scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

Okay, let's verify the firmware files:

ls -lh  /usr/share/sane/epjitsu 
total 136K
-rw-r----- 1 root root 65K Jan  1 17:49 1300_0C26.nal
-rw-r----- 1 root root 65K Jan  1 17:49 300_0C00.nal

Looking at the configuration file: (snippets)

# Fujitsu S300
firmware /usr/share/sane/epjitsu/300_0C00.nal
usb 0x04c5 0x1156

# Fujitsu S1300
firmware /usr/share/sane/epjitsu/1300_0C26.nal
usb 0x04c5 0x11ed

Last thing I tried was to pull the line from sane-find-scanner and update the config

sane-find-scanner returns a different product ID. I updated the config file above, restarted the sane service, I ran scanimage -L still, scanner not detected.

For reference I had this working on this same computer under a virtualbox VM. If I can get it to work under windows that would be ideal. Any suggestion would be much appreciated.


Update: I revisited the behavior after adding the 1300i firmware and it's still not working but.

Once in a while when I do run this is the output. If I run it again it'll fail.

scanimage -L
device `epjitsu:libusb:005:008' is a FUJITSU ScanSnap S1300i scanner

also sudo gscan2pdf and sudo simple-scan both fail to detect a scanner. It fails with and without sudo permissions.

Best Answer

Thanks to everyone who posted valuable info and links here. Without your posts, I would not have been able to figure it out.

This is a revised version of my earlier post that referred to Sane v.1.0.23 / Ubuntu 14.04. Sane v.1.0.23 detects Fujitsu S1300i scanner but then somehow gets stuck and finds no scanners on the second and subsequent runs of "scanimage -L", as described in previous posts.

Sane v.1.0.25 (Ubuntu 16.04) detects Fujitsu S1300i with "sane-find-scanner" or "sudo sane-find-scanner". However, "scanimage -L" or "sudo scanimage -L" does not detect S1300i on my Ubuntu 16.04 system at all.

The following procedure is designed to make Fujitsu S1300i work on an Ubuntu 16.04 desktop system. With appropriate modifications, it should work for other Ubuntu versions as well.

1. Obtain, compile and install the latest version of Sane

The following instructions are loosely based on the "Compile Sane From Source" article at the Ubuntu Community Help Wiki.

The commands below will install Sane into /usr/local. If you choose to install into /usr instead of /usr/local, review the "Compile Sane From Source" and use the appropriate switches instead of the ones used below. I recommend installing into /usr/local, because this will leave your stock installation of Sane intact in case you want to switch back to using the stock version.

Install prerequisites:

sudo apt-get install libusb-dev build-essential libsane-dev
sudo apt-get install libavahi-client-dev libavahi-glib-dev libjpeg-dev
sudo apt-get install git-core

Download the latest Sane:

git clone git://git.debian.org/sane/sane-backends.git

At the time of this writing, the latest commit is this one:

$ git log -n 1
commit 1e013654cc3af09f4731ab9ec8d8324d03a7de4a
Author: Alessandro Zummo <a.zummo@towertech.it>
Date:   Mon May 9 11:10:35 2016 +0200

Compile and install Sane:

cd sane-backends
./configure
make
sudo make install

If you decide to remove this installation of Sane, use "sudo make uninstall" to remove all installed files from /usr/local. This is a clean way to revert back to using the stock installation in /usr.

2. Register libsane

Check how your system finds Sane shared object library:

sudo ldconfig -v | grep libsane

If you see something like:

libsane.so.1 -> libsane.so.1.0.25
libsane.so.1 -> libsane.so.1.0.26

it means that the system first finds version 1.0.25 and then 1.0.26, which is not the correct order. In this case, you must change the order of the library paths in /etc/ld.so.conf or you must create a new configuration file for sane:

echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/1-sane.conf

Once you have changed the library paths in /etc/ld.so.conf or created the new configuration file in 1-sane.conf, check the order of libraries one more time with "sudo ldconfig -v | grep libsane". Make sure that version 1.0.26 appears first before any other versions.

3. Install scanner firmware

Copy Fujitsu S1300i driver file, "1300i_0D12.nal", from the Windows computer where the scanner software was installed. Usually, this driver file is found in "C:\Windows\SSDriver\S300". Place the driver file into the /usr/local hierarchy:

sudo mkdir -p /usr/local/share/sane/epjitsu
sudo cp ./1300i_0D12.nal /usr/local/share/sane/epjitsu/

4. Adjust permissions to access scanner as a non-root user

The default udev rules set the ownership of the USB device to "root" and the group ownership to "root". Change the udev rules to set the group ownership to "scanner". Use your favourite editor to create this file:

/etc/udev/rules.d/79-scanner.rules

and place the following into it:

# Fujitsu ScanSnap S1300i
ATTRS{idVendor}=="04c5", ATTRS{idProduct}=="128d", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

Add yourself to the "scanner" group if necessary:

sudo usermod -a -G scanner <username>

5. Finish installation

Reboot your computer. You may be able to start using your Fujitsu S1300i scanner without rebooting your computer, however a reboot is strongly recommended. I observed some odd behaviour with "scanimage -L" failing to find the scanner on a second run before a reboot even after making all necessary configuration changes. It could be that some libraries or drivers from the earlier version of Sane get "stuck" somewhere in cache or else. A system reboot cleans it all up.

After a reboot, connect your scanner, open the lid and execute:

scanimage -L

That's all. Enjoy your scanner.

Related Question