0% found this document useful (0 votes)
130 views

FourFaith RTU Extended Communication Protocol

This document describes the extended communication protocol for FourFaith RTUs. It details the format for TCP, UDP, and SMS communication including start bytes, version numbers, data lengths, and checksums. The protocol supports functions like register strings, heartbeats, I/O and ADC control, configuration, and remote upgrades. Command codes and data fields are defined for requests and responses between the RTU and data service center.

Uploaded by

Cocofourfaith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

FourFaith RTU Extended Communication Protocol

This document describes the extended communication protocol for FourFaith RTUs. It details the format for TCP, UDP, and SMS communication including start bytes, version numbers, data lengths, and checksums. The protocol supports functions like register strings, heartbeats, I/O and ADC control, configuration, and remote upgrades. Command codes and data fields are defined for requests and responses between the RTU and data service center.

Uploaded by

Cocofourfaith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Xiamen Four-Faith Communication Technology Co., Ltd.

Xiamen Four-Faith Communication Technology Co.,Ltd.


Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
1
FourFaith RTU Extended Communication Protocol................................................3
1 Format description.............................................................................................. 3
1.1 TCP format................................................................................................3
1.1.1 Downlink data................................................................................3
1.1.2 Uplink data.................................................................................... 3
1.2 UDP format...............................................................................................4
1.3 Data.......................................................................................................... 4
1.4 SMS format...............................................................................................4
2 RTU extended protocol........................................................................................4
2.1 Register string and heartbeat string info................................................. 4
2.1.1 RTU sends register string. The command is 0x5000..................... 4
2.1.2 DSC replies to the register string. The command is 0xD000......... 4
2.1.3 RTU sends heartbeat string. The command is 0x5001..................5
2.1.4 DSC replies to heartbeat string. The command is 0xD001............5
2.2 DIO and ADC control................................................................................ 5
2.2.5 RTU reports IO acquisition info actively and regularly. The
command is 0x5010....................................................................................... 5
2.2.6 DSC replies to the IO acquisition info. The command is 0xD010.. 6
2.2.7 DSC controls IO port. The command is 0xD011............................ 6
2.2.8 RTU replies to the control from DSC. The command is 0x5011.... 7
2.2.9 DSC queries the ADC acquisition info. The command is 0xD012.. 7
2.2.10 RTU replies to queries from DSC. The command is 0x5012.
Refer to command 0x5010............................................................................. 8
2.2.11 DSC queries puls counter. The command is 0xD013................... 8
2.2.12 RTU replies to counter query from DSC. The command is
0x5013............................................................................................................ 8
2.2.13 RTU sends alarm info. The command is 0x5014......................... 8
2.2.14 DSC replies to alarm info. The command is 0xD014................... 9
2.3 RTU parameters configuration................................................................. 9
2.3.15 Remote configuration with AT commands in DSC. The command
is 0xD020........................................................................................................ 9
2.3.16 RTU replies to AT commands from DSC. The command is
0x5020............................................................................................................ 9
2.3.17 Restart RTU from DSC. The command is 0xD024........................ 9
2.3.18 RTU replies to reboot command. The command is 0x5024...... 10
2.4 Remote upgrade command....................................................................10
2.4.19 Query firmware version of RTU from DSC. The command is
0xD035..........................................................................................................10
2.4.20 RTU replies to firmware version query from DSC. The command
is 0x5035.......................................................................................................10
2.4.21 Remote download from DSC. The command is 0xD030........... 11
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
2
2.4.22 RTU replies to remote download configuration. The command
is 0x5030.......................................................................................................12
2.5 RTU transparent transmission function................................................. 12
2.5.23 Send data from DSC to serial port of RTU transparently. The
command is 0xD0FE..................................................................................... 12
2.5.24 Send data from serial port of RTU to DSC transparently. The
command is 0x50FF...................................................................................... 12
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
3
FourFaith RTU Extended Communication Protocol
1 Format description
Downlink data: data sent from Data Service Center to RTU
Uplink data: data sent from RTU to Data Service center
1.1TCP format
1.1.1 Downlink data
Start Version
High
Version
Low
Data
length
High
Data
length
Low
Data Data
checksum
End
1byte 1byte 1byte 1byte 1byte According
to the data
1byte 1byte
1. Start byte: 0x7E
2. Version: Two bytes, 0002
3. Data length: According to the data content
4. Data: The data content received
5. Data checksum: Cumulative sum of the received data except for start byte,
end byte and checksum itself
6. End byte: 0x7E
7. Except for start byte and end byte, 0x7E and 0x7D in other fields are
escaped to 0x7D 0x01 and 0x7D 0x02.
1.1.2 Uplink data
Start Version
High
Version
Low
Data
length
High
Data
length
Low
Data Data
checksum
End
1byte 1byte 1byte 1byte 1byte According
to the data
1byte 1byte
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
4
1.2UDP format
The same as TCP format
1.3Data
ID number Command
byte
Data length Data
4bytes 2bytes 2bytes According to
the data
ID number: Device ID number
Data length: Length of data content
1.4SMS format
14 bit encoded format is used. It has the same format as 1.3Data.
2 RTU extended protocol
The is the extended protocol from FourFaith and its big-edian.
2.1 Register string and heartbeat string info
2.1.1 RTU sends register string. The command is 0x5000.
The info in the register string is as below.
field length(byte) Note
Data content length 2 Total length of the
parameters below
RTU phone number 20 Add blank space if less
then 20 bytes
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
5
2.1.2 DSC replies to the register string. The command is
0xD000.
field Length(byte) Note
Data content length 2 Total length of the
parameters below
Reply manner 1 0 stands for register failure
1 stands for register
success
2.1.3 RTU sends heartbeat string. The command is 0x5001.
The info in the heartbeat string is below.
Field Length(byte) Note
Data content length 2 No parameter. Length is 00
2.1.4 DSC replies to heartbeat string. The command is
0xD001.
Field Length(byte) Note
Data content length 2 Total length of the
parameters below
Reply manner 1 0 stands for receiving
heartbeat failure
1 stands for receiving
heartbeat success
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
6
2.2 DIO and ADC control.
2.2.5 RTU reports IO acquisition info actively and regularly.
The command is 0x5010.
The IO acquisition info is below.
Field Length
(byte)
Note
Data content length 2 Total length of the parameters
below
Identifier for the same packet 1 To identify if the data
corresponds to ACK packet
The valid number of DIO ports 1 The valid IO ports
number(assuming its n1)
Each DIO port
info(loop n1
times
addr. 1 Address starts from 1
The valid number of
each DIO port
1 The valid collection number of
each DIO port(m1 is no more
than 10)
Current IO
channel
info (loop
m1 times)
Value 1 0 stands for low level and 1
stands for high level
Acquisition
time
4 Acquisition time. Time after Jan
1st 2000(second)
The valid number of ADC ports 1 The valid acquisition number of
ADC port(assuming its n2).
Each ADC port
info(loop n2
times)
addr. 1 Address starts from 1
The valid number of
each ADC port
1 The valid acquisition number of
each ADC port(m2 is no more
than 10)
Current
ADC
channel
info
(loop m2
times)
Value 4 The calculated value for ADC
acquisition(with symbolic
number)
Acquisition
time
4 Acquisition time. Time after Jan
1st 2000(second)
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
7
2.2.6 DSC replies to the IO acquisition info. The command is
0xD010.
Field Length(byte) Note
Data content length 2 Total length of the
parameters below
Reply manner 1 0 stands for IO acquisition
failure
1 stands for IO acquisition
success
Identifier for the same
packet
1 To identify if the data
corresponds to ACK packet
2.2.7 DSC controls IO port. The command is 0xD011.
Field Length(byte) Note
Data content length 2 The total length of the
parameters below
Number of DIO 1 The number of DIO to
control(assuming its n).
DIO ports
info(loop n
times)
DIO port addr. 1 DIO port addr. start from 1
DIO port type 1 0 stands for low level output, 1
stands for high level output, 2
stands for rising edge, 4 stands
for falling edge, 5 stands for
square wave.
square wave
frequency(if its
not square
wave, the value
is 0)
4 The unit is 20mS. The min
accuracy is 20mS due to the
influence of timer.
2.2.8 RTU replies to the control from DSC. The command is
0x5011.
field Length(byte) Note
Data content length 2 The total length of the
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
8
parameters below
Reply manner 1 0 stands for control failure
1 stands for control
success
2.2.9 DSC queries the ADC acquisition info. The command is
0xD012.
Data content length 2 The total length of the
parameters below
Identifier for the same packet 1 To identify if the data
corresponds to ACK packet
Number of the IO ports queried 1 Number of the IO ports
queried(n1)
Each IO channel
info(loop n1 times)
Addr. 1 Address starts from 1
Valid number of the ADC inputs
queried
1 Valid number of the ADC inputs
queried(assuming its n2)
Each ADC channel
info(loop n2 times)
Addr. 1 Address starts from 1
2.2.10 RTU replies to queries from DSC. The command is
0x5012. Refer to command 0x5010.
2.2.11 DSC queries puls counter. The command is 0xD013.
Field Length(byte) Note
Data content length 2 No parameter. Length is 00
2.2.12 RTU replies to counter query from DSC. The command
is 0x5013.
Field Length(byte) Note
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
9
Data content length 2 The total length of the
parameters below
Counter value 4 The counter value from
the counting beginning to
query
2.2.13 RTU sends alarm info. The command is 0x5014.
Field Length(byte) Note
Data content length 2 The total length of the
parameters below
Identifier for the same
packet
1 To identify if the data
corresponds to ACK packet
Type 1 0 stands for DIO, 2 stands
for ADC input and 2 stands
for counter
Addr. 1 The corresponding
channel addr, starting
from 1
Value 4 The corresponding
acquisition value(with
symbolic number)
Acquisition time 4 Acquisition time. Time
after Jan 1st 2000(second)
2.2.14 DSC replies to alarm info. The command is 0xD014.
Field Length(byte) Note
Data content length 2 The total length of the
parameters below
Reply manner 1 0 stands for reply failure
1 stands for reply success
Identifier for the same
packet
1 To identify if the data
corresponds to ACK packet
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
10
2.3RTU parameters configuration
2.3.15 Remote configuration with AT commands in DSC. The
command is 0xD020
Field Length(byte) Note
Data content length 2 The total length of the
parameters below
One AT command The length depends on the
command. End with \r\n
2.3.16RTU replies to AT commands from DSC. The command is
0x5020.
Field Length Note
Data content length 2 The total length of the
parameters below
AT command reply The length depends on the AT
command reply. It will be
divided if longer than 1450
bytes
2.3.17Restart RTU from DSC. The command is 0xD024.
Field Length(byte) Note
Data content length 2 No parameter. Length is 00
2.3.18RTU replies to reboot command. The command is
0x5024.
Field Length(byte) Note
Data content length 2 No parameter. Length is 00
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
11
2.4Remote upgrade command
2.4.19Query firmware version of RTU from DSC. The
command is 0xD035.
Field Length(byte) Note
Data content length 2 No parameter. Length is 00
2.4.20RTU replies to firmware version query from DSC. The
command is 0x5035.
Field Length Field description
Data length 2 The length of the fields below, 80 bytes in total
APP ver. 40 RTU APP program version. Add blank space if less than
40 bytes.
BOOT ver. 40 RTU BOOT program version. Add blank space if less
than 40 bytes.
2.4.21Remote download from DSC. The command is 0xD030.
Field Length Field description
Data length 2 The length of the fields below, 92 bytes in total
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
12
property 1 X111X111 (X is reserved bits)
Bit7, bit3: Reserve
bit6 : 1. Compression mode download; 0.
Non-compression mode download.
bit5 : 1. Download immediately; 0. Dont download
immediately(according to time set)
bit4 : 1. Erase parameter area; 0. Dont erase
parameter area.
bit2~bit0Combination is below:
0x00 APP program download
0x01 BOOT program download
Other combinations remain to be extended.
Mode 1 0x00 TCP, 0x01 UDP
Reply manner 1 0x00 stands for reply one by one. 0x01 stands for window
reply.
Max window
frame number
1 The Max frame number of a window is 16. Its no more
than 4 in this protocol.
APN 20 (This function is not available at present) Such as
cmnet. Add blank space if less then 20 bytes.
IP 20 Such as 119.75.217.56. Add blank space if less then 20
bytes.
PROT 5 Such as 2000.Add blank space if less then 5 bytes.
New ver. length 1 Transmission format: HEX
Range: 1 <= N < =40
NEW_VER 40 Version field, ascii. Add blank space if less then 40 bytes.
Time range 4 (This function is not available at present):
[time1] +[time2], according to bit5
Meaning: RTU can apply to download program during
this time period
Field:H,M, 24-hour system
Transmission format:hex, time format: Beijing time
Range: 00:00 - 23:59
2.4.22RTU replies to remote download configuration. The
command is 0x5030.
Field Length Field description
Xiamen Four-Faith Communication Technology Co., Ltd.
Xiamen Four-Faith Communication Technology Co.,Ltd.
Add J1-J3,3rdFloor,No.44,GuanRiRoad,SoftWare Park,XiaMen .361008.China
http//en.four-faith.com Tel +86 13178273589 E-mail:[email protected]
13
Reply manner 1 Reply type:
00H failure
01H success
02H not the latest version
2.5RTU transparent transmission function
2.5.23Send data from DSC to serial port of RTU transparently.
The command is 0xD0FE.
Field Length(byte) Note
Data content length 2 The total length of the
parameters below
Transparent transmission data According to the data
2.5.24Send data from serial port of RTU to DSC transparently.
The command is 0x50FF
Field Length(byte) Note
Data content length 2 The total length of the
parameters below
Transparent transmission data According to the data

You might also like