Transport protocol
The data between the PC and STM is Protobuf preceeded by a 7-byte header and 5+n byte header.
The header itself consists of the following bytes:
| Description | Amount of bytes | Value |
|---|---|---|
| Start bytes | 1 | 0x2 |
| Sender receiver | 1 | 0x0* |
| Message ID | 1 | 0x0 |
| Size of content | 2 | number of bytes in content |
| Checksum of content | 1 | checksum of content (everything after 7th byte) |
| Checksum of header | 1 | checksum of header (first 6 bytes, skipping the leading 0x2) |
Sender receiver
The sender-receiver value is documented as follows
Enums
| Value | Description |
|---|---|
| PC | 0 |
| nRF | 1 |
| STM | 2 |
| STM - Memory | 3 |
Left 4 bits represent a sender Right 4 bits represent a recipient
STM - Memory has been separated for memory operations (Import, Export), due to ease of implementation.
The content consists of the following bytes:
| Description | Amount of bytes | Value |
|---|---|---|
| Protobuf Structure ID | 2 | Structure ID |
| Type | 1 | 12 |
Size of Protobuf content | 2 | number of bytes in the Protobuf content |
Protobuf content | n | The Protobuf content that's being sent |
Checksum
The message checksum is calculated by summing all bytes together and overflowing at a byte (sum % 256).
Structure ID
These structures are connected to the ones accessible here.
| Structure | ID |
|---|---|
Command | 0x10 |
Project | 0x11 |
Station | 0x12 |
Test | 0x13 |
Measurement | 0x14 |
RESERVED | 0x15 |
Result | 0x16 |
Setting | 0x17 |
Ota | 0x18 |
TesterInfo | 0x19 |
OtaInfo | 0x20 |
ExportCommand | 0x21 |
ImportCommand | 0x22 |