
Printing Protocol description for the PT-9500PC - NEW 01-JUN-2007
Cristian Georgescu kindly submitted a couple of very useful documents that describe in detail the protocols used by the Brother PT-9500PC label printer.
That protocol is very similar to the one used by the QL500/QL550 below, so anyone looking at implementing a driver or a hardware solution might want to have a close look at these documents:
- Official PT-9500PC Raster Mode Command Reference PDF from Brother.
- Official PT-9500PC ESC/P Command Reference PDF from Brother.

Printing Protocol description for the QL-500/QL-550 - v1.4 (06-FEB-2007)
These findings are incomplete and they are probably erroneous in many ways. They are the fruit of my and other contributor's trials on the Brother P-Touch QL-500/QL-550 label printers and did not involve Brother® at all. If you have information about the protocol, please let me know: .
Purpose
I did this to be able to print labels on this printer from Linux. See QL550LabelPrinter for more information on this project.
The purpose of collecting these data is to ensure interroperabilty between this printer and Operating Systems unsupported by the manufacturer.
Reading / Writting
Data is sent and received through the USB interface.
Need direct access to USB block write/read, with libusb on Windows/Linux platforms
or on Linux only, through simple access to the /dev/usb/lpX device.
Sequence of calls for 1 label jobs:
- Reset
- Init
- Get Printer Status -> returns 32 byte status
- Init
- Set Page Length
- Set Side Margin
- Image data -> returns 3x32 byte status
- Job Completion
- Init
Sequence of calls for 2 or more labels jobs:
- Reset
- Init
- Get Printer Status -> returns 32 byte status
- Init
- Set Page Length
- Set Side Margin
- Image data -> returns 3x32 byte status
- Page completion
- Set Page Length
- Set Side Margin
- Image data -> returns 3x32 byte status
- Job Completion
- Init
Basic commands
Numbers in block are in Hexadecimal.
Findings flagged with ?? are uncertain and need confirmation.
Reset - 200 bytes00 x 200
Init - 2 bytes1b 40
Get Printer Status - 3 bytes1b 69 53
Returns a 32 bytes status:80 20 42 30 4f 30 00 00 00 EC LW MT 00 00 ID 0000 LL SK BS 00 00 00 00 00 00 00 00 00 00 00 00
Each byte address in the status is detailed as follow:
- 09
(09h): ECError Code (SK flag =02)
-00: No Error
-10: Cover Open
-40: Paper Out - 10
(0Ah): LWLabel Width in mm
-1D: 29mm
-3E: 62mm - 11
(0Bh): MTMedia Type ??
-0A: White Paper Tape
-0B: Standard Address Labels - 14
(0Eh): IDLabel hardcoded ID set by the base of the roll holder
(see section Roll base encoding below) - 17
(11h): LLLabel Length in mm
-00: Continuous roll
-5a: 90mm long labels - 18
(12h): SKStatus Kind
-00: Reply to Status Request
-01: Printing completion
-02: Error, refer toECbyte for more details
-06: Buffer status (read withBS) - 19
(13h): BSBuffer Status ?? (only whenSK=06)
-00: Buffer empty ??
-01: Buffer busy ??
-04: Undefined ??
Set Page Length (number of lines to be printed) - 13 bytes1b 69 7a 00 MT LW LL LB HB 00 00 00 00MT, LW, LL are identical to those returned by the Get Printer Status.LB HB = length of page in 1/300inch (least significant byte first).
Set Paper Cut and Side Margin - 9 bytes1b 69 4d PM 1b 69 64 LB HBPM = A logical OR combination of 80 for Mirror printing and 40 for Auto Cut after the label is printed, 00 otherwise (only for QL550).LB HB = size of margin in 1/300inch
Note: Mirrorring must be done in software as the printer hardware does not perform it automatically.
Line Image Data - 93 bytes
Prints a single 1/300inch line.
Line Header: 67 00 5a
Line Data : PX x 90PX = binary representation of the line image: each bit set to 1 prints a dot. Bits are printed right-to-left, with bit 7 rightmost.
The packet is always 90 bytes (5Ah) as this printer model is 62mm wide (720 dots at 300dpi).
Note: the first and last 12 bits are set to 0 to create a small margin (1.35mm) along the length of the label.
eg: a black line 1/300inch thin:
67 00 5a 00 0f ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff ff f0 00
eg: a black line on a 29mm wide label
67 00 5a 00 ff ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff ff ff ff ff ff ff ff ff ff c0 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00
Image Data - Line Image Data (93 bytes) x Page length
The set of lines that make the full image to be printed.
Data: Line Image Data x Page Length
Job Completion or Page completion1a if job is completed (no other labels following in this job)0c if page is completed (more labels follow)
Both return the following 3x32 byte status sequentially:
80 20 42 30 4f 30 00 00 00 00 LW MT 00 00 RB 0000 00 06 01 00 00 00 00 00 00 00 00 00 00 00 0080 20 42 30 4f 30 00 00 00 P1 LW MT 00 00 RB 0000 LL P2 01 00 00 00 00 00 00 00 00 00 00 00 00LW/LL/MT= Label Width/Length/Media Type (see above)RB= Roll Base encoding (see below)P1=00if OK,40if Paper OutP2=01if OK,02if Paper Out- This one is sent only if no error occured in the previous packet
80 20 42 30 4f 30 00 00 00 00 LW MT 00 00 RB 0000 LL 06 00 00 00 00 00 00 00 00 00 00 00 00 00
Roll base encoding
Each roll base has a number of holes encoding its model number (a depressed pin in the printer sets the bit to 1):
4 3
2
1
0
|
List of kown label types and their corresponding code (bit 4 = 0):
- 01 : 29x90mm white paper labels - Ref DK-11201
- 02 : 38x90mm white paper labels - Ref DK-11208
- 03 : 62x29mm white paper labels - Ref DK-11209
- 04 : 62x100mm white paper labels - Ref DK-11202
- 05 : 17x54mm white paper labels - Ref DK-11204
- 06 : 17x87mm white paper labels - Ref DK-11203
- 07 : 58x58 CD/DVD film labels - Ref DK-11207
Continuous rolls (bit 4 = 1):
- 14 : 29mm continuous white paper or film(?) roll - Ref DK-22210 or 22211
- 15 : 62mm continuous white paper roll - Ref DK-22205
- 16 : 29mm continuous white film or paper(?) roll - Ref DK-22211 or 22210
- 17 : 62mm continuous white or yellow (?) film roll - Ref DK-22206 or DK-22212
- 18 : 62mm continuous yellow or white (?) film roll - Ref DK-22212 or DK-22206
- 19 : 62mm continuous clear film roll - Ref DK-22113
- 1a : 12mm continuous white paper roll - Ref DK-22214
The data on this page is given without warranty and is for information only.
Thanks to Ralf Muschall, Arne John Glenstrup and Arne Ljung who have helped with their remarks, corrections and additions.
Hi, I have complemented the Job Completion or Page completion status messages with LW MT and LL information, I have got this from my QL-550 printer and 29x90 mm labels. Se below for the updates. 1a if job is completed (no other labels following in this job) 0c if page is completed (more labels follow) Both return the following 3x32 byte status sequentially: * 80 20 42 30 4f 30 00 00 00 00 LW MT 00 00 RB 00 00 LL 06 01 00 00 00 00 00 00 00 00 00 00 00 00 * 80 20 42 30 4f 30 00 00 00 P1 LW MT 00 00 RB 00 00 LL P2 01 00 00 00 00 00 00 00 00 00 00 00 00 P1 = 00 if OK, 40 if Paper Out P2 = 01 if OK, 02 if Paper Out * This one is sent only if no error occured in the previous packet 80 20 42 30 4f 30 00 00 00 00 LW MT 00 00 RB 00 00 LL 06 00 00 00 00 00 00 00 00 00 00 00 00 00 RB stands for Roll base encoding. Best Regards
Hi Arne, I've included your findings. thanks a lot!