Output from CUE App (Parent and Repeater App)
Output format when receiving data from the CUE App
TWELITE CUE Mode
Previously, instructions for parsing using Python were listed here, but now an official library is distributed.
Please use MWings for Python.
Data Format
| # | Data | Description | Remarks |
|---|---|---|---|
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 | Only 0x05 |
| 14 | uint8 | Number of sensor data | Only 15 |
| Sensor Data 1 | |||
| 15 | uint8 | Info bits | Only 0x00 |
| 16 | uint8 | Data source | Only 0x34 |
| 17 | uint8 | Extended byte | Only 0x00 |
| 18 | uint8 | Data length | Only 3 |
| 19 | [uint8] | Data | Packet property data |
| Sensor Data 2 | |||
| 22 | uint8 | Info bits | Only 0x12 |
| 23 | uint8 | Data source | Only 0x05 |
| 24 | uint8 | Extended byte | 0x35, 0x04, or 0x00 |
| 25 | uint8 | Data length | Only 4 |
| 26 | uint32 | Data | Event data |
| Sensor Data 3 | |||
| 30 | uint8 | Info bits | Only 0x11 |
| 31 | uint8 | Data source | Only 0x30 |
| 32 | uint8 | Extended byte | Only 0x08 |
| 33 | uint8 | Data length | Only 2 |
| 34 | uint16 | Data | Power supply voltage (mV) |
| Sensor Data 4 | |||
| 36 | uint8 | Info bits | Only 0x11 |
| 37 | uint8 | Data source | Only 0x30 |
| 38 | uint8 | Extended byte | Only 0x01 |
| 39 | uint8 | Data length | Only 2 |
| 40 | uint16 | Data | Voltage of ADC1 (mV) |
| Sensor Data 5 | |||
| 42 | uint8 | Info bits | Only 0x00 |
| 43 | uint8 | Data source | Only 0x00 |
| 44 | uint8 | Extended byte | Only 0x00 |
| 45 | uint8 | Data length | Only 1 |
| 46 | uint8 | Data | Magnetic data |
| Sensor Data 6 | |||
| 47 | uint8 | Info bits | Only 0x15 |
| 48 | uint8 | Data source | Only 0x04 |
| 49 | uint8 | Extended byte | 0x?0 Frequency and sample number |
| 50 | uint8 | Data length | Only 6 |
| 51 | [int16] | Data | Acceleration data |
| Sensor Data 7 | |||
| 57 | uint8 | Info bits | Only 0x15 |
| 58 | uint8 | Data source | Only 0x04 |
| 59 | uint8 | Extended byte | 0x?1 Frequency and sample number |
| 60 | uint8 | Data length | Only 6 |
| 61 | [int16] | Data | Acceleration data |
| Sensor Data 8 | |||
| (Omitted) | |||
| Sensor Data 15 | |||
| 137 | uint8 | Info bits | Only 0x15 |
| 138 | uint8 | Data source | Only 0x04 |
| 139 | uint8 | Extended byte | 0x?9 Frequency and sample number |
| 140 | uint8 | Data length | Only 6 |
| 141 | int16 | Data | Acceleration data |
| End of sensor data | |||
| 147 | uint8 | Checksum 1 | CRC8 up to this point |
uint8 | Checksum 2 | LRC8 up to Checksum 1 | |
char | Footer | CR (0x0D/'\r') | |
char | Footer | LF (0x0A/'\n') |
Output Data Example
:80000000CF7F7382019E3B0180050F003400038135001205040406000000113008020B8611300102042E000000018015044006FFF00010FC1815044106FFF00018FC1815044206FFF00010FC0015044306FFF80000FC1015044406FFF00010FC1815044506FFE00018FBF815044606FFE80000FC0015044706FFE80010FBF815044806FFE80010FC0815044906FFE80010FC080C0E
| # | Data | Description | Value | |
|---|---|---|---|---|
: | char | Header | : | |
80000000 | 0 | uint32 | Serial ID of repeater | No repeater |
CF | 4 | uint8 | LQI | 207/255 |
7F73 | 5 | uint16 | Sequence number | 32627 |
82019E3B | 7 | uint32 | Serial ID of sender | 0x2019E3B |
01 | 11 | uint8 | Logical device ID of sender | 0x01 |
80 | 12 | uint8 | Sensor type | |
05 | 13 | uint8 | PAL board version and PAL board ID | TWELITE CUE |
0F | 14 | uint8 | Number of sensor data | 15 items |
| Sensor Data 1 | ||||
00 | 15 | uint8 | Info bits | No extended byte uint8 |
34 | 16 | uint8 | Data source | Packet property |
00 | 17 | uint8 | Extended byte | None |
03 | 18 | uint8 | Data length | 3 bytes |
813500 | 19 | [uint8] | Data | ID 129, timer event occurred |
| Sensor Data 2 | ||||
12 | 22 | uint8 | Info bits | Extended byte present uint32 |
05 | 23 | uint8 | Data source | Event |
04 | 24 | uint8 | Extended byte | Acceleration event |
04 | 25 | uint8 | Data length | 4 bytes |
06000000 | 26 | uint32 | Data | Dice: 6 |
| Sensor Data 3 | ||||
11 | 30 | uint8 | Info bits | Extended byte present uint16 |
30 | 31 | uint8 | Data source | Voltage |
08 | 32 | uint8 | Extended byte | Power supply voltage |
02 | 33 | uint8 | Data length | 2 bytes |
0B86 | 34 | uint16 | Data | 2950 mV |
| Sensor Data 4 | ||||
11 | 36 | uint8 | Info bits | Extended byte present uint16 |
30 | 37 | uint8 | Data source | Voltage |
01 | 38 | uint8 | Extended byte | Voltage of ADC1 |
02 | 39 | uint8 | Data length | 2 bytes |
042E | 40 | uint16 | Data | 1070 mV |
| Sensor Data 5 | ||||
00 | 42 | uint8 | Info bits | No extended byte uint8 |
00 | 43 | uint8 | Data source | Magnetic |
00 | 44 | uint8 | Extended byte | None |
01 | 45 | uint8 | Data length | 1 byte |
80 | 46 | uint8 | Data | No magnet (periodic transmit) |
| Sensor Data 6 | ||||
15 | 47 | uint8 | Info bits | Extended byte present int16 |
04 | 48 | uint8 | Data source | Acceleration data |
40 | 49 | uint8 | Extended byte | 100Hz, sample 0 |
06 | 50 | uint8 | Data length | 6 bytes |
FFF00010FC18 | 51 | [int16] | Data | X-16mG/Y16mG/Z-1000mG |
| Sensor Data 7 | ||||
15 | 57 | uint8 | Info bits | Extended byte present int16 |
04 | 58 | uint8 | Data source | Acceleration data |
41 | 59 | uint8 | Extended byte | 100Hz, sample 1 |
06 | 60 | uint8 | Data length | 6 bytes |
FFF00018FC18 | 61 | [int16] | Data | X-16mG/Y24mG/Z-1000mG |
| Sensor Data 8 | ||||
| (Omitted) | ||||
| Sensor Data 15 | ||||
15 | 137 | uint8 | Info bits | Extended byte present int16 |
04 | 138 | uint8 | Data source | Acceleration data |
49 | 139 | uint8 | Extended byte | 100Hz, sample 9 |
06 | 140 | uint8 | Data length | 6 bytes |
FFE80010FC08 | 141 | int16 | Data | X-24mG/Y16mG/Z-1016mG |
| End of sensor data | ||||
0C | 147 | uint8 | Checksum 1 | 0x0C |
0E | uint8 | Checksum 2 | 0x0E | |
char | Footer | '\r' | ||
char | Footer | '\n' |
Data Identification Criteria
The Parent and Repeater App can receive data from various types of child devices.
To check whether the output data is from the CUE App (TWELITE CUE mode), refer to the following points:
| # | Data | Item | Condition |
|---|---|---|---|
| 0 | uint32 | Serial ID of repeater | MSB is 1 |
| 7 | uint32 | Serial ID of sender | MSB is 1 |
| 12 | uint8 | Sensor type | Must be 0x80 |
| 13 | uint8 | PAL board version and PAL board ID | Must be 0x05 |
| - | - | Payload size | Must be 148 bytes |
Example Parser Implementations
- Python
- Arduino (C++)
Magnet Sensor PAL Mode
For Magnet Sensor PAL Mode, the output is identical to the output of Magnet Sensor PAL child devices.
Motion Sensor PAL Mode (Acceleration Measurement Mode)
For Motion Sensor PAL Mode (Acceleration Measurement Mode), the output is identical to the output of Motion Sensor PAL child devices.
Motion Sensor PAL Mode (Move / Dice Mode)
Data Format
| # | Data | Description | Remarks |
|---|---|---|---|
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 | Only 0x03 |
| 14 | uint8 | Number of sensor data | Only 04 |
| Sensor Data 1 | |||
| 15 | uint8 | Info bits | Only 0x00 |
| 16 | uint8 | Data source | Only 0x34 |
| 17 | uint8 | Extended byte | Only 0x00 |
| 18 | uint8 | Data length | Only 3 |
| 19 | [uint8] | Data | Packet property data |
| Sensor Data 2 | |||
| 22 | uint8 | Info bits | Only 0x12 |
| 23 | uint8 | Data source | Only 0x05 |
| 24 | uint8 | Extended byte | Only 0x04 |
| 25 | uint8 | Data length | Only 4 |
| 26 | uint32 | Data | Event data |
| Sensor Data 3 | |||
| 30 | uint8 | Info bits | Only 0x11 |
| 31 | uint8 | Data source | Only 0x30 |
| 32 | uint8 | Extended byte | Only 0x08 |
| 33 | uint8 | Data length | Only 2 |
| 34 | uint16 | Data | Power supply voltage (mV) |
| Sensor Data 4 | |||
| 36 | uint8 | Info bits | Only 0x11 |
| 37 | uint8 | Data source | Only 0x30 |
| 38 | uint8 | Extended byte | Only 0x01 |
| 39 | uint8 | Data length | Only 2 |
| 40 | uint16 | Data | Voltage of ADC1 (mV) |
| End of sensor data | |||
| 42 | uint8 | Checksum 1 | CRC8 up to this point |
uint8 | Checksum 2 | LRC8 up to Checksum 1 | |
char | Footer | CR (0x0D/'\r') | |
char | Footer | LF (0x0A/'\n') |
Output Data Example
Below is an example for Dice Mode. For Move Mode, the event in Sensor Data 2 will differ.
:80000000B400048106664801800304003400038035001205040403000000113008020D2011300102052C59B7
| # | Data | Description | Value | |
|---|---|---|---|---|
: | char | Header | : | |
80000000 | 0 | uint32 | Serial ID of repeater | No repeater |
B1 | 4 | uint8 | LQI | 177/255 |
0008 | 5 | uint16 | Sequence number | 8 |
81066648 | 7 | uint32 | Serial ID of sender | 0x2019E3B |
01 | 11 | uint8 | Logical device ID of sender | 0x1066648 |
80 | 12 | uint8 | Sensor type | |
03 | 13 | uint8 | PAL board version and PAL board ID | TWELITE CUE Dice / Move |
04 | 14 | uint8 | Number of sensor data | 4 items |
| Sensor Data 1 | ||||
00 | 15 | uint8 | Info bits | No extended byte uint8 |
34 | 16 | uint8 | Data source | Packet property |
00 | 17 | uint8 | Extended byte | None |
03 | 18 | uint8 | Data length | 3 bytes |
803500 | 19 | [uint8] | Data | ID 128, event occurred (only ADC1 and power supply) |
| Sensor Data 2 | ||||
12 | 22 | uint8 | Info bits | Extended byte present uint32 |
05 | 23 | uint8 | Data source | Event |
04 | 24 | uint8 | Extended byte | Acceleration event |
04 | 25 | uint8 | Data length | 4 bytes |
03000000 | 26 | uint32 | Data | Dice Mode, die: 3 |
| Sensor Data 3 | ||||
11 | 30 | uint8 | Info bits | Extended byte present uint16 |
30 | 31 | uint8 | Data source | Voltage |
08 | 32 | uint8 | Extended byte | Power supply voltage |
02 | 33 | uint8 | Data length | 2 bytes |
0D20 | 34 | uint16 | Data | 3360 mV |
| Sensor Data 4 | ||||
11 | 36 | uint8 | Info bits | Extended byte present uint16 |
30 | 37 | uint8 | Data source | Voltage |
01 | 38 | uint8 | Extended byte | Voltage of ADC1 |
02 | 39 | uint8 | Data length | 2 bytes |
052C | 40 | uint16 | Data | 1324 mV |
| End of sensor data | ||||
59 | 42 | uint8 | Checksum 1 | 0x0C |
B7 | uint8 | Checksum 2 | 0x0E | |
char | Footer | '\r' | ||
char | Footer | '\n' |
Data Identification Criteria
The Parent and Repeater App can receive data from various types of child devices.
To check whether the output data is from the CUE App (Move or Dice Mode of Motion Sensor PAL Mode), refer to the following points:
| # | Data | Item | Condition |
|---|---|---|---|
| 0 | uint32 | Serial ID of repeater | MSB is 1 |
| 7 | uint32 | Serial ID of sender | MSB is 1 |
| 12 | uint8 | Sensor type | Must be 0x80 |
| 13 | uint8 | PAL board version and PAL board ID | Must be 0x03 |
| - | - | Payload size | Must be 43 bytes |