Skip to content

Brother Driver

Matthijs Kooijman edited this page Jul 20, 2026 · 17 revisions

This page provides a place to discuss/plan the Brother driver in LPrint.

Files

  • "lprint-brother.c": Driver code
  • "lprint-brother.h": Driver name, make/model, and IEEE-1284 device ID strings

Commands

Command Description
<00> Invalidate (128 or more bytes)
<0C> Print command
<1A> Print command with feeding
<1B> @ Reset
<1B> i A <n> Set page number for "cut every"
<1B> i K <n> Set advanced settings
<1B> i M <n> Set each mode
<1B> i S Query status (all but PT-E550W/PT-P750W)
<1B> i a <01> Set raster command mode
<1B> i d <n1..2> Set margins
<1B> i z <n1..10> Set print information
M <n> Set compression mode
Z Zero raster graphics (all but QL-800)
g <00> <n> <d1..n> Raster graphics transfer (QL-Series)
g <n1..2> <d1..n> Raster graphics transfer (PT-Series)
w <c> <n> <d1..n> Two-color raster graphics transfer (QL-800/810W/820NWB)
<1B> i X G Query extended printer information

ESC i K <n> "Set Advanced Settings" Command

<n> is a single byte bitfield.

PT-series bits:

  • 0x01: Draft printing (PT-P900/P900W/P950NW)
  • 0x04: Half cut instead of full cut (all but PT-P710BT)
  • 0x08: Cut at end
  • 0x10: Special tape being used
  • 0x40: High resolution mode
  • 0x80: Don't clear expansion buffer

QL-series;

  • 0x01: Two-color printing (QL-800/810W/820NWB)
  • 0x08: Cut at end
  • 0x40: High resolution

Resolutions:

Model(s) High Normal
PT-E550W/P750W/P710BT 180x360dpi 180dpi
PT-P900/P900W/P950NW 360x720dpi 360dpi
All other PT-series 360dpi 360dpi
QL-570/580N/700/800/810W/820NWB/1100/1110NWB/1115NWB 300x600dpi 300dpi
All other QL-series 300dpi 300dpi

ESC i M <n> "Set Each Mode" Command

<n> is a single byte whose bits are:

  • 0x40: Auto cut
  • 0x80: Mirror printing (PT-series)

When “auto cut” is specified, the "ESC i A " command is valid.

ESC i S "Query Status" Command

Returns a 32-bit buffer of status information.

The response can be read using a USB read (BULK IN) transfer. This must be retried a few times, it has been observed (on PT-E550W) that the first one or two reads return an empty response, followed by the proper response. If a response is returned, it seems to always be returned as a single read result.

The PT-E550W/P750W/P710BT manual says that this status command is not supported by the PT-E550W and PT-P750W, but in practice it has been seen working on the PT-E550W, so the manual is probably wrong here.

Response:

Byte(s) Description Value(s)
0 Print head mark <80>
1 Size <20> (32 bytes)
2 Brother code "B" (<42>)
3 Series code See below
4 Model code See below
5 Country code "0" (<30>)
6 Battery level See below
7 Extended error See below
8 Error information 1 See below
9 Error information 2 See below
10 Media width See below
11 Media type See below
12 Number of colors <00>
13 Fonts <00>
14 Japanese fonts <00>
15 Mode Last "ESC i M" value
16 Density <00>
17 Media length See below
18 Status type See below
19 Phase type See below
20-21 Phase number (little-endian) See below
22 Notification number See below
23 Expansion area <00>
24 Tape color See below
25 Text color See below
26-29 Hardware settings/info Undocumented
30-31 Reserved <00>

Series/Model codes:

  • "0O" (<304F>): QL-500/550
  • "0P" (<3050>): QL-1050
  • "0Q" (<3051>): QL-650TD
  • "0d" (<3064>): PT-H500
  • "0e" (<3065>): PT-E500
  • "0f" (<3066>): PT-E550W
  • "0g" (<3067>): PT-P700
  • "0h" (<3068>): PT-P750W
  • "0o" (<306f>): PT-P900W
  • "0p" (<3070>): PT-P950NW
  • "0q" (<3071>): PT-P900
  • "0x" (<3078>): PT-P910BT
  • "41" (<3431>): QL-560
  • "42" (<3432>): QL-570
  • "43" (<3433>): QL-580N
  • "44" (<3434>): QL-1060N
  • "45" (<3435>): QL-700
  • "46" (<3437>): QL-710W
  • "47" (<3437>): QL-720NW
  • "48" (<3438>): QL-800
  • "49" (<3439>): QL-810W
  • "4A" (<3441>): QL-820NWB
  • "4C" (<3443>): QL-1100
  • "4D" (<3444>): QL-1110NWB
  • "4E" (<3445>): QL-1115NWB
  • "4G" (<3447>): QL-600

