Printing to a Brother DCP-T426W inkjet printer via two methods:
driverless.Supported platforms: Any device with CUPS + driverless (NAS, Linux, macOS) or Python 3 with TCP access (fallback).
FieldValueModelBrother DCP-T426WIP192.168.50.232ProtocolIPP ( ipp://192.168.50.232:631/ipp/print) — primary; TCP 9100 fallbackTypeColor Inkjet MFP (Print / Scan / Copy)Max Resolution4800 x 1200 dpiPaperA4, Letter, A5, A6, Photo (10x15cm), Envelopes
bash
# Print a text string (CUPS IPP)
python scripts/print.py --text "Hello World"
# Print a file (text, image, PDF — CUPS handles conversion)
python scripts/print.py --file document.txt
python scripts/print.py --file photo.jpg
python scripts/print.py --file report.pdf
# Print a receipt-style text
python scripts/print.py --text "Invoice #123\nTotal: $42.00" --mode receipt
# Print a test page
python scripts/print.py --test
# Check printer status
python scripts/print.py --status
# Fallback: TCP direct (text only, no CUPS needed)
python scripts/print.py --text "Hello" --method tcp
text
broder-printer/
├── SKILL.md # This file
├── CLAUDE.md # Project documentation
├── Brother_DCP-T426W/ # Brother driver files (backup only)
│ ├── drivers/
│ │ ├── Brother_DCP-T426W.ppd
│ │ └── Brother DCP-T426W CUPS.gz
│ └── readme.md
├── requirements.txt
└── scripts/
└── print.py # Main print CLI (IPP/CUPS primary, TCP fallback)
bash
# Linux (Debian/Ubuntu)
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups
# macOS — CUPS is built-in, skip this step
bash
# Generate PPD from printer's IPP capabilities
driverless "ipp://192.168.50.232:631/ipp/print" > ~/brother.ppd
# Add printer to CUPS
sudo lpadmin -p Brother_DCP-T426W \
-v "ipp://192.168.50.232:631/ipp/print" \
-E \
-P ~/brother.ppd
sudo lpadmin -p Brother_DCP-T426W -o printer-is-shared=false
# Verify
lpstat -p Brother_DCP-T426W -l
bash
echo "Hello" | lp -d Brother_DCP-T426W
IPP + driverless (default):
lp commandTCP direct (fallback, --method tcp):
FeatureIPP + driverlessTCP DirectSetupCUPS + driverlessNonesudo requiredSetup only (once)NoText printingYesYesImage printingYes (PWG-raster)No (raw bytes only)PDF printingYesNoPrint queueYesNoUse caseNAS, desktop, full featuresHeadless, no-root, text-only
bash
# Print any file CUPS understands
lp -d Brother_DCP-T426W file.txt
# Print with options
lp -d Brother_DCP-T426W -o media=A4 -o sides=one-sided document.pdf
# Check jobs
lpstat -o Brother_DCP-T426W
# Cancel jobs
cancel Brother_DCP-T426W
IssueSolutiondriverless: command not found``sudo apt install cups-filters ipp-usbIPP connection refusedVerify printer supports IPP: driverless (list available IPP printers)No paper outputCheck paper tray, ink levels, printer not in error stateTCP prints garbled textPrinter may not support PJL PLAINTEXT — use IPP methodCUPS printer not foundlpstat -p to list printers; re-run lpadmin setuplp command not foundsudo apt install cups-client