Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
```codex_answers
<!-- placeholder for codex's responses textual data -->
# Brother HL-L1222-V Android Print Server (Raspberry Pi 4B+ / openSUSE Tumbleweed)

This repository now provides an executable setup script that configures a Raspberry Pi 4B+ (openSUSE Tumbleweed) as a print server for a USB-connected Brother HL-L1222/HL-L1222-V.

## What this enables
- Android phones on the **same Wi-Fi network** can print through IPP (Mopria-compatible workflow).
- USB Brother printer is shared by CUPS over the local network.
- Firewall and discovery services are configured for LAN printing.

## Important Bluetooth note
Android-to-Raspberry-Pi Bluetooth printing into CUPS is generally not reliable/supported in modern Android/CUPS workflows. The script still enables Bluetooth service for optional experimentation, but the production path is **Wi-Fi IPP**.

## Script
- `scripts/setup_hl_l1222_android_print.sh`

## Run
```bash
sudo bash scripts/setup_hl_l1222_android_print.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 README says sudo bash but script comments say run as normal user

The README at line 18 instructs users to run sudo bash scripts/setup_hl_l1222_android_print.sh, which executes the entire script as root. However, the script's own header comment (scripts/setup_hl_l1222_android_print.sh:11-13) says "Run as a normal user from home directory (~/)" and uses sudo internally for privileged operations. Running as root makes all internal sudo calls redundant and could subtly change behavior (e.g., lpoptions -d at line 349 sets the default printer for root rather than a regular user). This inconsistency should be resolved.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

```

## After script completes
1. Keep printer connected via USB to Raspberry Pi.
2. Connect Android phone to same Wi-Fi as Raspberry Pi.
3. Enable Mopria Print Service (or equivalent Android print service).
4. Add printer with:
- `ipp://<raspberrypi-ip>/printers/Brother_HL_L1222_V`

## Notes
- Script uses CUPS `everywhere` model as default for broad compatibility.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: README incorrectly states that everywhere is the default model; the script actually prefers brlaser/Brother models and uses everywhere only as fallback.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 29:

<comment>README incorrectly states that `everywhere` is the default model; the script actually prefers `brlaser`/Brother models and uses `everywhere` only as fallback.</comment>

<file context>
@@ -1,3 +1,30 @@
+   - `ipp://<raspberrypi-ip>/printers/Brother_HL_L1222_V`
+
+## Notes
+- Script uses CUPS `everywhere` model as default for broad compatibility.
+- If you have an official Brother HL-L1222-V Linux PPD/driver package, install it and adjust queue model if desired.
</file context>
Suggested change
- Script uses CUPS `everywhere` model as default for broad compatibility.
- Script prefers a `brlaser`/Brother model when available, then falls back to CUPS `everywhere` (and finally a generic monochrome laser model).

- If you have an official Brother HL-L1222-V Linux PPD/driver package, install it and adjust queue model if desired.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Consider adding an article before "queue model" for clarity.

This small tweak preserves the meaning but improves the sentence flow.

Loading