Battery levels:

  • 0x00: Full (PT-P900/P900W/P950NW)
  • 0x01: Half (PT-P900/P900W/P950NW)
  • 0x02: Low (PT-P900/P900W/P950NW)
  • 0x03: Needs to be charged (PT-P900/P900W/P950NW)
  • 0x04: Using AC adapter (PT-P900/P900W/P950NW)
  • 0x20: Full, not using AC adapter (PT-P910BT)
  • 0x22: Half, not using AC adapter (PT-P910BT)
  • 0x23: Low, not using AC adapter (PT-P910BT)
  • 0x24: Needs to be charged, not using AC adapter (PT-P910BT)
  • 0x30: Full, using AC adapter (PT-P910BT)
  • 0x32: Half, using AC adapter (PT-P910BT)
  • 0x33: Low, using AC adapter (PT-P910BT)
  • 0x34: Needs to be charged, using AC adapter (PT-P910BT)
  • 0x37: Battery not installed, using AC adapter (PT-P910BT)
  • 0xff: Unknown

Extended error values:

  • 0x10: FLe tape end
  • 0x1d: High-resolution/draft printing error
  • 0x1e: Adapter pull/insert error
  • 0x1f: Incompatible media error

Error information 1 bits:

  • 0x01: No media
  • 0x02: End of media
  • 0x04: Cutter jam
  • 0x08: Low battery
  • 0x10: Printer in use
  • 0x20: Printer turned off
  • 0x40: High-voltage adapter
  • 0x80: Fan motor error

Error information 2 bits:

  • 0x01: Incorrect media
  • 0x02: Expansion buffer full
  • 0x04: Communication error
  • 0x08: Communication buffer full
  • 0x10: Cover open
  • 0x20: Overheating error/cancel key
  • 0x40: Black marking not detected (load/feed error)
  • 0x80: System error

Media widths:

  • 0: No tape loaded
  • 4: 3.5mm tape
  • 6: 6mm tape or 5.8mm HS
  • 9: 9mm tape or 8.8mm HS
  • 12: 12mm tape or 11.7mm HS
  • 18: 18mm tape or 17.7mm HS
  • 21: 21x45mm FLe
  • 24: 24mm tape or 23.6mm HS
  • 29: 29mm tape
  • 36: 36mm tape
  • 38: 38mm tape
  • 50: 50mm tape
  • 54: 54mm tape
  • 62: 62mm tape
  • 90: 90mm tape
  • 102: 102mm tape
  • 103: 103mm tape

Media lengths:

  • 0: Unknown
  • 45: FLe 21x45mm
  • Other values: die-cut labels

Media types:

  • 0x00: No tape loaded
  • 0x01: Laminated tape
  • 0x03: Non-laminated tape
  • 0x04: Fabric tape
  • 0x0a: Continuous labels (QL-500/550/560/570/580N/650TD/700/1050/1060N/1100/1110NWB/1115NWB)
  • 0x0b: Die-cut labels (QL-500/550/560/570/580N/650TD/700/1050/1060N/1100/1110NWB/1115NWB)
  • 0x11: Heat-Shrink Tube (2:1)
  • 0x13: FLe tape
  • 0x14: Flexible ID tape
  • 0x15: Satin tape
  • 0x17: Heat-Shrink Tube (3:1)
  • 0x4a: Continuous labels (QL-600/QL-710W/QL-720NW/800/810W/820NWB)
  • 0x4b: Die-cut labels (QL-600/QL-710W/QL-720NW/800/810W/820NWB)
  • 0xff: Incompatible tape

Notification numbers:

  • 0x00: Not available
  • 0x01: Cover open
  • 0x02: Cover closed
  • 0x03: Cooling (started)
  • 0x04: Cooling (finished)

Phase types:

  • 0x00: Editing/receiving
  • 0x01: Printing (number is 0 if printing, 20 for cover open)

Status types:

  • 0x00: Reply to status request
  • 0x01: Printing completed
  • 0x02: Error occurred
  • 0x03: Exit IF mode
  • 0x04: Turned off
  • 0x05: Notification
  • 0x06: Phase change

