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.
Early development. The protocol core and a command-line scanning tool come first, followed by an Image Capture device module and a SANE backend.
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-failureThis 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-failurebrscan-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._tcpThis lists the service names of scanners on your network (for example,
BRW00AABBCCDDEE). Resolve one to a hostname with:
dns-sd -G v4 BRW00AABBCCDDEE.localYou can pass either the .local hostname or the resolved IP address to
brscan-cli --host.
Scan a color image at 300 dpi from the flatbed to a JPEG file:
build/brscan-cli --host BRW00AABBCCDDEE.local --output scan.jpgScan in grayscale at a lower resolution:
build/brscan-cli --host BRW00AABBCCDDEE.local --mode gray --resolution 100 \
--output scan.pgmScan from the document feeder instead of the flatbed:
build/brscan-cli --host BRW00AABBCCDDEE.local --source adf --output scan.jpgScan 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.jpgRun 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.
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.
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.
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.
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.