8
5.3 Example of GlobalCalibrateCmd
FPort
:
0x0E
Description CmdID
Sensor
Type
PayLoad(Fix =9 Bytes)
SetGlobal
CalibrateReq
0x01
Channel(1Byte)
0_Channel1,
1_Channel2,etc
Multiplier
(2bytes,Unsigned)
Divisor
(2bytes,Unsigned)
DeltValue
(2bytes,Signed)
Reserved
(2Bytes,Fixed
0x00)
SetGlobal
CalibrateRsp
0x81
Channel(1Byte)
0_Channel1,
1_Channel2,etc
Status
(1Byte,0x00_success)
Reserved
(7Bytes,Fixed 0x00)
GetGlobal
CalibrateReq
0x02
Channel
(1Byte,0_Channel1,1_Channel2,etc)
Reserved
(8Bytes,Fixed 0x00)
GetGlobal
CalibrateRsp
0x82
Channel(1Byte)
0_Channel1,
1_Channel2,etc
Multiplier
(2bytes,Unsigned)
Divisor
(2bytes,Unsigned)
DeltValue
(2bytes,Signed)
Reserved
(2Bytes,Fixed
0x00)
ClearGlobal
CalibrateReq
0x03
Reserved
(10Bytes,Fixed 0x00)
ClearGlobal
CalibrateRsp
0x83
Status
(1Byte,0x00_success)
Reserved
(9Bytes,Fixed 0x00)
Sensor type:
0x01_Temperature Sensor 0x02_Humidity Sensor
(1)
Assume that the reported original value of temperature is 27.15°C, the calibration reduces by 0.28°C, and the reported value is
26.87°C. (Sensor type=0x01, Channel 1 =0x00, Multiplier =0x0001, Divisor = 0x0001, DeltValue = 0xFFE4)
Downlink: 01010000010001FFE40000 // FFE4 Hex = -28 Dec, -28*0.01°C= -0.28°C
Device return:8101000000000000000000 // Configuration successful
8101000100000000000000 // Configuration failed
(2)
Assume that the reported original value of humidity is 49.98%, the calibration increases by 0.52%, and the reported value is 50.5%.
(Sensor type=0x02,Channel 2 =0x01, Multiplier =0x0001
,
Divisor = 0x0001
,
DeltValue = 0x0034)
Downlink: 0102010001000100340000 // 34 Hex= 52 Dec, 52*0.01%= 0.52%
Device return:8102010000000000000000 // Configuration successful
8102010100000000000000 // Configuration failed