trq4hw
Last Updated: February 25, 2016
·
5.753K
· afterdesign

Brother scanner + linux (ubuntu server).

This post is part of my "nas-box project". You can read about hardware setup and other stuff in README on my github repo.

I have old(ish) all-in-one printer/scanner device Brother DCP-7030. When I scan some documents I like to do this only with buttons on the device. Without need to go to computer and click "scan" or merge PDFs manually. So when I decided not to buy proper NAS (which costs 2x what i paid for simple computer) first task was to create printer/scanner friendly env.

Happily Brother has good linux support and below you can find info what scripts I created, what they do and how I configured device under ubuntu server (13.04 currently).

Those scripts are prepared to work with brscan3 models)
In "brother" directory you can find scripts that I hacked to use hardware options to do what I want them to do (scan to tiff, pdf, merge multipages only with scanner) ;)

Dependencies:

Missing stuff:

Copy stuff

Brother manual

For brscan3 Users:
/usr/lib64/libbrscandec3.so.1.0.0
/usr/lib64/sane/libsane-brother3.so.1.0.7
/usr/lib64/sane/libsane-brother3.so.1
/usr/lib64/sane/libsane-brother3.so
/usr/lib64/libbrscandec3.so
/usr/lib64/libbrscandec3.so.1

Update udev

Brother manual

Now for Ubuntu 10.10 and above there is .deb with udev file/rules.
But still that didn't work for me out of the box.
All I needed to do is unhash lines in /etc/udev/rules.d/40-brother-libsane-type1.rules:

MODE="0666"
GROUP="scanner"
ENV{libsane_matched}="yes"
SYMLINK+="scanner-%k"

Update cfg

To use bash instead of sh edit /etc/opt/brother/scanner/brscan-skey/brscan-skey-0.2.4-0.cfg and update:

IMAGE="bash  /opt/brother/scanner/brscan-skey/script/scantoimage-0.2.4-0.sh"
OCR="bash  /opt/brother/scanner/brscan-skey/script/scantoocr-0.2.4-0.sh"
EMAIL="bash  /opt/brother/scanner/brscan-skey/script/scantoemail-0.2.4-0.sh"
FILE="bash  /opt/brother/scanner/brscan-skey/script/scantofile-0.2.4-0.sh"

Modes

Scan to image

I'm using this to scan multiple pages.

  1. just plain scan to tiff

Scan to file

I'm using this If I scanned multiple pages document and next document is single page. Also It can be used as single

  1. search for *.tiff files in $SCAN_PATH, convert them to PDF and merge to one pdf, delete all tiffs
  2. scan current document to tiff
  3. convert new single scan to pdf
  4. delete original tiff

Scan to e-mail

I'm using this when I scanned multiple pages document (and now it's time to convert it to pdf)
and I'm going to scan another multipage document.

  1. search for *.tiff files in $SCAN_PATH, convert them to PDF and merge.
  2. scan current document to tiff (no convertion to pdf)

Scan to ocr

Just plain merge of multiple pages document (PDFs).
This task may hang a minute before you can scan more with hardware button, use cancel and stop on
printer/scanner to stop after merging.

  1. search for *.tiff files in $SCAN_PATH, convert them to PDF and merge.
  2. no scanning needed

5 Responses
Add your response

8171

Hello,
I just bought a Brother ADS-2000 scanner. Seem like it use the same scripts system as your scanner. When I push the button on the scanner, your script scantofile starts. I'm interested in making a pdf file (multiples pages) with OCR but I don't understand how to start a scan in OCR mode. Can you explain me?

Thanks!

over 1 year ago ·
8172

Mmm and the scantofile work... but even if I give it 2 sheets I only get on scanned :(

over 1 year ago ·
8202

I'm not using OCR function. The OCR button on my scanner is merging already scanned files (to tiff) to one pdf.

If you want to scan multiple pages to one PDF you have 2 options with my scripts:
1. Scan every single page to image.
2. Run "scan to ocr" to merge those tiffs to one PDF.

You can also scan all pages except the last one with "scan to image" and the last one scan with "scan to file". This will scan the last page to image and then merge those images to one PDF.

I'm not using OCR because I'm scanning stuff like bills and then I'm putting them into evernote.

over 1 year ago ·
17423

Hi! I have download your scripts and I have personalized it with the correctly path.
I want to scan multiple image but if I use the ADF, the brother charge 2 or 3 sheets, but the results on the pc is one file with the first image.
I'm usign Fedora 20 64 bit
Why this problem?
Thank you for reply!

over 1 year ago ·
22602

Hi, i've the same problem of ohmer and delsa... My brother scans only one page per command... why?

over 1 year ago ·