pklaus / brother_ql_web

A Python-based web service to print labels on Brother QL label printers. Based on brother_ql: https://github.com/pklaus/brother_ql
GNU General Public License v3.0
254 stars 124 forks source link

QL-800 red blinking light on print #43

Open every-coin-online opened 1 year ago

every-coin-online commented 1 year ago

I didn't change anything in my environment, although I did a general update after I got this error. Ubuntu 20.04.6 LTS, can't work it out. Was working for a year prior to this. (Great app, thank you saves a lot of time).

FriedrichFroebel commented 1 year ago

Is there anything shown in the terminal? Did you choose the correct printer type and connection? Is the Editor Lite mode disabled?

every-coin-online commented 1 year ago

Hi, thank you for your response.

Terminal shows:

127.0.0.1 - - [02/May/2023 08:37:41] "POST /api/print/text HTTP/1.1" 200 17

The config.json file is as follows:

{ "SERVER": { "PORT": 8013, "HOST": "", "LOGLEVEL": "WARNING", "ADDITIONAL_FONT_FOLDER": false }, "PRINTER": { "MODEL": "QL-800", "PRINTER": "file:///dev/usb/lp0" }, "LABEL": { "DEFAULT_SIZE": "62", "DEFAULT_ORIENTATION": "standard", "DEFAULT_FONT_SIZE": 70, "DEFAULT_FONTS": [ {"family": "Minion Pro", "style": "Semibold"}, {"family": "Linux Libertine", "style": "Regular"}, {"family": "DejaVu Serif", "style": "Book"} ] }, "WEBSITE": { "HTML_TITLE": "Label Designer", "PAGE_TITLE": "Brother QL Label Designer", "PAGE_HEADLINE": "Design your label and print it…" } }

Editor Lite mode is disabled by default when I turn the printer on. If I turn it on and try to print, I get this in the terminal:

127.0.0.1 - - [02/May/2023 08:36:42] "POST /api/print/text HTTP/1.1" 200 17 WARNING:main:Exception happened: [Errno 2] No such file or directory: '/dev/usb/lp0' 127.0.0.1 -

FriedrichFroebel commented 1 year ago

This usually indicates that your USB port has changed or the udev rule is missing. What does ls -l /dev/usb show?

every-coin-online commented 1 year ago

Thank you for your help.

ls -l /dev/usb shows: total 0 crw-rw---- 1 root lp 180, 0 May 3 07:32 lp0

FriedrichFroebel commented 1 year ago

Are your udev rules for the printer still intact? Id est, do you have any Brother-specific rules in /etc/udev/rules.d/ which match your device?

Example: File /etc/udev/rules.d/69-brotherql-labelprinter.rules with the content

# udev rules for Brother QL label printers using usb

# Source: https://github.com/pklaus/brother_ql/issues/121
# Get IDs with `lsusb`.
# Installation:
# - Copy this file to /etc/udev/rules.d/
# - Run the command:
#       udevadm control --reload && udevadm trigger

ACTION!="add|change", GOTO="brotherql_rules_end"
SUBSYSTEM!="usb|usbmisc", GOTO="brotherql_rules_end"

# QL-800
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="209b", TAG+="uaccess"

LABEL="brotherql_rules_end"
every-coin-online commented 1 year ago

Hi, 69-brotherql-labelprinter.rules was not there. I created it with the code above, same issue - blinking red light.

how do I check idVendor and idProduct values? Is that even the issue?

FriedrichFroebel commented 1 year ago

Did you trigger a reload for the rules, for example by rebooting the Ubuntu device?

every-coin-online commented 1 year ago

I don't believe this file reappears after a reload. I've restarted the desktop this Ubuntu instance is on several times since the issue manifested.