Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

Adds automation for printing AprilTag labels on Brother QL-810W for equipment identification. Uses brother_ql library to bypass CUPS/drivers, enabling direct printing on Raspberry Pi (ARM).

New files in src/ac_training_lab/label_printer/

  • mwe_print.py - Minimal working example using brother_ql to send a test label
  • app.py - Gradio web app with AprilTag generation and MQTT integration for remote printing via HiveMQ
  • README.md - Setup instructions, env var configuration, troubleshooting, links to related issues

Usage

# MWE
export BROTHER_QL_PRINTER=tcp://192.168.1.100:9100
export BROTHER_QL_MODEL=QL-810W
python mwe_print.py

# Gradio app
export HIVEMQ_HOST=your-broker.hivemq.cloud
export HIVEMQ_USERNAME=...
export HIVEMQ_PASSWORD=...
python app.py

Closes #70

Original prompt

This section details on the original issue you should resolve

<issue_title>Set up QL810WC label printer automation with AprilTags</issue_title>
<issue_description>AccelerationConsortium/echem-cell#4

https://github.com/pklaus/brother_ql

https://stackoverflow.com/questions/55521301/printing-label-from-brother-ql-800-label-printer

i.e., with new pieces of equipment, autoprint an AprilTag to be affixed to it.</issue_description>

<agent_instructions>Three (and only three) new files within a nested dir in src. One readme with setup instructions and links back to (and links from) this issue. One that's the gradio script, which we'll be refining and one script that's a basic mwe to send a simple print. Pay attention to your custom instructions.

Random notes: read the brother issue</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@sgbaird https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/use-a-raspberry-pi-zero-w-as-a-wireless-print-server

https://www.reddit.com/r/IOT/comments/1cdj77v/which_label_printer_offers_the_best_api/</comment_new>
<comment_new>@sgbaird
Parts arrived

PXL_20241009_191126907.jpg

@SissiFeng Everything inside of the box ![image](https://github.com/user-attachments/assets/9da39e23-dc8b-432e-b66e-86a55fa87977) @SissiFeng The printer failed to connect to the IoT WiFi (an email has been sent to support).

The next step is to set up a Raspberry Pi connected to the label printer, configured for MQTT, and use MongoDB to store paired information (tag–device) and handle logging.</comment_new>
<comment_new>@SissiFeng
The Pi is all set up, the printer driver is 32 bit and this model can't be installed via ppd file (maybe downgraded or otherwise universal driven). The app.py deployed to hugging face tests fine locally, just missing the printer connection part.
截屏2024-10-15 12 19 52

@sgbaird Ok, thanks for checking into that. That's unfortunate the driver doesn't work out of the box. Maybe we don't actually need the desktop driver and can instead use the Python package directly? I'm seeing a few threads related to this:

Could you confirm?</comment_new>
<comment_new>@sgbaird
What do you think about this? https://stackoverflow.com/a/70015794/13697228</comment_new>
<comment_new>@SissiFeng
Brother QL-810W Printer Troubleshooting on Raspberry Pi Zero W

This summary outlines the key issues encountered and resolved so far, providing a reference for further troubleshooting.


  1. System Architecture and Package Compatibility
  • Brother's official drivers are for i386 (Intel) architecture, incompatible with Raspberry Pi’s ARM.
  • Switching from a 64-bit to a 32-bit Raspberry Pi system solved some issues but required manual driver extraction.
  1. Driver and Filter File Issues
  • The PPD and filter files were extracted manually, but CUPS logs indicated the filter was “missing” despite being correctly placed.
  • Potential symbolic link or permission issues affecting the filter.
  1. Perl Script Execution
  • The filter is a Perl script requiring Perl installation.
  • Perl failed to run due to locale errors, which persisted even after generating the required locale.
  1. Locale Configuration Problems
  • The system lacked the en_GB.UTF-8 locale, causing warnings during Perl execution.
  • Locale generation reduced some warnings, but not all.
  1. Unresponsive Print Jobs
  • Print jobs are queued, but the printer remains idle.
  • Jobs are stopped due to filter execution errors in CUPS.
  1. TLS Connection Errors
  • Repeated TLS fatal alert errors indicate potential encrypted communication issues between CUPS and the printer.
  1. Hardware Detection and USB Communication
  • The printer is recognized via lsusb, but communication problems persist, possibly due to configuration issues.

Unsolved Issues till now:

  1. Filter Execution Error
    The system reports the filter as missing, even though it is correctly installed.

  2. Printer Not P...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Set up QL810WC label printer automation with AprilTags Add Brother QL-810W label printer automation with AprilTags Nov 27, 2025
Copilot AI requested a review from sgbaird November 27, 2025 11:12
…ed files

- Created a new Markdown file for the Quick Setup Guide (D017P7001) detailing setup, applications, and troubleshooting for the QL-810W and QL-820NWB models.
- Added a new binary file for test purposes (test.lbx).
- Included a new binary image file for the Zadig interface (zadig-interface.png).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up QL810WC label printer automation with AprilTags

2 participants