Page
30 of 52
King Pigeon Communication Co., Ltd.
www.iot-solution.com
Wireless Data Acquisition System - LoRa Gateway BL280
Content
Byte Qty Data Sent Remark
Device Address
1
01H
Device 01, same as data sent
Function Code
1
01H
Read coil status
Returned Byte Size
1
02H
Data: N / 8 + N % 8, N is the quantity of
register to be inquired.
Returned Data
2
01 00
Returned data sequence. Low byte is in
front of high byte
CRC Check
2
B8 6CH
Check according to actual requirement,
low byte is in front
(3) Function code 02H(0x02): read discrete input status (Read node WT101, 4 digital inputs)
Message Format Sent from server master station:
Content
Byte Qty Data Sent Remark
Device Address
1
01H
Device 01, range: 1-247, same as the set
address
Function Code
1
02H
Read discrete input status
Starting Address of Register 2
00 00H
Read 4 digital inputs of WT101 with ID 1.
For more details, refer to below remark.
Qty of Read Register
8
00 08H
Range: 0000H-0007H, read 4 digital
inputs of WT101 with ID 1 and 2
CRC Check
2
79 CCH
Check according to actual requirement,
low byte is in front
Remark: Max 200 registers of digital input status can be read. If more than that, it’s invalid. Each
WT101 has 4 digital inputs. The corresponding Modbus address is (ID-1)*4, for example, if the
starting address of node WT101 with ID 1 is 0, then the starting address of ID 2 is 4.
Return Message Format:
Content
Byte Qty Data Sent Remark
Device Address
1
01H
Device 01, same as data sent
Function Code
1
02H
Read discrete input status
Returned Byte Size
1
01H
Data: N / 8 + N % 8, N is the quantity of
register to be inquired.
Returned Data
2
F0
Every 8 bit of input data form a byte. Low
byte is in front.
CRC Check
2
A1 CCH
Check according to actual requirement,
low byte is in front
6.2 Modbus TCP Protocol
(1) Function code 04H(0x04): read input register (Read node WT107, data is air temperature, air
humidity, light intensity, CO2, TVOC and soil temperature & humidity)
Message Format Sent from server master station:
Content
Byte Qty Data Sent Remark
Counter of command
1
00 00H
Every time data package is sent, the
counter value will be added by 1
Counter of command
1
Fixed character
1
00H
Fixed format, fixed character
Fixed character
1
00H
Fixed format, fixed character