cheatsheets devlog projects search

brother-scanner.md

Linux Scanning with a Brother Printer

2023-01-19 1

A very simple set of instructions to get the Brother DCP-L2550DW working with CentOS 7.4 over the network.

https://www.amazon.ca/Brother-DCPL2550DW-Wireless-Monochrome-Printer/dp/B0764P8F5J (246.98 @ Jan 19 2023)

I’m assuming the printer/scanner combo has already been set up and given an ip address. I am also assuming that everything has been confirmed to be working over the network with a Windows machine.

The first step is to install the sane-backends if you haven’t already. This will give us the scanimage utility.

yum install sane-backends

Once we have this installed, we can now install the Brother printer drivers.

https://support.brother.com/g/b/downloadlist.aspx?c=ca&lang=en&prod=dcpl2550dw_us&os=127

Specifically we want just the scanner driver:

https://support.brother.com/g/b/downloadend.aspx?c=ca&lang=en&prod=dcpl2550dw_us&os=127&dlid=dlf105203_000&flang=4&type3=564

This will let you download an rpm that we can then install:

yum install brscan4-0.4.11-1.x86_64.rpm

Now we need to configure the driver:

brsaneconfig4 -a name=Brother_DCP-L2550DW model=DCP-L2550DW ip=192.168.7.203

Now we can update /etc/sane.d/dll.conf and add brother4 to the list.

At this point we should be able to run scanimage -L:

root@andromeda /h/n/bp# scanimage -L
device `brother4:net1;dev0' is a Brother Brother_DCP-L2550DW DCP-L2550DW

Now load up a document and scan it!

scanimage --format tiff -d "brother4:net1;dev0" > image.tiff

This should have created a tiff image that we can do whatever we want with it.

convert image.tiff image.jpg
convert image.jpg image.pdf

Convert comes from the ImageMagick set of utilities that can be installed:

yum install ImageMagick

Voila! We can now scan images to pdf programmatically from linux using scanimage and a Brother printer.

As always arch has the most helpful wiki:

https://wiki.archlinux.org/title/SANE/Scanner-specific_problems

You can get the specific options for the Brother printer by doing:

scanimage -h -d 'brother4:net1;dev0'

fish ... Options specific to devicebrother4:net1;dev0’: Mode: –mode Black & White|Gray[Error Diffusion]|True Gray|24bit Color[Fast] [24bit Color[Fast]] Select the scan mode –resolution 100|150|200|300|400|600|1200|2400|4800|9600dpi [200] Sets the resolution of the scanned image. –source FlatBed|Automatic Document Feeder(left aligned)|Automatic Document Feeder(centrally aligned) [Automatic Document Feeder(left aligned)] Selects the scan source (such as a document-feeder). –brightness -50..50% (in steps of 1) [inactive] Controls the brightness of the acquired image. –contrast -50..50% (in steps of 1) [inactive] Controls the contrast of the acquired image. Geometry: -l 0..211.9mm (in steps of 0.0999908) [0] Top-left x position of scan area. -t 0..355.6mm (in steps of 0.0999908) [0] Top-left y position of scan area. -x 0..211.9mm (in steps of 0.0999908) [211.881] Width of scan-area. -y 0..355.6mm (in steps of 0.0999908) [355.567] Height of scan-area. “`