Network Scanner with Fujitsu ScanSnap and a Raspberry Pi08 Jan 2020
My trusty Fujitsu ScanSnap S1500 had to be tossed aside when MacOS Catalina ditched the 32bit libraries. It sat lifeless on my desk until I realized I could use a Raspberry Pi to bring it back to life as a headless network scanner.
Thinking through this…
If I could plug the ScanSnap into a Raspberry Pi, capture the scan button depressions on the device, get the scanned content converted to PDF and loaded to some shared drive it would be the perfect solution.
- Install Raspbian Lite
- Install SANE and sanebd
- Configure sanebd (for button pushing/polling)
- Install and configure Samba locally and share to the network from the Pi directly
Here was my process to make the network scanner work! Everything lives in the
pi user’s home directory/space and the Samba share runs from there as well. Trying keep it as KISS-focused as possible.
- Using a Raspberry Pi 3B+ I installed Raspbian Lite (now that I have used the PI4 for other projects I wish I had a bucket of those lying around).
- Added SSH connectivity via
Install all of the software necessary for the system:
sudo apt-get update sudo apt-get upgrade sudo apt install sane sane-utils scanbd git imagemagick -y
We add the pi user into the scanner group and then we check to make sure the scanner is working after the SANE install. (before this step; put a piece of paper in the scanner and open her lid)
sudo usermod -a -G scanner pi sudo scanimage >/tmp/out.pnm
/tmp/out.pnm will have the scan from the scanner
There is a cool script made by Raman Gupta at https://github.com/rocketraman/sane-scan-pdf. Configuring all of the scanimage/scan calls can be time consuming; Raman has wrapped it all and I found it to be useful (minus an issue on RPI that I reported).
cd $HOME git clone https://github.com/rocketraman/sane-scan-pdf.git
Create a shared space for the scans via Samba Share
We need a spot to keep the scans on the local system and share them out via SMB.
cd $HOME; mkdir scans chmod 777 scans smbpasswd -a pi
Next, I added the following to
[scans] valid users = pi path = /home/pi/scans writeable = yes create mask = 0777 directory mask = 0777 public = no
Scanbd - “the scan button”
Next, we need to listen for the scan button. Thankfully there is
scanbd which will do this for us.
First, I update
/etc/scanbd/scanbd.conf by setting
action scan I add this:
desc = "Scan to file and share" script = "scan.sh"
Finally, I create
scan.sh as (
#!/bin/sh now=`date +"%Y-%m-%d-%H%M"` /home/pi/sane-scan-pdf/scan -d -r 300 -v -m Lineart --skip-empty-pages -o /home/pi/scans/scan-$now.pdf
Now when push the scan button; the ADF scanner runs and the PDF appears in the shared drive! Magic!
Special thanks Phillipp Keller for his write up on his network scanner to S3. I learned a lot from his fight and worked from it.[