Page 32 of 55
King Pigeon Hi-Tech. Co., Ltd.
Ver 1.3
GSM/SMS/GPRS/3G/4G
Cellular IoT Gateway
(5) Switch the device on, enter into working mode, device running according parameter setting.
8.3.1 Read device power supply 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
Read input register, function code 04
Register Starting
Address
2
00 0EH
Power supply voltage address: 00 0EH
Read Register Qty
2
00 01H
1* 16 Bit register address
16CRC Verify
2
50 09H
CRC0 CRC1 low byte in front, high byte in 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 Code
1
04H
Read input register
Return Bytes Qty
1
02H
Return data length
Returning Data
2
04 B6H
Returning power supply voltage value
16 CRC Verify
2
3A 46H
CRC0 CRC1 low byte in front, high behind
Example: Inquiry device power supply voltage value, then:
Server Send:
01 04 00 0E 00 01 50 09
01= Device address; 04= Read input register; 00 0E= Origin register address; 00 01= Read 1 input register value;
50 09= CRC verify.
Device Answer:
01 04 02 04 B6 3A 46
01= Device address; 04= Read input register;02=Return data bytes Qty;04 B6=Returning power supply voltage
value, the value is expanded 100 times (Real value= this value/100);3A 46=CRC Verify.
8.3.2 Read device temperature and humidity 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
Read input register, function code 04
Register Starting
Address
2
00 18H
Temperature address: 00 18H;
Humidity address: 00 19H
Read Register Qty
2
00 02H
total 2* 16 Bit register address
16CRC Verify
2
F1 CCH
CRC0 CRC1 low byte in front, high byte in behind
Receiver Return Data Format: