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

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 instructs sudo but script documents running as normal user

The README at line 34 instructs sudo bash scripts/setup_hl_l1222_android_print.sh, while the script's own header (line 15-16) says to run as a normal user with sudo used internally. Running the entire script as root means sudo calls are redundant (harmless) but lpoptions -d at line 373 would set the default printer for root only, not for the normal user who will use the printer. This inconsistency is worth aligning in documentation.

(Refers to line 34)

Open in Devin Review

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

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.

high

The command sudo bash ... runs the entire script as root. However, the script is designed to be run as a normal user, and it uses sudo internally for privileged operations (as documented in scripts/setup_hl_l1222_android_print.sh on lines 15-16). Running the whole script as root is unnecessary, goes against the script's design, and could lead to unexpected behavior.

Suggested change
sudo bash scripts/setup_hl_l1222_android_print.sh
bash scripts/setup_hl_l1222_android_print.sh

```

## 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: The README incorrectly documents everywhere as the default model; the script actually prefers Brother/brlaser and only falls back to everywhere.

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>The README incorrectly documents `everywhere` as the default model; the script actually prefers Brother/brlaser and only falls back to `everywhere`.</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 Brother/brlaser model when available, then falls back to CUPS `everywhere` (and generic models) for compatibility.

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