Specifications

P25 Development Guide
www.bluebamboo.com
34
3.4.1 Format of Printing or Downloading Data Frame
C0H
(SOF)
‘D’
(0x44)
(TOF)
DATA
ID
Number
DATA
Length
DATA CHECK
SUM
C1H
(EOF)
1 Byte 4 Bytes Data 2 Bytes
When printing data or downloading data to the printer, the communication protocol should
comply with the upper communication structure.
Data ID number: ‘0’~‘9’ (0x30~0x39). Every time the host sends a new print data frame, it
increases this number.
Data Length: “0001” ~ “3000”. Each number must be an ASCII code, the highest byte of
Data Length should be transmitted first, P25 does not support printing more than 3000
characters per frame.
Checksum: 2 bytes. The first byte is the result of XORing the even parts of data in the Print
Data field and the second byte is from doing the same to the odd numbers.
[Example] If “SAMPLE TEST” is in Print Data field, the data length will be “0011 (0x30 0x30
0x31 0x31)” and the first byte of checksum will be the result of XOR of S, M, L,
space, E, and T and the second byte that of A, P, E, T, and S.
It is recommended that the host goes back to the initial stage in case it receives neither ETO
nor NACK from the printer one second after it has sent the print data frame.
Before downloading, enter the DOWNLOAD mode first by pressing FEED, and then turn on
the printer, which is the only way to enter the DOWNLOAD mode.
However, in order to download anything to FLASH memory, you should comply with the
FLASH space distribution and storage format; for details please see the Flash Memory
Distribution Map.
3.4.2 Format of Flash Erase Frame
C0H
(SOF)
‘E’(0x45)
(TOF)
DATA ID
Number
DATA
Length
DATA
CHECK
SUM
C1H
(EOF)
DATA Length is equal to 8 in this command, because there are just 8 bytes in the DATA field
for this command.
The DATA field contains two parts, the “Start address” and “File size”, both of which occupy
4 bytes.
“Start address” is used to define the start address for erasure of FLASH memory, and the
command will erase information from this address to the end of the whole chip. The “File
size” section defines the byte number you want to erase from FLASH memory from the start
address.