Closed soundstorm closed 11 months ago
Settings in /etc/lprint.conf
:
DNSSDName LPrint
Contact
DefaultPrinterID 6
MaxImageSize 1073741824 16384 16384
NextPrinterID 8
UUID urn:uuid:e3555d54-8038-33d8-485a-47ba4fca7b58
<Printer did="MFG:Brother;CMD:PT-CBP;MDL:TD-4210D;CLS:PRINTER;CID:Brother TD Type" driver="zpl_4inch-203dpi-dt" id="7" name="Brother TD-4210D" uri="usb://Brother/TD-4210D?serial=000F2G731202">
DNSSDName Brother TD-4210D
Contact
MaxActiveJobs 0
MaxCompletedJobs 100
NextJobId 1
ImpressionsCompleted 0
label-mode-configured
media-col-default bottom="1" left="1" length="20320" name="oe_4x8-label_4x8in" right="1" source="main-roll" top="1" top-offset="100" tracking="web" type="labels" width="10160"
media-col-ready0 bottom="1" left="1" length="20320" name="oe_4x8-label_4x8in" right="1" source="main-roll" top="1" top-offset="100" tracking="web" type="labels" width="10160"
orientation-requested-default none
print-color-mode-default monochrome
print-content-optimize-default auto
print-quality-default high
print-scaling-default auto
sides-default one-sided
printer-resolution-default 203x203dpi
</Printer>
Whilst trying around again with calling the server manually - not via the service - it's back to the almost instant fallback to
media-col-default bottom="1" left="1" length="2402" name="oe_4x0.945669-label_4x0.945669in" right="1" source="main-roll" top="1" top-offset="100" tracking="web" type="labels" width="10160"
media-col-ready0 bottom="1" left="1" length="2402" name="oe_4x0.945669-label_4x0.945669in" right="1" source="main-roll" top="1" top-offset="100" tracking="web" type="labels" width="10160"
(But now in /root/.lprint.conf
)
[edited the findings (different behavior between started as service and directly run as root/user) in the main issue comment]
Try increasing the log level to debug and report on what lprint is getting from the printer... I haven't ever used one of these Brother printers so I have no idea what level of ZPL support it actually supports...
I'll try to connect it to a windows machine the next days with the official software, just in case I somehow modified something on the device. But the interesting fact is, that cups with a ZPL2 ppd is behaving the same way (printing just 1"; except it's not keeping the device busy in between, so the printer turns off after a while). But I'll try to increase the log level and report back.
The Windows Software does not let me select 4x8" because they are not officially sold by Brother themselves, but setting it to infinite and restricting again to 199mm does the job, so the printer itself works as expected.
I switched to log-level=debug on the snap installation.
D [2023-10-09T14:24:01.076Z] [Client 10] ready0-custom-units='custom_4x8in_4x8in',10160,20320
Looks promising and gets stored to the respective lprint.conf
But if I add the printer afterwards on my Mac, the communication seems to be the source of evil:
So there it changes to oe_4x0.945669-label_4x0.945669in
, which I change manually back to custom_4x8.
But as soon as the printing dialog is opened, the printer is configured back to the oe_4x0.945669-label_4x0.945669in
labels. I can change that in the web interface again to 4x8" whilst having the dialog open, but doesn't help at all. I'm getting either no print or just the ~1" height.
On windows the settings for the Printer via lprint/ipp say "Available paper: North America 4x6" but also prints just ~1":
Issuing a test print with previously set to 4x8":
OK, so the printer is returning a label length of 203 dots (1"), so either the printer needs to be configured with the proper label size or this is a bug in the Brother ZPL emulation...
Reading the ZPL II handbook and the log messages, I assume lprint sends ~JD
gets following message back and then resumes with ~JE
:
HS returned '\002158,0,0,0203,000,0,0,0,000,0,0,0\003\r\n\002000,0,0,0,0,2,6,0,00000000,1,000\003\r\n\0020000,0\003\r\n'
But I haven't found a documentation anywhere in the handbooks, how the response is supposed to be formatted.
Guessing by the output it seems like the response described by ~HS
:
serial=[1001110 does not resemble any valid configuration=USB?],paper_out=false,pause=false,label_length=0203dots,formats_in_receive_buffer=0,buffer_full=false,diagnostics=false,partial_format=false
...
...
So yes, the device is reporting 203px length. Odd. I'll contact Brother with that issue. But then the question would be: is the query mandatory to not trigger any "wrong media" errors by the device or could this be optional (default on) with a configuration flag in lprint?
Support request is pending.
After the support reported, that ZPL II should be working just fine, I got a link to the "Printer Setting Tool". Did a factory reset, registered a new paper type and everything's fine.
So now I can confirm, that it works with TD-4D series.
If there is some autodetection based on USB ID: 04f9:20f2
for the TD-4210D with 4" ZPL II Direct Thermal.
Thanks for troubleshooting 🤩
No problem, glad everything is working for you...
All configuration is done via webinterface if not stated otherwise.
Host: Raspberry Pi 4 / Debian 11 64bit Device: Brother TD-4210D, USB Driver: Zebra ZPL 4-inch/203dpi/Direct-Thermal Media: 4x8" labels with spacing/web (german translation is wrong with "Internet", was Web before but don't know what changed.) Print result: only 1" high prints, advancing to next label while leaving rest of the label blank.
1. try:
Installed via apt (lprint 1.1.0/libpappl1 1.3.1-2). Added the TD-4210D with 4" direct thermal ZPL2 profile. Got it to print 5" high test as a 4x5" default setting. Wanted it to change to 4x8" as this is the medium inserted. It always kept spawning to 4x0.945276" (newer versions just 4x1") when started manually with
sudo lprint server
. Deleted the printer multiple times, added it again, EPL driver doesn't work. When trying to configure the mediaoe_4x8-label_4x8in
via command line, lprint yieldsunsupported media-default keyword value
. CoWhen run via the systemd service I could modify it to display 4x8" constantly in the webinterface, but the print on the paper still won't get longer than 1". Also tried changing it back to 4x5" or other formats with no luck.4x5" Testpage with 4x1" Testpage and Print from Mac overlaying for less waste whilst testing. Also tried on blank pages and started on half advances pages as well, to eliminate the possibility of a sensor issue.
2. try:
Tried to install 1.3.0 from scratch. Uninstalled libpappl and lprint, compiled right from the git, ran into the same issue as in https://github.com/michaelrsweet/lprint/issues/37#issuecomment-1003715367 (libpappl not found) and manually softlinked the /usr/local/lib/libpappl.* to /usr/lib/$1. Failed to find any usb devices afterwards, might have missed some requirements, given up quickly, as I was already struggling for two days with that printer.
3. try:
Installed via snap (1.2.0). Took a while to recognize usb devices, but still same issues as in first try. But in that version the test image from the webinterface is now a bordered checkered pattern instead of fully filled, yeay.
Results
Neither the internal testprint, nor issuing lprint directly on a png (with adequate media setting) did produce a different outcome, also tried printing from Mac and Windows remotely with same moderate success (stopped printing after 1", then advancing to the next label.