-
-
Notifications
You must be signed in to change notification settings - Fork 42
I have a Brother QL-820NWB, and I'm trying to use lprint to print to it, but whenever I send it a print job the screen on the printer says "Wrong Roll Type -- Check the print data and try again."
I'm on Debian 13, and I've tried both the lprint version included with Debian (1.3.1), as well as building 1.4.0 from source.
The printer is connected to wifi, and I added it using lprint add -d ql820 -v socket://192.168.15.193 -m brother_ql-820nwb
I'm trying to print using lprint submit -d ql820 -o media=oe_dk1202-shipping_2.4x3.9in image.png, but the printer's light starts flashing red and displays the error message above. The labels installed in the printer are the dk1202 type.
I've tried adding the options -o media-type=labels -o print-color-mode=monochrome, as well as removing all options, but I still get the same error.
The printer settings have a "command mode" options, that is currently set to "P-Touch Template". I tried setting it to "Raster" and "ESC/P", but that didn't make a difference.
Any tips for how to get this to work? I was able to print a standard CUPS test page via the auto-detected driverless printer, but haven't been successful with lprint.
All reactions
Replies: 2 comments 8 replies
There are a couple pending PRs that try to fix issues in the (experimental) Brother drivers, you might want to try them...
All reactions
I've tried building PRs #215, #216, and #217 separately, but the submit commands still resulted in the same error on the printer. I tried printing with the commands ./lprint submit -d ql820 -o media=oe_dk1202-shipping_2.4x3.9in image.png and ./lprint submit -d ql820 -o media=oe_dk1202-shipping_2.4x3.9in -o media-type=labels -o print-color-mode=monochrome image.png.
I feel like there is something basic that I'm doing wrong, as it sounds like other people have been successful in getting lprint to print. Are there restrictions on the pixel size of the image? The png I'm using is roughly the right aspect ratio.
All reactions
One of the odd things I noticed is that the file ~/.config/lprint.state has the wrong media types in the printer definition
I had added the printer with the command ./lprint add -d ql820 -v socket://BRWF4289D8DBA11 -m brother_ql-820nwb -o media=oe_dk1202-shipping_2.4x3.9in -o media-type=labels -o print-color-mode=monochrome
DNSSDName LPrint
Contact
DefaultPrinterID 1
MaxImageSize 1073741824 16384 16384
NextPrinterID 2
UUID urn:uuid:78fc0a8d-86b9-3ba2-794e-f01a89e90f77
<Printer did="MFG:Brother;MDL:QL-820NWB;CMD:PWGRaster,URF,application/vnd.brother-pt-cbp,application/vnd.lprint-test,JPEG,PNG;" driver="brother_ql-820nwb" id="1" name="ql820" uri="socket://BRWF4289D8DBA11">
DNSSDName ql820
Contact
MaxActiveJobs 0
MaxCompletedJobs 100
NextJobId 2
ImpressionsCompleted 1
media-col-default bottom="1" left="1" length="9906" name="custom_60.96x99.06mm_60.96x99.06mm" right="1" source="main-roll" top="1" type="labels" width="6096"
media-col-ready0 bottom="1" left="1" length="9906" name="roll_dk2205-continuous_2.4x3.9in" right="1" source="main-roll" top="1" type="continuous" width="6096"
orientation-requested-default none
print-color-mode-default monochrome
print-content-optimize-default auto
print-quality-default normal
print-scaling-default auto
printer-darkness-configured 50
sides-default one-sided
printer-resolution-default 300x300dpi
Job completed="1787862398" created="1787862387" format="image/png" id="1" imcompleted="1" impressions="1" name="R70_cropped_resized.png" processing="1787862387" state="9" username="mgulick"
</Printer>
I tried killing the lprint server, changing these strings to oe_dk1202-shipping_2.4x3.9in, and the type to labels, but it didn't appear to help.
All reactions
A dump of what is sent to the printer would help, ideally decoded with ptexplain.
All reactions
[...] I don't see any way to capture what lprint is sending to the printer. Do you know how?
Should be documented in the lprint-add man page, but it's not. Something like this should work:
$ touch /tmp/debug1
$ ./lprint add -d debug1 -m brother_ql-820nwb -v file:///tmp/debug1
All reactions
$ touch /tmp/debug1 $ ./lprint add -d debug1 -m brother_ql-820nwb -v file:///tmp/debug1
Unfortunately that doesn't seem to be supported. Maybe it's a limitation of the Brother driver implementation?
$ ./lprint add -d debug1 -m brother_ql-820nwb -v file:///tmp/debug1
lprint: Unable to add printer: Unsupported smi55357-device-uri uri value.
All reactions
You might need an extra slash. Here's my notes about the PT printer I am working with:
Dumping lprint output to a file
./lprint add -d e550w-file -v file:////home/matthijs/tmp/e550w -m brother_pt-e550w
This creates a file (named aftter the job, possibly overwriting
a previous file) in the given directory. For this, the directory must
exist before adding the printer, and it must exist when a job is printed
(otherwise it is taken as a filename and created as a file, appending
new jobs to it). This means it is not so easy to print to /tmp, since
that is cleared on reboot.
To view the generated output:
ptexplain --input "$(ls -t -1 ~/tmp/e550w/*.prn | head -1)"
All reactions
You might need an extra slash.
Sorry, still no luck unfortunately -- same error. I'm on Debian 13, which includes libpappl-1.3.1 and libcups-2.4.10. Thinking that perhaps the version of libpappl was the problem, I tried cloning the pappl repository, but it wouldn't build against libcups < 2.5. I tried building an older version of it (1.4.0), which did build, and I added it to LD_LIBRARY_PATH, but it didn't help unfortunately.
I then tried to use distrobox to set up an Arch Linux container, which should have newer libraries than Debian. Unfortunately it didn't help at all. That came with libcups-2.4.19 and libpappl-1.4.12. I rebuild lprint against these, but I still can't use the file URI. After digging into the source a little bit, it seems like that error is coming from libcups, so I must need a newer cups.
@matthijskooijman What distro are you using and what is your development setup? Are you linking against your own builds of libpappl and libcups?
All reactions
These are the sources I'm using right now (installed in this order):
https://github.com/OpenPrinting/libcups.git v3.0.2-44-ga932cb9c8
https://github.com/michaelrsweet/pappl.git v1.4.0-406-g44327aa
https://github.com/michaelrsweet/lprint.git v1.4.0-10-gb55366f
Note that I also have cups-2.4.19 installed, but that's separate from libcups (which interestingly contains libcups3.so).