Frame format and command map
This is the public integration contract for CoreCharge shared power bank cabinet protocol v1.51 (2025-07-30). It publishes the command grammar and field semantics required to implement a compatible device client or server. Values in examples are synthetic; request production connectivity credentials through an authorized integration channel.
Wire grammar
{COMMAND,field1,field2,...,fieldN,CRC}
| Rule | Requirement |
|---|---|
| Encoding | ASCII |
| Delimiter | English comma , |
| Start / end | Literal { and } |
| Command case | Uppercase ASCII |
| Field order | Positional and command-specific |
| CRC | Four uppercase hexadecimal characters |
| Secret | Used only as CRC input; never transmitted as a frame field |
Do not trim internal whitespace, change case, reorder fields, or convert empty fields to NULL unless that command explicitly allows it. Parse the frame boundary before splitting fields.
Shared identifiers
| Field | Requirement |
|---|---|
| Message ID | Monotonically increasing. A Unix timestamp is recommended. Some device commands discard IDs less than or equal to the last accepted ID; reconnect resets the device-side comparison window. |
| Device ID | At most 20 bytes. |
| Order ID | Generated by the server; at most 32 characters. Reuse the same order ID for an idempotent retry. |
| Power bank ID | Use at most 15 characters for the cross-firmware baseline. NI on some profiles accepts 16; confirm the device profile before using 16. |
| Slot ID | One-based. Valid maximum depends on cabinet topology; 0 has command-specific all/automatic semantics. |
Complete command map
| Command | Primary direction | Purpose | Detail |
|---|---|---|---|
CN | Device -> server | Identity and online presence | Identity and inventory |
CS | Server -> device | Network and station configuration | Identity and inventory |
GN | Server -> device | Network status query | Identity and inventory |
DS | Device -> server | Station configuration report | Identity and inventory |
AC | Device -> server | All-slot inventory report | Identity and inventory |
CQ | Both | Single-slot report or slot query | Identity and inventory |
AE | Device -> server | Extended slot and battery health | Identity and inventory |
CM | Both | Rental/return rule configuration | Identity and inventory |
CC | Server -> device | Available-to-rent count | Identity and inventory |
BW | Server -> device | Prepare a normal/selected rental | Rental and return |
KW | Server -> device | Prepare a fast-charge rental | Rental and return |
FB | Server -> device | Release a selected/prepared power bank | Rental and return |
BR | Server -> device | Acknowledge rental preparation/release | Rental and return |
RS | Device -> server | Successful/offline return report | Rental and return |
FR | Device -> server | Abnormal return report | Rental and return |
FA | Server -> device | Maintenance eject without discharge | Device management |
FL | Server -> device | Enable/disable slots | Device management |
OT | Server -> device | Firmware upgrade control | Device management |
SQ | Server -> device | Stacked sub-board query | Device management |
NI | Server -> device | Rewrite a power bank ID | Device management |
KU | Device -> server | Physical key event | Device management |
Implementation downloads
- Command catalog JSON
- CRC and frame reference code
- Executable test vectors
- AsyncAPI transport contract
The JSON catalog is the fastest way to import command names, directions, field order and result enums into a test harness. The narrative pages remain authoritative for firmware notes and workflow requirements.