Skip to content
 
 

Latest commit

 

History

121 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brscan-mac

Native Apple Silicon scanning for older Brother network multifunction printers that predate driverless AirScan (eSCL).

Brother shipped its last macOS scanner driver as an Intel-only binary built against the macOS 10.10 SDK. On Apple Silicon that binary can't load, and models like the MFC-J6920DW don't advertise eSCL, so macOS has no way to scan from them. brscan-mac restores scanning by speaking Brother's raw scan protocol from a native arm64 build.

Status

Early development. The protocol core and a command-line scanning tool come first, followed by an Image Capture device module and a SANE backend.

Building

Requires macOS 26 or later on Apple Silicon, CMake 3.20 or later, a C++17 compiler, and libjpeg-turbo. On a machine with MacPorts:

/opt/local/bin/cmake -B build
/opt/local/bin/cmake --build build
ctest --test-dir build --output-on-failure

This builds the brscan protocol library, its test suite, and the brscan-cli command-line tool, at build/brscan-cli.

A handful of tests connect to a real scanner and are skipped by default. To run them too, set BRSCAN_TEST_HOST to your scanner's hostname or IP address before running ctest:

BRSCAN_TEST_HOST=BRWxxxxxxxxxxxx.local ctest --test-dir build --output-on-failure

Finding your scanner

brscan-cli needs your scanner's hostname or IP address on port 54921. Brother's network scanners advertise themselves over Bonjour as _scanner._tcp. Browse for them with dns-sd:

dns-sd -B _scanner._tcp

This lists the service names of scanners on your network (for example, BRW00AABBCCDDEE). Resolve one to a hostname with:

dns-sd -G v4 BRW00AABBCCDDEE.local

You can pass either the .local hostname or the resolved IP address to brscan-cli --host.

Using brscan-cli

Scan a color image at 300 dpi from the flatbed to a JPEG file:

build/brscan-cli --host BRW00AABBCCDDEE.local --output scan.jpg

Scan in grayscale at a lower resolution:

build/brscan-cli --host BRW00AABBCCDDEE.local --mode gray --resolution 100 \
  --output scan.pgm

Scan from the document feeder instead of the flatbed:

build/brscan-cli --host BRW00AABBCCDDEE.local --source adf --output scan.jpg

Scan a specific region instead of the full page, in pixels at the scan resolution:

build/brscan-cli --host BRW00AABBCCDDEE.local --area 0,0,1200,1600 \
  --output scan.jpg

Run build/brscan-cli --help for the full list of options. --mode determines the output file format: color writes a JPEG, gray writes a binary PGM. brscan-cli exits with a non-zero status and a message on stderr if the scan fails -- for example, if the scanner is busy or the document feeder is empty.

Scanning from the printer's Scan button

brscan-scand is a background agent that lets the printer's physical Scan button send a scan to this Mac. Press Scan on the device, pick this Mac and a destination -- File, Image, OCR, or E-mail -- and the daemon pulls the scan and handles it: saving it, opening it, producing a searchable PDF, or attaching it to a new Mail message. See docs/BUTTON.md for setup, and config/brscan-scand.conf.example for the configuration options.

Configuration app

Instead of hand-editing ~/.config/brscan-scand.conf, you can use Brscan Config, a standalone macOS app with a tabbed window for these same settings. cmake --build build packages it as an ad-hoc-signed Brscan Config.app (a menu-bar agent); gui/install.sh install copies it into /Applications. See gui/README.md for what it covers and how to build, sign, and install it, and docs/DISTRIBUTION.md for the signing details.

Trademark and affiliation

This project is unofficial and not affiliated with, authorized by, or endorsed by Brother Industries, Ltd., Apple Inc., or the TWAIN Working Group. "Brother" and model names such as "MFC-J6920DW" are used only to describe hardware compatibility; "Apple", "macOS", and "Image Capture" name the operating-system interfaces this software targets; "TWAIN" names the capability vocabulary (ICAP_*, TWON_*) that Apple's Image Capture interface reuses. All trademarks are the property of their respective owners.

License

Source code is licensed GPL-2.0-or-later. See LICENSE.

Documentation — the docs/ directory, PROVENANCE.md, and the README files — is licensed CC-BY-4.0 (SPDX-License-Identifier: CC-BY-4.0). The docs record interface facts reconstructed clean-room (see PROVENANCE.md); they contain no third-party source.

About

Native Apple Silicon scanning for older Brother network MFPs. Unofficial, not affiliated with Brother.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages