P25 Development Guide
www.bluebamboo.com 3
Table of Contents
1 Introduction................................................................................................................................... 5
1.1 Purpose .......................................................................................................................... 5
1.2 Scope ............................................................................................................................. 5
2 ESC commands............................................................................................................................ 6
2.1 Print Commands.................................................................................................................... 7
2.2 Line Space Commands....................................................................................................... 10
2.3 Character Commands ......................................................................................................... 11
2.4 Keypad Button Commands ................................................................................................. 16
2.5 Print Position Commands.................................................................................................... 16
2.6 Bit-Image Commands..........................................................................................................20
2.7 Miscellaneous Function Commands ................................................................................... 24
2.8 Control Device Commands ................................................................................................. 25
2.9 ESC/GS Commands with Respond Info ............................................................................. 27
2.10 Enter/Quit Bridge Mode Commands ................................................................................. 28
2.11 Realtime Commands......................................................................................................... 29
3. Introduction of Communication Protocol ................................................................................... 31
3.1 Plain Text Protocol .............................................................................................................. 31
3.2 Framing Protocol................................................................................................................. 31
3.3 Process of Getting the Printer Status.................................................................................. 32
3.4 Printing or Downloading Data ............................................................................................. 33
3.4.1 Format of Printing or Downloading Data Frame .......................................................... 34
3.4.2 Format of Flash Erase Frame...................................................................................... 34
3.4.3 Format of Download Frame ......................................................................................... 35
3.4.4 Format of ENQ Frame ................................................................................................. 35
3.4.5 Format of Frame of request to MSR............................................................................ 35
3.4.6 MSR Response Frame Format.................................................................................... 36
3.4.7 ACK Frame Format...................................................................................................... 38
3.4.8 NACK Frame Format ................................................................................................... 38
3.4.9 ETX Frame Format ...................................................................................................... 38
3.4.10 Format of EOT Frame................................................................................................ 38
3.4.11 Format of Set DUKPT KSN and initial key (Request)................................................ 38
3.4.12 Format of Set DUKPT KSN and initial key (Response)............................................. 39
3.4.13 P25 MK (Master key)/SK (Session Key) Encrypt ...................................................... 40
3.5 Some Example of Communication Command .................................................................... 47
3.5.1 Query Status ................................................................................................................ 48
3.5.2 Print.............................................................................................................................. 48
3.5.3 MSR Operation ............................................................................................................ 54
3.5.4 Set the time to power off.............................................................................................. 55
3.6 P25i/P25i-M Communication Protocol (Applies only to P25 Made for iPhone version)...... 56
3.6.1 Operation Commands Format ..................................................................................... 56
3.6.1.1 Print command.................................................................................................................................... 56
3.6.1.2 Print Result Command........................................................................................................................ 56
3.6.1.3 MSR Read Command.......................................................................................................................... 57
3.6.1.4 MSR Result Command........................................................................................................................ 57
3.6.2 Operation Commands Data Dump .............................................................................. 57
3.6.2.1 Print Operation.................................................................................................................................... 58
3.6.2.2 MSR Operation ................................................................................................................................... 58
4 P25 Reference Code .................................................................................................................. 60