Specifications
P25 Development Guide
www.bluebamboo.com
31
3. Introduction of Communication
Protocol
The P25 printer supports two types of communication, plain text protocol and framing protocol,
Plain text protocol is much simpler however with limited features. The framing protocol supports
more features and is recommended.
Those two protocols can be automatically interpreted on the fly by the P25.
3.1 Plain Text Protocol
Plain text protocol is very simple, for example, if you want to print the string “abc”, you can just
send the string “abc” to the serial port, and then attach a CR. The P25 will store every character
received from the buffer, and after meeting a ‘CR’, it will print all the characters in buffer. The user
can also send ESC commands by using the plain text protocol. In fact, the user can connect a
terminal like “Hyper terminal” in Windows to the P25, and type something to make the printer print.
If using the plain text protocol to print text, no data will be sent from the P25, so the user will have
to wait until the P25 finishes printing, and the waiting time depends on the contents that are
printed. If the user wants to get an active response and have more time to send additional data, it
is better to use the framing protocol than use plain text protocol.
If P25 receive data in Plain Text Protocol, P25 would not respond any result except it receives the
ESC/GS Commands with respond info(GS I n command),
3.2 Framing Protocol
Communication Frame Structure
SOF
(Start Of Frame)
TOF
(Type Of Frame)
DATA
EOF
(End Of Frame)
1 Byte 1 Byte Variable 1Byte
Type of Frame Value Field
ACK 0x06 X
NACK 0x15 X
ENQ 0x05 X
DATA ‘D’ (0x44) O
FLASH Erase ‘E’ (0x45) O
Download Mode ‘F’ (0x46) O
Printer Status Response ‘S’ (0x53) O
Printer Status Inquiry ‘Q’ (0x51) X
EOT 0x04 X
ETX 0x03 X