Output from Serial Communication App (Parent and Repeater App)
Output format when receiving data from the serial communication app
This app can only receive packets in format mode.
Please note that the output for packets received in transparent mode or chat mode is undefined.
Format Mode: Simple Format
Data Format
| # | Data | Description | Notes |
|---|---|---|---|
char | Header | Only : | |
| 0 | uint8 | Logical device ID of sender | Parent 0x00, child 0x01-0x64, unassigned child 0x78 |
| 1 | uint8 | Command number | Value less than 0x80 specified by sender |
| 2 | [uint8] | Arbitrary data | Byte array of length (N) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D/'\r') | |
char | Footer | LF (0x0A/'\n') |
Example of Output Data
:780100112233AABBCCDD13
| # | Data | Description | Value | |
|---|---|---|---|---|
: | char | Header | : | |
78 | 0 | uint8 | Logical device ID of sender | Unassigned child ID |
01 | 1 | uint8 | Command number | 0x01 |
00112233AABBCCDD | 2 | [uint8] | Arbitrary data | As is |
13 | uint8 | Checksum | 0x13 | |
char | Footer | \r | ||
char | Footer | \n |
Conditions to Identify Data
The Parent and Repeater App can receive data from various types of child devices.
To verify whether the output data is from the serial communication app (format mode: simple format), refer to the following:
| # | Data | Item | Condition |
|---|---|---|---|
| 0 | uint8 | Logical device ID of sender | Must be less than or equal to 0x64 or equal to 0x78 |
| 1 | uint8 | Command number | Must be less than 0x80 |
| - | - | Payload size | Must be between 3 and 82 bytes |
Because the conditions are loose, check these after the conditions for other packets like the standard app.
Example Implementation of Parser
- Python
- Arduino (C++)
Format Mode: Extended Format
Data Format
| # | Data | Description | Notes |
|---|---|---|---|
char | Header | Only : | |
| 0 | uint8 | Logical device ID of sender | Parent 0x00, child 0x01-0x64, unassigned child 0x78 |
| 1 | uint8 | Command number | Only 0xA0 |
| 2 | uint8 | Response ID | Value specified by sender |
| 3 | uint32 | Extended address of sender | Value with 0x8 added at the start of serial ID |
| 7 | uint32 | Extended address of receiver | 0xFFFFFFFF when logical device ID is used |
| 11 | uint8 | LQI | Radio communication quality at reception |
| 12 | uint16 | Length of following byte array | Number of bytes (M) |
| 14 | [uint8] | Arbitrary data | Byte array of length (M) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D/'\r') | |
char | Footer | LF (0x0A/'\n') |
Example of Output Data
:78A0028201015AFFFFFFFFA8000700112233AABBCCC6
| # | Data | Description | Notes | |
|---|---|---|---|---|
: | char | Header | : | |
78 | 0 | uint8 | Logical device ID of sender | Unassigned child ID |
A0 | 1 | uint8 | Command number | 0xA0 |
02 | 2 | uint8 | Response ID | 0x02 |
8201015A | 3 | uint32 | Extended address of sender | 0x201015A |
FFFFFFFF | 7 | uint32 | Extended address of receiver | Logical device ID specified |
A8 | 11 | uint8 | LQI | 168/255 |
0007 | 12 | uint16 | Length of following byte array | 7 bytes |
00112233AABBCC | 14 | [uint8] | Arbitrary data | As is |
C6 | uint8 | Checksum | 0xC6 | |
char | Footer | |||
char | Footer |
Conditions to Identify Data
The Parent and Repeater App can receive data from various types of child devices.
To verify whether the output data is from the serial communication app (format mode: extended format), refer to the following:
| # | Data | Item | Condition |
|---|---|---|---|
| 0 | uint8 | Logical device ID of sender | Must be less than or equal to 0x64 or equal to 0x78 |
| 1 | uint8 | Command number | Must be 0xA0 |
| 2 | uint8 | Response ID | Must be less than 0x80 |
| 3 | uint32 | Extended address of sender | MSB must be 1 (i.e., 0x8???????) |
| 12 | uint16 | Length of following byte array | Must be payload size - 14 bytes |