add support for PT-P900Wc (04f9:2085, 360dpi, 36mm)

Add the PT-P900Wc with a 560px printhead and 360dpi resolution, using the
P700 init sequence, PackBits raster, the print-information command and
precut support. Verified printing on 36mm laminated tape.

The existing 360dpi handling doubled the 180dpi tape widths, which is wrong
for wide tapes: the 180dpi values are clamped by those printers' 128-pin
printheads, not the true printable area. Add a separate px360 column with
Brother's documented print areas (36mm = 454px, confirmed on hardware; the
narrower widths are from the raster reference and untested) and clamp the
result to max_px so 360dpi printers with a narrower head (PT-9200DX) stay
safe.

Also add the udev uaccess rule for 2085.
This commit is contained in:
Tobias Klausmann
2026-07-18 07:56:55 +02:00
committed by Dominic Radermacher
parent c8ce56e054
commit 9af6276135
3 changed files with 30 additions and 11 deletions
+2 -1
View File
@@ -26,7 +26,8 @@
struct _pt_tape_info {
uint8_t mm; /* Tape width in mm */
uint16_t px; /* Printing area in px */
uint16_t px; /* Printing area in px at 180 dpi */
uint16_t px360; /* Printing area in px at 360 dpi */
double margins; /* default tape margins in mm */
};
+27 -10
View File
@@ -33,16 +33,23 @@
#define _(s) gettext(s)
/* Print area width in 180 DPI pixels */
/* The 360dpi print-area values (px360) are Brother's documented values for
the PT-P900 series and are NOT simply double the 180dpi ones: the 180dpi
figures for wide tapes are clamped by those printers' 128-pin printheads,
not the actual printable width. Only 36mm has been verified on hardware;
the others come from Brother's raster reference. 21mm has no P900 spec
value and keeps the doubled figure. calc_tape_px() clamps the result to
the printer's max_px, so printers with a narrower printhead stay safe. */
struct _pt_tape_info tape_info[]= {
{ 4, 24, 0.5}, /* 3.5 mm tape */
{ 6, 32, 1.0}, /* 6 mm tape */
{ 9, 52, 1.0}, /* 9 mm tape */
{12, 76, 2.0}, /* 12 mm tape */
{18, 120, 3.0}, /* 18 mm tape */
{21, 124, 3.0}, /* 21 mm tape */
{24, 128, 3.0}, /* 24 mm tape */
{36, 192, 4.5}, /* 36 mm tape */
{ 0, 0, 0.0} /* terminating entry */
{ 4, 24, 48, 0.5}, /* 3.5 mm tape */
{ 6, 32, 64, 1.0}, /* 6 mm tape */
{ 9, 52, 106, 1.0}, /* 9 mm tape */
{12, 76, 150, 2.0}, /* 12 mm tape */
{18, 120, 234, 3.0}, /* 18 mm tape */
{21, 124, 248, 3.0}, /* 21 mm tape (360dpi value unverified) */
{24, 128, 320, 3.0}, /* 24 mm tape */
{36, 192, 454, 4.5}, /* 36 mm tape */
{ 0, 0, 0, 0.0} /* terminating entry */
};
struct _pt_dev_info ptdevs[] = {
@@ -82,6 +89,10 @@ struct _pt_dev_info ptdevs[] = {
{0x04f9, 0x2074, "PT-D600", 128, 180, FLAG_RASTER_PACKBITS},
/* PT-D600 was reported to work, but with some quirks (premature
cutting of tape, printing maximum of 73mm length) */
{0x04f9, 0x2085, "PT-P900Wc", 560, 360, FLAG_RASTER_PACKBITS|FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT},
/* PT-P900Wc: 360dpi, 560px printhead (70 bytes/raster line). Verified
printing on 36mm laminated tape. Narrower tape widths use Brother's
documented 360dpi print areas (see tape_info) but are untested. */
{0x04f9, 0x20af, "PT-P710BT", 128, 180, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT},
{0x04f9, 0x20df, "PT-D410", 128, 180, FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT|FLAG_D460BT_MAGIC},
{0x04f9, 0x20e0, "PT-D460BT", 128, 180, FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT|FLAG_D460BT_MAGIC},
@@ -425,12 +436,18 @@ int ptouch_calc_tape_px(ptouch_dev ptdev, const uint8_t tape_width_mm)
if (ptdev->devinfo->dpi == 180) {
tape_width_px = tape_info[i].px;
} else if (ptdev->devinfo->dpi == 360) {
tape_width_px = tape_info[i].px * 2;
tape_width_px = tape_info[i].px360;
} else {
fprintf(stderr, _("printer with %d dpi not supported\n"), ptdev->devinfo->dpi);
}
}
}
/* Never print wider than the physical printhead. This also keeps 360dpi
printers with a narrower head (e.g. PT-9200DX, 384px) safe when the
tape's printable area exceeds what they can drive. */
if (tape_width_px > ptdev->devinfo->max_px) {
tape_width_px = ptdev->devinfo->max_px;
}
return tape_width_px;
}
+1
View File
@@ -20,6 +20,7 @@ SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2064", MODE=
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2065", MODE="0660", TAG+="uaccess"
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2073", MODE="0660", TAG+="uaccess"
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2074", MODE="0660", TAG+="uaccess"
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2085", MODE="0660", TAG+="uaccess"
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20af", MODE="0660", TAG+="uaccess"
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20df", MODE="0660", TAG+="uaccess"
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20e0", MODE="0660", TAG+="uaccess"