![King Pigeon IoT Series Скачать руководство пользователя страница 32](http://html.mh-extra.com/html/king-pigeon/iot-series/iot-series_user-manual_1969971032.webp)
GSM/GPRS/3G/4G/NB-IoT
Sensor To Cloud IoT Series
Page 32 of 37
King Pigeon Hi-Tech. Co., Ltd
Ver 1.1
C8 equals decimal number 456, so the real temperature is 456/10 = 45.6
℃
)
B9 36
CRC validation
10.1.5. Modbus address and example of AM2301 types
Register address
Definition
Data type
Function code
Data description
0
AM2301
temperature
16-bit sign
integer.
4
Real value = register
value/10
1
AM2301 humidity
16-bit sign
integer.
4
Real value = register
value
Example:
Server query AM2301 Temperature & Humidity data: 01 04 00 00 00 02 71 CB
Issue data
Detailed description
01
Device ID address
04
Function code 04, reading AM2301 temperature & humidity
00 00
Reads data from the device register address, 00 00.
00 02
Read the number of 2.
71 CB
CRC validation
Device return data: 01 04 04 00 7B 00 2D 4B 80
Return data.
Detailed description
01
Device ID address
04
Function code 04
04
The data returned is 4 bytes in length.
00 7B 00 2D
The data returned are Temperature < 00 7B >, Humidity < 00 2D >.
The real temperature = register value/10, hexadecimal number 7B is equal to
decimal number 123, so the real temperature is 123/10 = 12.3
℃
The humidity is equal to the original value of the register, the hexadecimal number
2D is equal to the decimal number 45, so the humidity is 45%RH
4B 80
CRC validation
10.2.
MQTT Protocol
When the device connects to King Pigeon cloud platform with MQTT, the user could use it
immediately, don't need to care about the MQTT protocol. If you need to connect to your own server, the
following is the protocol for you.
10.2.1. MQTT data format published by DO types
Device publish topic: device serial number (data filled out in the ‘Login Message’ for the ‘Network
Settings’ on the configuration software)