Page 51 of 57
King Pigeon Hi-Tech. Co., Ltd.
Ver 3.0
GSM/SMS/GPRS/3G/4G
Cellular IoT M2M RTU
Returning
Data
1
00H
FFH converter to binary 1111 1111 from high to low byte, stands for
DIN7-DIN0 status
(bit7)
(bit6)
(bit5)
(bit4)
DIN3
(bit3)
DIN2
(bit2)
DIN1
(bit1)
DIN0
(bit0)
0
0
0
0
0
0
0
0
Invalid Invalid Invalid
Invalid
Open Open
Open
Open
1= Close, 0= Open
16CRC
Verify
2
A1 88H
CRC0 CRC1 low byte in front, high behind
Example: Inquiry device48 DIN data at same time, then:
Server send:
01 02 00 00 00 04 79 C9
01H= Device address; 02H= Inquiry DIN status; 00 00HDIN= Starting address; 00 04H= Serial reading 4 DIN
status; 79 C9 H CRC verify.
Device answer:
01 02 01 00 A1 88
01H= Device address; 02H= Inquiry DIN status;
01H= Returning data bytes qty; 00
H DIN status, every byte
stands for one DIN status, FFH converter to binary 1111 1111 from high to low byte, stands for DIN3-DIN0
status, 0= Open, 1= Close, A1 88H 16 byte CRC verify.
If need to inquiry multi DIN status, only need to change "DIN Starting Address", "Reading DIN Register Qty",
calculate CRC verify again.
Read device AIN DIN pulse count value, temperature and humidity value, external power voltage value:
Master Send Data Format:
Content
Bytes
Data
(H: HEX)
Description
Device Address
1
01H
01H Device, Range: 1-247, according to setting address
Function Code
1
04H
04 read input register
Register
Starting
Address
2
00 00H
One address can read 2 bytes.
AIN address range: 0000-000BH, One AIN data take two address,
temperature address: 0018H, humidity address: 0019H, DIN1 count
value address: 001A, 001B
External power voltage address: 000E
。
Read Register
Qty
2
00 1CH
Read qty of input register, read AIN0 to DIN0 count value address,
total 28 register, 0000H to 0001BH.
16CRC Verify
2
F1 C3H
CRC0 CRC1 low byte in front, high behind
Receiver Return Data Format:
Content
Bytes
Data
(H: HEX)
Description
Device
Address
1
01H
01H Device, Range: 1-247, according to setting address
Function
1
04H
04 read input register