Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Remote Display Box Communication Protocol

Summary
Generally, the Remote Display Box shows below information. 1) Display time in standby state. 2) Display the call charge and duration when in conversation. 3) Display call times and total charge of this customer after finished calls. 4) Check more than 15 call bills. The baud rate is 9600. At present, the display box only receives data and shows data. The host sends all data to every display box. There is a byte address data in every data package. The display box only deal with the data package for itself.

2 Data Package Format


Data Package Format: Address+ Data head + Data length + Message No. + Data + CRC code + End code Address: 1 byte. If it is 0xA0, it indicates that it is common data package. Data head: 1 byte, 0XFD. Data length: total byte count of this Data Package. Message No.: The appointed code of message. Data: The real data of this Data Package. CRC code: The sum from Data length to the end of real data, then Mod 0xFE End code 0xFF 0xFF

3. Communication Protocol
3.1 Date Time Data Package 0x0A
Data Package:

Data
Unsigned char Address; 0xFD Unsigned char Length; Unsigned char Code; Unsigned char Status1;

Description
Address of display box (0xA0); As common message

Data Head
Length of data Message ID, Status1 (bit0:sign of put up phone, bit1:PayMode (Multi-Pay Mode or Single-Pay Mode) bit2:whether in billing state, bit3:whether in check-out state, bit4:whether it is incoming call bit5:the sign of incoming call or outgoing call bit6:Line state (Lock/Unlock) , bit7:reserved for the Date Time Data Package, it is 0x0A

Unsigned char Status2; Unsigned Data[length-2] Unsigned char Code; 0xff 0xff char

reserved Time, date, week

CRC finish code finish code

A0 FD 11 0A 0F 00 06 00 49 47 46 42 49 40 47 40 41 40 48 40 46 94 FF FF --------4line on hook and line2 line3 lock, show 06 A0 FD 11 0A 0E 00 0E 00 48 41 41 40 41 40 46 40 42 40 47 40 42 82 FF FF --------the first line is in the pay mode, so not send date time.... show 0E A0 FD 11 0A 0F 00 0F 00 43 43 44 41 41 40 46 40 42 40 47 40 42 85 FF FF --------all the line is idel, so send all date time. Show 0F 2007-02-06 tuesday 01:14:33
2

3.2 Call bill Package 0x0B


Message of display call bill Address+0xFD+length+0x0B+data+check code++0xFF+0FF Service sends the data of current call to display for display Unsigned char Address; 0xFD Unsigned char Length; Unsigned char Code; Unsigned char Status1; Unsigned char Status2; /// length of data (0x0B) /// message No. //address of display box

///state word 1 ///state word 2 //// sum 0 duration // CRC //include finish code // include finish code

Unsigned char Data[length-2] Unsigned char Code; 0xff 0xff

43 FD 18 0B 07 00 40 48 C9 49 44 42 10 10 40 42 C0 40 C0 40 0C A8 54 44 54 54 44 00 0C FF FF 0854445454 00:00: 20 2499.80 40 48 C9 49 44 42 10 10 is for charge, these byte position is fixed,and the C is :, 10 is empty. 40 42 C0 40 C0 40 is duration, position is fixed,and the C is :, 0C A8 54 44 54 54 440C is how many numbers,if more than 14,only get 14, A8 54 44 54 54 44 is telephone 08544445454 43 FD 18 0B 07----07= 0000 0111----bit2 is judge if connected, 0 not connected, 1 connected, bit1 is for incoming call or outgoing call ,bit3 is for pay mode(if have onhook, and pay) 43 FD 19 0B 07 00 45 45 C1 42 46 10 10 10 42 40 C0 40 C0 40 0E AA 81 23 45 67 89 AA 00 D2 FF FF 00812345678900 00:00:02 621.55

3.3 Call Charge Package 0x0C


Display subtotal message 0x0C address+0xFD +length+0x0C+data+check code+0xFF+0FF Service send subtotal data to display box for display Unsigned char Address; 0xFD Unsigned char Length; Unsigned char Code; Unsigned char Status1; Unsigned char Status2; // length of data (0x0C) // message No. // address of display box

// state word 1 // state word 2 // subtotal sum 0 subtotal call count // CRC

Unsigned char Data[length-2] Unsigned char Code; 0xff //include finish code 0xff //include finish code

43 FD 0F 0C 4A 00 45 47 C2 46 42 43 41 10 10 10 41 40 40 A1 FF FF Line 1 subtotal is 001 13262.75 40 FD 0F 0C 02 00 40 48 C5 40 42 42 42 10 10 10 42 40 40 53 FF FF Line 4 subtotal is 001 22205.80

3.4 Dial Phone Number or incoming phonenumber Package 0x0D


Display message when call in or dial address+0xFD +length+0x0A+data+check code+0xFF+0FF Service send time to display for display Unsigned char Address; 0xFD Unsigned char Length; Unsigned char Code; Unsigned char Status1; Unsigned char Status2; // data length (0x0D) // message No. // address of display box

// state word 1 // state word 2


4

Unsigned char Data[length-2] Unsigned char Code; 0xff //include finish code 0xff //include finish code 40 FD 03 0D 03 00 00 10 FF FF

//Phone number // CRC

Line4 hand

up , not dial

0D 03---03= 0000 0011-----bit4 is for incoming call, bit1 is for ougoing call state bit. 00 10 FF FF------00 byte is for how many dial numbers, if more than 14, only show 14 43 FD 04 0D 03 00 01 49 5A FF FF Line1 hand up , dial number '9' 43 FD 11 0D 03 00 1B 49 48 48 48 48 48 48 48 48 48 48 48 48 48 1C FF FF Line1 hand up , dial number '98888888888888' 00 1B 49------1B byte is for how many dial numbers, if more than 14, only show 14 The byte is fixed, is 7th . 40 FD 11 0D 03 00 0E 42 43 43 43 43 43 43 43 43 43 43 43 43 43 C7 FF FF Line4 hand up , dial number'23333333333333' Address 40 is for tpj-04 line4, 43 is for tpj-04 line1

3.5 Call Charge Package 0x01


Message of clean call list address+0xFD +0x00+0x01+0x01+0xFF+0FF Unsigned char Address; 0xFD Unsigned char Length; Unsigned char Code; Unsigned char Code; 0xff 0xff 43 FD 00 01 01 FF FF 40 FD 00 01 01 FF FF // data length (0x01) // message No. // CRC // include finish code // include finish code Clear the bill list in the remote display 1. Clear the bill list in the remote display 4. // address of display box

3.6 Call Charge Package 0x0F


Message of save call list address+0xFD +length+0x0F+data+check code+0xFF+0FF Service inform client save the data of call, for future reference Unsigned char Address; 0xFD Unsigned char Length; Unsigned char Code; Unsigned char Status1; Unsigned char Status2; // date length (0x0F) // message No. // address of display box

// state word 1 // state word 1 // call list // CRC // include finish code // include finish code

Unsigned char Data[length-2] Unsigned char Code; 0xff 0xff

40 FD 13 0F 4A 00 18 03 12 45 6B CA AA 02 A9 07 81 06 B3 00 1E 11 A8 6D FF FF 0312456*# 00:11:21 19706.00 07 81 06 B3------07 is for day, 81 half byte 8 is for year ,is 2008, half byte 1 for month is 01, 06-----for hour state bit, and minute------0000 0110--bit7 is for hour state, if is 1, hour must add 12, 0 not neead, 000 0110 is for minute. B3 ---is for hour and second ---B=11, because the hour bit is 0, so not add 12. 3----is second. 43 FD 13 0F 4A 00 19 00 81 23 45 67 89 02 AB 07 81 06 B3 00 14 3C C3 4C FF FF 008123456789 00:11:23 13262.75

You might also like