Heart
1、The cabinet publishes data every 9 minutes and sends and receives the same data.
2、Publishing and subscribing are the same topic.
3、If the cabinet does not receive return data for 2 consecutive times, that is, for 18 minutes, the cabinet will determine that it is offline and restart.
Command Send ▼
Subscribe to topic:/powerbank/{uuid}/user/heart
Data format: bytecode data, Hex, hexadecimal analysis
Bytecode | Name | Identification code | Remarks |
---|---|---|---|
Byte[0] | Head code | head | Default: 0xA8 |
Byte[1~2] | Packet length | length | For example: 0x01 0x25, converted to decimal, the packet length is 293 |
Byte[3] | Command name | cmd | Default: 0x7A, heartbeat detection |
Byte[4] | Control board address | controlIndex | Default: 0x10 |
Byte[5~n] | Signal value;Backup Power | signal | ASCII display, for example: CSQ:26;BP:0 |
Byte[n+1] | Check code | verify | Packet complement check |
Signal value (signal) The signal strength value range is 0 ~ 31, and the larger the value, the better the signal strength. Learn more
Parameter range | 99 | 0~15 | 15~31 |
---|---|---|---|
Signal strength description | No network | Weak | Better |
Backup power status (backupPower)
- | Bit[3] Reserved | Bit[2] Reserved | Bit[1] Operation status | Bit[0] Support backup power | - |
---|---|---|---|---|---|
0x00 | 0 | 0 | 0 | 0 | No backup power support; stop operation |
0x01 | 0 | 0 | 1 | 0 | Invalid value |
0x02 | 0 | 0 | 0 | 1 | Support backup power; stop operation |
0x03 | 0 | 0 | 1 | 1 | Support backup power; Running |
Example
A8 00 11 7A 10 43 53 51 3A 32 37 3B 42 50 3A 30 FC
A8 ----------------------------------------------- Byte[0] header code
00 10 ---------------------------------------------Byte[1~2] package Length: 16
7A ----------------------------------------------- Byte[3] Heartbeat Detection instructions
10 ----------------------------------------------- Byte[4] Control Board address
43 53 51 3A 32 37 3B 42 50 3A 30 ------------------Byte[5~n] Signal value, ASCII display: CSQ:26;BP:0
1A ----------------------------------------------- Byte[n+1 ] Code verification
Command Reply △
Publish to topic:/powerbank/{uuid}/user/heart
Data format: bytecode data, Hex, hexadecimal analysis(Same content as the command issuance)
Example
A8 00 10 7A 10 43 53 51 3A 20 33 31 2C 39 39 7B