-
-
Notifications
You must be signed in to change notification settings - Fork 42
Brother Driver
This page provides a place to discuss/plan the Brother driver in LPrint.
- "lprint-brother.c": Driver code
- "lprint-brother.h": Driver name, make/model, and IEEE-1284 device ID strings
| 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) |
<n> is a single byte whose bits are:
PT-series:
| Bit | Description |
|---|---|
| 0 | 1 = draft printing, 0 = normal printing (PT-P900/P900W/P950NW) |
| 1 | Not used |
| 2 | 1 = half cut, 0 = full cut (all but PT-P710BT) |
| 3 | 1 = cut at end, 0 = no cut |
| 4 | 1 = special tape being used, 0 = normal tape |
| 5 | Not used |
| 6 | 1 = high resolution, 0 = normal (see below) |
| 7 | 1 = don't clear expansion buffer, 0 = clear buffer |
QL-series;
| Bit | Description |
|---|---|
| 0 | 1 = two-color printing, 0 = one-color printing (QL-800/810W/820NWB) |
| 1 | Not used |
| 2 | Not used |
| 3 | 1 = cut at end, 0 = no cut |
| 4 | Not used |
| 5 | Not used |
| 6 | 1 = high resolution, 0 = normal (see below) |
| 7 | Not used |
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 |
"n" bits:
- 0x40: Auto cut
- 0x80: Mirror printing (PT-series)
When “auto cut” is specified, the "ESC i A " command is valid.
Returns a 32-bit buffer of status information:
| 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-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
n = n1 + 256 * n2
Use 0 for die-cut labels, 35 for continuous tape on QL-550/560/570/580N/700.
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)
"n" is 0 for uncompressed and 2 for PackBits compression.
PackBits is supported by QL-580N/650TD/1050/1060N.
"d1..n" are the bytes for the current line.
n = n1 + n2 * 256 (number of bytes)
"d1..n" are the bytes for the current line.