Network Scanning from command line

I am putting out a number of short posts that when put together will allow for Alexa to scan and read letters and bills and such like. As it it is a relatively large complex integration piece, I figured breaking the capabilities into pieces may actual help more people.

I have started with a RPi3 install of openhabian, but came to a show stopper as I could not find a set of brother scanner drivers for the armhf architecture. I have previously installed on a debian 64 bit server and got this all working.

I have a brother scanner that connects to my network, other scanners are supported and they can also be USB attached, for these devices a Google will normally help find the pieces of information required to complete the integration for your hardware setup.

Let’s start by installing the software from the shell command line type:

sudo apt-get update
sudo apt-get -y install sane
sudo apt-get -y install xsltproc libgtk2.0-dev libxml2-dev
sudo apt-get -y install libsane-dev libltdl-dev
sudo apt-get -y install gscan2pdf
sudo apt-get -y install lib32z1 lib32ncurses5

This take a while and I am not saying all these packages are needed, its just what I installed and managed to get to work; it also provided output conversion to PDF.

Next I needed to install the tool appropriate for my Brother scanner, for me this was achieved by the following command, if you have an older Brother scanner or a different vendor then you will need to Google for their Linux tool and how to install it.

For Brothers scanners follow the instructions found here:
Brother Network Scan

Test that you can discover your scanner by:

scanimage -L

and a good test of it performing a scan I use the command with my scanner, yours will most likely differ:

/usr/bin/scanimage -d 'brother4:net1;dev0' --format tiff > /tmp/SCAN-ot.tif

This is quite a difficult step and may take some time to get sorted.

Paul

4 Likes