Pop-up By SN
1、After scanning the QR code to pay, send the SN number pop-up command to the cabinet to pop up the power bank.
2、Powerbank SN,You can obtain it from the following instructions:
| name | send | reply | application protocol |
|---|---|---|---|
| Check | check | 0x10 | MQTT |
| Periodic Upload(Right now) | -- | 0x10 | HTTP |
| Periodic Upload(Cycle time) | -- | 0x10 | HTTP |
WARNING
- After the charging bank is ejected, the cabinet will take 3 seconds to conduct warehouse communication and sensor check to ensure that the charging bank is ejected normally.
- During the check, if you send query commands (check, check_all), the original power bank may be in it. You are advised to send the command after 5 seconds.
Command Send ▼
Subscribe to topic:/powerbank/{uuid}/user/get
Data format: JSON string
| Name | Identification code | Data type | Remarks |
|---|---|---|---|
| command name | cmd | string | popup_sn |
| command data | data | string | power bank SN |
Example: Pop-up power bank; Powerbank SN: 10211856
text
{"cmd":"popup_sn","data":"10211856"}Custom Function ▼
Subscribe to topic: /powerbank/{uuid}/user/get
Data format: JSON string
| Name | Identifier | Data type | Notes |
|---|---|---|---|
| Command name | cmd | String | popup_sn |
| Command data | Data | String | Power bank serial number |
| Current timestamp | Timestamp | String | Current timestamp (seconds) |
| Effective time | TTL | String | Command effective time (seconds) |
Example: Pop up the power bank; power bank SN: 10211856. If the network delay causes the command not to be received within 30 seconds, it will not pop up.
text
{"cmd":"popup_sn","data":"10211856","timestamp":"1759941810","ttl":"30"}Command Reply △
Publish to topic:/powerbank/{uuid}/user/update
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: 0x31, sn pop-up |
| byte[4] | Hole address | holeIndex | Range: 1-100 |
| byte[5~8] | Power bank SN | powerbankSN | 0x00 0x00 0x0B 0xCF = SN:3023 0x00 0x9B 0xD2 0x10 = SN:10211856 0xFF 0xFF 0xFF 0xFF = SN:4294967295 |
| byte[9] | Popup state | state | 0x00:Pop failed 0x01:Pop-up successful 0x11:Serial communication timeout 0x12:The power bank has not popped out, but the SN number can be read. 0x87:Failed to obtain the timestamp. 0x88:Exceeding the TTL validity period 0xFB:There are no portable chargers that meet the rental requirements. 0xFC:A charging battery that does not have the target SN found. 0xFD:Failed to add task to the thread pool 0xFE:The previous rental has not been completed, so the new rental process cannot be initiated. 0xFF:Lease command parsing failed Other values:Unknown error |
| byte[10] | Reserved | undefined | Default: 0x00 |
| byte[11] | Check code | verify | Packet complement check |
Example: Report SN pop-up data
text
A8 00 0C 31 60 00 9B D2 10 01 00 3Btext
A8 ----------------------------------------------- byte[0] header code
00 0C -------------------------------------------- byte[1~2] package Length 9
31 ----------------------------------------------- byte[3] Hole Address
60 ----------------------------------------------- byte[4] Control Board address
00 9B D2 10 -------------------------------------- byte[5~8] Power bank SN: 10211856
01 ----------------------------------------------- byte[6] Pop up state
00 ----------------------------------------------- byte[7] Reserved
3B ----------------------------------------------- byte[8] Code verification