Details of Output from Pal, Cue, and Aria Apps (Parent and Repeater App)
Overall
Data Format
| # | Data | Description | Notes |
|---|---|---|---|
char | Header | : only | |
| 0 | uint32 | Serial ID of repeater | 80000000 if no repeater |
| 4 | uint8 | LQI | 0-255 |
| 5 | uint16 | Sequence number | |
| 7 | uint32 | Serial ID of sender | 0x8??????? |
| 11 | uint8 | Logical device ID of sender | |
| 12 | uint8 | Sensor type | Only 0x80 |
| 13 | uint8 | PAL board version and PAL board ID | e.g. 0x81 |
| 14 | uint8 | Number of sensor data | |
| 15 | [uint8] | List of sensor data | Byte array of length (N) |
| 15+(N) | uint8 | Checksum 1 | CRC8 up to previous byte |
uint8 | Checksum 2 | LRC8 up to Checksum 1 | |
char | Footer | CR (0x0D/'\r') | |
char | Footer | LF (0x0A/'\n') |
Example Output Data
:80000000A8001C82012B1E01808103113008020D0C1130010203E40000000101EC6E
| # | Data | Description | Value | |
|---|---|---|---|---|
: | char | Header | : | |
80000000 | 0 | uint32 | Serial ID of repeater | No repeater |
A8 | 4 | uint8 | LQI | 168/255 |
001C | 5 | uint16 | Sequence number | 28 |
82012B1E | 7 | uint32 | Serial ID of sender | 0x2012B1E |
01 | 11 | uint8 | Logical device ID of sender | 0x01 |
80 | 12 | uint8 | Sensor type | - |
81 | 13 | uint8 | PAL board version and PAL board ID | 0x81 |
03 | 14 | uint8 | Number of sensor data | 3 |
1130...0101 | 15 | [uint8] | List of sensor data | Byte array of length 17 |
EC | 15+17 | uint8 | Checksum 1 | 0xEC |
6E | uint8 | Checksum 2 | 0x6E | |
char | Footer | '\r' | ||
char | Footer | '\n' |
Sensor Data
Data Format
| # | Data | Description | Notes |
|---|---|---|---|
| 0 | uint8 | Info bits | Data type and presence of extension byte |
| 1 | uint8 | Data source | Type of sensor value |
| 2 | uint8 | Extension byte | Additional info for sensor value |
| 3 | uint8 | Data length | Length of sensor value |
| 4 | [uint8] | Data | Sensor value |
Example Output Data
113008020D0C
| # | Data | Description | Value | |
|---|---|---|---|---|
11 | 0 | uint8 | Info bits | Extension byte present, uint16 |
30 | 1 | uint8 | Data source | Voltage |
08 | 2 | uint8 | Extension byte | Power supply voltage |
02 | 3 | uint8 | Data length | 2 bytes |
0D0C | 4 | [uint8] | Data | 3340 mV |
Info Bits
Indicates the data type of the sensor value, presence of extension byte, and read error status.
| bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Function | ERR | - | - | EXT | - | TYP:2 | TYP:1 | TYP:0 |
Each function indicates the following:
| Function | Description | Value | Meaning |
|---|---|---|---|
| ERR | Read error presence | 0 | Normal |
1 | Error present | ||
| EXT | Extension byte presence | 0 | No extension byte |
1 | Extension byte present | ||
| TYP | Data type | 000 | uint8 |
001 | uint16 | ||
010 | uint32 | ||
011 | N/A | ||
100 | int8 | ||
101 | int16 | ||
110 | int32 | ||
111 | [uint8] |
Data Source
Indicates the type of sensor value.
| Value | Description |
|---|---|
0x00 | Magnetic |
0x01 | Temperature |
0x02 | Humidity |
0x03 | Illuminance |
0x04 | Acceleration |
0x05 | Event |
0x30 | Voltage |
0x34 | Packet properties |
Extension Byte
Indicates additional information such as index for continuous data.
For data sources Magnetic / Temperature / Humidity / Illuminance / Packet Properties
None
For data source Acceleration
Indicates attributes of acceleration sample data.
| bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Function | SFQ:2 | SFQ:1 | SFQ:0 | SNM:4 | SNM:3 | SNM:2 | SNM:1 | SNM:0 |
Each function indicates the following:
| Function | Description | Value | Meaning |
|---|---|---|---|
| SFQ | Sampling frequency | 000 (`0x00 | SNM`) |
001 (`0x20 | SNM`) | ||
010 (`0x40 | SNM`) | ||
011 (`0x60 | SNM`) | ||
100 or higher | Undefined | ||
| SNM | Sample number | 0-31 | Oldest first |
For data source Event
Indicates cause of event occurrence.
| Value | Description |
|---|---|
0x00 | Magnetic |
0x01 | Temperature |
0x02 | Humidity |
0x03 | Illuminance |
0x04 | Acceleration |
0x31 | Digital input |
0x35 | Timer |
For data source Voltage
Indicates target.
| Value | Description |
|---|---|
0x01 | ADC1 |
0x02 | ADC2 |
0x03 | ADC3 |
0x04 | ADC4 |
0x08 | Power supply |
Data Length
Indicates the number of bytes of the following data.
Data
Represents the sensor value.
For data source Magnetic
Data type is uint8.
| Value | Description |
|---|---|
0x00 | No magnet |
0x01 | North pole approached |
0x02 | South pole approached |
0x80 | No magnet (periodic send) |
0x81 | North pole nearby (periodic send) |
0x82 | South pole nearby (periodic send) |
For data source Temperature
Data type is int16.
Represents temperature in Celsius multiplied by 100.
For data source Humidity
Data type is uint16.
Represents relative humidity multiplied by 100.
For data source Illuminance
Data type is uint32.
Represents illuminance in lux.
For data source Acceleration
Three int16 values follow.
X, Y, Z axis values (mG) total 6 bytes.
| byte | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Content | X:15-8 | X:7-0 | Y:15-8 | Y:7-0 | Z:15-8 | Z:7-0 |
For data source Event
Four uint8 values follow.
The first data indicates the event content, the rest are unused.
| byte | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Content | Used | Unused | Unused | Unused |
Extension byte for Magnetic
| First value | Description |
|---|---|
0x00 | No magnet |
0x01 | North pole nearby |
0x02 | South pole nearby |
Extension byte for Acceleration
| First value | Description |
|---|---|
0x00 | Stationary (Move mode) |
0x01 | Dice: 1 |
0x02 | Dice: 2 |
0x03 | Dice: 3 |
0x04 | Dice: 4 |
0x05 | Dice: 5 |
0x06 | Dice: 6 |
0x08 | Shake |
0x10 | Move |
Extension byte for Timer
| First value | Description |
|---|---|
0x01 | Woken by timer |
For data source Voltage
Data type is uint16.
Represents voltage in mV.
For data source Packet Properties
Three uint8 values follow.
| byte | 0 | 1 | 2 |
|---|---|---|---|
| Data | Packet ID | Root cause of wake-up | Condition of wake-up |
Each data indicates the following:
| Data | Value | Description |
|---|---|---|
| Packet ID | 0 | No event, only ADC1 and power voltage |
1-127 | No event, other data present | |
128 | Event present, only ADC1 and power voltage | |
129-255 | Event present, other data present | |
| Root cause of wake-up | 0x00 | Magnetic |
0x01 | Temperature | |
0x02 | Humidity | |
0x03 | Illuminance | |
0x04 | Acceleration | |
0x31 | Digital input | |
0x35 | Timer | |
| Condition of wake-up | 0x00 | Event occurred |
0x01 | Value changed | |
0x02 | Value exceeded threshold | |
0x03 | Value fell below threshold | |
0x04 | Value met range |