Tape colors:

  • 0x01: White
  • 0x02: Other
  • 0x03: Clear
  • 0x04: Red
  • 0x05: Blue
  • 0x06: Yellow
  • 0x07: Green
  • 0x08: Black
  • 0x09: Clear (White Text)
  • 0x20: Matte White
  • 0x21: Matte Clear
  • 0x22: Matte Silver
  • 0x23: Satin Gold
  • 0x24: Satin Silver
  • 0x30: Blue (D)
  • 0x31: Red (D)
  • 0x40: Fluorescent Orange
  • 0x41: Fluorescent Yellow
  • 0x50: Berry Pink (S)
  • 0x51: Light Gray (S)
  • 0x52: Lime Green (S)
  • 0x60: Yellow (F)
  • 0x61: Pink (F)
  • 0x62: Blue (F)
  • 0x70: White (Heat-shrink Tube)
  • 0x90: White (Flex. ID)
  • 0x91: Yellow (Flex. ID)
  • 0xf0: Cleaning
  • 0xf1: Stencil
  • 0xff: Incompatible

Text colors:

  • 0x01: White
  • 0x02: Other
  • 0x04: Red
  • 0x05: Blue
  • 0x08: Black
  • 0x0a: Gold
  • 0x62: Blue (F)
  • 0xf0: Cleaning
  • 0xf1: Stencil
  • 0xff: Incompatible

ESC i d <n1..2> "Set Margins" Command

n = n1 + 256 * n2

Use 0 for die-cut labels, 35 for continuous tape on QL-550/560/570/580N/700.

ESC i z <n1..10> "Set Print Information" Command

Bytes are as follows:

Byte(s) Description
0 Information bits (see below)
1 Media type value (see above)
2 Media width (mm)
3 Media length (mm) or 0 for continuous
4-7 Raster size in bytes (little-endian)
8 0 for first page, 1 for subsequent pages
9 Reserved, 0

Information bits:

  • 0x02: Media type
  • 0x04: Media width
  • 0x08: Media length
  • 0x40: Quality
  • 0x80: Recover (always on)

M <n> "Set Compression Mode" Command

"n" is 0 for uncompressed and 2 for PackBits compression.

PackBits is supported by all but QL-500/550/560/570/700/800.

g <00> <n> <d1..n> QL-Series "Raster Graphics Transfer" Command

"d1..n" are the bytes for the current line.

g <n1..2> <d1..n> PT-Series "Raster Graphics Transfer" Command

n = n1 + n2 * 256 (number of bytes)

"d1..n" are the bytes for the current line.

ESC i X G Query extended information command

This causes the printer to return extended information in what looks like an ASCII-encoded INI-like format.

Like the query status command, a few empty reads usually happen before actual data is returned. Since the data is too big to fit in a single USB transfer, it will be spread over multiple reads. There does not seem to be a clear end of response marker, but it seems that all responses will be filled USB packets (64-byte chunks for the PT-E550W) except for the last read, which can be shorter. It probably also works to read until an empty read happens.

This command is not documented, but has been observed running the Brother PTouch Editor 5.x software, which sends the command to the printer on startup.

As an example, the PT-E550W (with 12mm tape loaded) sends the following response (preceded by a single packet that contains two bytes "DAD3":

<<PRINTER CONFIGURATION>>
[Printer]
FormVer =1.00
Printer =PT-E550W
PrintID =6430
SerialNo=REDACTED
ProgVer =V1.27
BootVer =V1.00
FontVer =V1.00
SymVer  =V1.00
EromVer =V0.020
PV      =    9,999,999
PN      =       90,000
GN      =       90,000
FP      =       90,000
CW      =       90,000
CF      =       90,000
PP      =       90,000
PD      =       90,000
MC      =       90,000
MN      =       90,000
CC      =       60,000
HC      =       60,000

[Printer Settings]
Auto Power Off =30Minute(s)

[File Memory]
Available =19836char
Files     = 1/99

[Transferred Memory]
Available  =6.0MB
Templates  = 0/99
Symbols    = 0/99
Database   = 0/99

[Network Cofiguration]
WLAN Mode       =Direct Mode
ConnectDevice   =Auto
SSID/NetWorkKey =Static
WLAN IP Address =0.0.0.0
WLAN MAC Address=AC-50-DE-REDACTED
WLAN NAME(SSID) =REDACTED
WFD IP Address  =192.168.118.1
WFD MAC Address =AE-50-DE-REDACTED
WFD NAME(SSID)  =DIRECT-brPT-E550WREDACTED

This output was generated from a USBPcap wireshark dump, exported to JSON and parsed with:

❯ cat status.json |jq --raw-output '.[] | ._source | .layers | ."usb.capdata"' | grep -v null | sed 's/://g' | xxd -r -p

Clone this wiki locally