This is the multi-page printable view of this section. Click here to print...
Serial Communication App Manual
- 1: Serial Communication App Manual
- 1.1: Pin Assignments of Serial Communication App
- 1.2: Communication Modes of Serial Communication App
- 1.2.1: Serial Communication App Format Mode (ASCII)
- 1.2.2: Serial Communication App Format Mode (Binary)
- 1.2.3: Serial Communication App Chat Mode
- 1.2.4: Serial Communication App Transparent Mode
- 1.2.5: Serial Communication App Header Transparent Mode
- 1.3: Interactive Mode (Serial Communication App)
- 1.4: Notes on Communication in Serial Communication App
- 1.5: Custom Default Feature of Serial Communication App
- 2: Serial Communication App Manual
- 2.1: Pin Assignments of Serial Communication App
- 2.2: Communication Modes of Serial Communication App
- 2.2.1: Serial Communication App Format Mode (ASCII)
- 2.2.2: Serial Communication App Format Mode (Binary)
- 2.2.3: Serial Communication App Chat Mode
- 2.2.4: Serial Communication App Transparent Mode
- 2.2.5: Serial Communication App Header Transparent Mode
- 2.3: Custom Default Feature of Serial Communication App
- 2.4: Notes on Communication in Serial Communication App
- 2.5: Interactive Mode (Serial Communication App)
1 - Serial Communication App Manual
Based on the latest version preinstalled in the GOLD series.
See here for the BLUE/RED stable version.
Download
To install the Serial Communication App (App_Uart
), install the TWELITE STAGE SDK and rewrite using the TWELITE STAGE App.
1.1 - Pin Assignments of Serial Communication App
TWELITE / TWELITE DIP
The functions of pins used by the Serial Communication App are represented using the pin names from the Super Simple! Standard App Pins shown in the figure below.

Super Simple! Standard App Pin Assignment Table
Serial Communication | Super Simple! Standard | Function |
---|---|---|
VCC GND | VCC GND | Power Input |
TX RX | TX RX | Serial Input and Output |
TX_SUB RX_SUB | SCL SDA | Serial Sub Input and Output |
RTS | PWM1 | Serial Input Permission |
M1 | M1 | Parent/Child Selection |
M2 | M2 | Adding Relay Function to Child |
M3 | M3 | Sleep |
EX1 | AI2 | Overwriting Operation Mode |
BPS | BPS | Enabling Alternative Baud Rate Setting |
RST | RST | Reset Input |
SET | DI1 | Enter interactive mode |
Power Input
Connect a 3.3V (2.0-3.6V) power supply to VCC
/GND
.
Serial Input and Output
TX
/RX
are used for transmitting and receiving serial communication (UART).
Serial Sub Input and Output
TX_SUB
(SCL
) / RX_SUB
(SDA
) can be used as sub-ports for serial input and output.
Serial Input Permission
When RTS
(PWM1
) is at Low level, it indicates that serial input to RX
is being accepted.
RX
when at High level, it is expected to prevent data loss.Parent/Child Selection
Connecting M1
to GND
sets the device as a parent, while leaving it open or connecting to VCC
sets it as a child.
Setting via Interactive Mode
You can omit this connection and configure it via the interactive mode.
i set Device ID
:0
Adding Relay Function to Child
When M2
is connected to GND
in child mode, relay functionality can be added.
Setting via Interactive Mode
You can omit this connection and configure it via the interactive mode.
r set Role
:1
or0x12
Sleep
Connecting M3
to GND
puts the device into sleep mode.
Overwriting Operation Mode
By connecting EX1
to GND
at startup, the operation mode can be overwritten to format mode (binary).
Enabling Alternative Baud Rate Setting
Connecting BPS
to GND
enables the alternative baud rate setting specified in interactive mode.
Reset Input
By connecting a push button between RST
and GND
, a reset button can be implemented. RST
has an internal pull-up resistor.
Enter interactive mode
By connection SET
to GND
on startup, the interactive mode will be ready.
TWELITE UART
The functions of pins used by the Serial Communication App are represented using the pin names of the 7P interface printed on the board (② in the figure below).

Board Antenna Type

Coaxial Connector Type
Silkscreen | Function |
---|---|
VCC GND | Power Input |
TXD RXD | Serial Input and Output |
SET | Overwriting Operation Mode |
RST | Reset Input |
Power Input
Connect a 3.3V (2.0-3.6V) power supply to VCC
/GND
.
Serial Input and Output
TX
/RX
are used for transmitting and receiving serial communication (UART).
Overwriting Operation Mode
By connecting SET
to GND
at startup, the operation mode can be overwritten to format mode (ASCII).
Reset Input
By connecting a push button between RST
and GND
, a reset button can be implemented. RST
has an internal pull-up resistor.
1.2 - Communication Modes of Serial Communication App
List of Communication Modes
Each mode is switched by Interactive Mode (some modes can be set via pin input).
ID | Mode |
---|---|
A | Format Mode (ASCII) |
B | Format Mode (Binary) |
C | Chat Mode |
D | Transparent Mode |
E | Header Transparent Mode |
Initial state is Header Transparent Mode.
Regardless of mode, please keep transmitted data within 80 bytes
Due to packet size constraints, please keep the data sent at one time within 80 bytes in binary.
The maximum length of packets in IEEE 802.15.4 adopted by TWELITE is 128 bytes, and considering overhead, the payload area available for the serial communication app is limited to 80 bytes.
If you need to send a large amount of data, please consider other products using Wi-Fi, etc. TWELITE is suitable for efficiently sending small amounts of data.
A
: Format Mode (ASCII)
When data is input to the transmitting terminal according to a specific format, the receiving terminal outputs data according to the same specific format.
Data represented in hexadecimal is expressed as ASCII strings.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Simple/Extended format data | → | Simple/Extended format data |
In TWELITE UART, this mode is enabled when started with the SET
pin connected to GND
.
There are two formats to represent data.
- Simple format: Uses only logical device ID. Super simple! Compatible with the standard app’s UART transmission function.
- Extended format: Uses transmission options such as serial ID and retransmission count in addition to logical device ID.
For example, 5-byte binary data 0x48 0x45 0x4C 0x4C 0x4F
can be sent using the simple format as follows.
[Transmitting Side]
:000148454C4C4F8B <- Input
:DBA1800103 <- Output
[Receiving Side]
:780148454C4C4F13 <- Output
In format mode, settings such as application ID can be dynamically applied not only by Interactive Mode but also by commands via UART (ASCII format).
B
: Format Mode (Binary)
When data is input to the transmitting terminal according to a specific format, the receiving terminal outputs data according to the same specific format.
Data represented in hexadecimal is expressed in binary format as is.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Simple/Extended format data | → | Simple/Extended format data |
In TWELITE / TWELITE DIP, this mode is enabled when started with the EX1
pin connected to GND
.
Like Format Mode (ASCII), there are two formats to represent data.
For example, 5-byte binary data 0x48 0x45 0x4C 0x4C 0x4F
can be sent using the simple format as follows.
[Transmitting Side]
0xA5 0x5A 0x00 0x07 0x00 0x01 0x48 0x45 0x4C 0x4C 0x4F 0x43 0x04 <- Input
0xA5 0x5A 0x00 0x04 0xDB 0xA1 0x80 0x01 0xFB 0x04 <- Output
[Receiving Side]
0xA5 0x5A 0x00 0x07 0x78 0x01 0x48 0x45 0x4C 0x4C 0x4F 0x3B 0x04 <- Output
In format mode, settings such as application ID can be dynamically applied not only by Interactive Mode but also by commands via UART (binary format).
C
: Chat Mode
Enables text chat.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Any string | → | Auxiliary information + any string |
Displays prompt and echoes back (outputs the entered characters). All terminals act as child devices and perform broadcast communication.
For example, when a terminal sends the string Hello
to other terminals, the behavior is as follows.
[Transmitting Side]
810A4778:0> Hello <- Input
810A4778:1> <- Output
[Receiving Side]
[810A4778:0] Hello <- Output
82018CA0:0> <- Output
In the above example, the prompt shows the serial ID, but you can also use any handle name.
D
: Transparent Mode
When arbitrary data is input to the transmitting terminal, the receiving terminal outputs the received data as is.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Any data | → | Any data |
Since no format is required, existing UART communication can be easily wirelessized.
On the other hand, data boundaries become ambiguous, and the receiving output cannot identify the sender, which are drawbacks.
By default, data input to the transmitting side is separated by CRLF, and data before CRLF is sent.
For example, when Hello<Enter>
is input on the transmitting terminal, the receiving terminal outputs Hello
as is.
[Transmitting Side]
Hello <- Input
[Receiving Side]
Hello <- Output
E
: Header Transparent Mode
When arbitrary data is input to the transmitting terminal, the receiving terminal outputs the received content with auxiliary information added in a specific format.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Any data | → | Any data + auxiliary information |
By default, data input to the transmitting side is separated by CRLF, and data before CRLF is sent.
For example, when Hello<Enter>
is input on the transmitting terminal, the receiving terminal outputs Hello
in a format including auxiliary information. The transmitting terminal also outputs a format that conveys a transmission completion message.
[Transmitting Side]
Hello <- Input
;U;00004;219;0x820163B2;000;000;0,1,Hel...;6E; <- Output
[Receiving Side]
;U;00003;000;0x820163B2;255;000;Hello;42; <- Output
The auxiliary information output by the receiving side includes the sender’s address, received signal strength, checksum, etc. The format of auxiliary information can be customized.
1.2.1 - Serial Communication App Format Mode (ASCII)

Overview
When data formatted in a specific manner is input on the transmitting side, the receiving side outputs data formatted in the same manner.
Data is represented as hexadecimal ASCII strings.
Transmitting Side Input | Receiving Side Output | |
---|---|---|
Simple/Extended format data | → | Simple/Extended format data |
- In TWELITE UART, format mode (ASCII) is enabled by starting up with the
SET
pin connected toGND
. - In TWELITE / TWELITE DIP, format mode (binary) is enabled by starting up with the
EX1
pin connected toGND
.
There are two types of formats that can be handled.
- Simple format: uses only the Logical Device ID. Extremely Simple! Compatible with the UART transmission function of the standard app.
- Extended format: uses Logical Device ID plus transmission options such as Serial ID and retry count.
For example, 5-byte binary data 0x48 0x45 0x4C 0x4C 0x4F
can be sent using the simple format as follows.
[Sending side]
:000148454C4C4F8B <- Input
:DBA1800103 <- Output
[Receiving side]
:780148454C4C4F13 <- Output
Basic Format
When sending data sequences expressed in basic or extended formats, they are converted to ASCII strings (0-9, A-F).
The format is extremely simple! It starts with :
and ends with CRLF, just like the output of the standard app (App_Twelite) or the parent device output of the parent/repeater app (App_Wings).
Header | Payload | Checksum | Footer |
---|---|---|---|
: | Repeated 00 -FF | LRC8 of payload | CRLF |
- All ASCII characters
- Starts with
:
(0x3A
) - Checksum is the two’s complement of the sum of the payload
- Ends with CRLF (
\r\n
/0x0D 0x0A
) - Big-endian
For example, binary data 0x00 0x11 0x22 0x33 0xAA 0xBB 0xCC
is expressed as follows.
:00112233AABBCC69<CR><LF>
Distinguishing Parent and Child Devices
Format mode distinguishes between parent and child devices.
The Application ID and frequency channel must be matched between parent and child devices.
Source Identification
Format mode allows identifying the source from the received data.
The simple format uses the Logical Device ID, and the extended format uses the Logical Device ID plus the extended address.
0x8
added at the front.Simple Format
When using the simple format of format mode, follow the format below.
Transmitting Side Input
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , child 0x01 -0x64 , all children 0x78 |
1 | uint8 | Command number | Any value less than 0x80 |
2 | [uint8] | Arbitrary data | Byte sequence of length (N) (recommended (N \leqq 80)) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0x01
command of the Extremely Simple! Standard App.Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , child 0x01 -0x64 , unset child 0x78 |
1 | uint8 | Command number | Value less than 0x80 specified by the sender |
2 | [uint8] | Arbitrary data | Byte sequence of length (N) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0x01
command of the Extremely Simple! Standard App.Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command number | Only 0xA1 |
2 | uint8 | Response ID | Continuation number in the range 128 -255 (0x80 -0xFF ) |
3 | uint8 | Result | Success 1 , failure 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Example Usage
An example of sending byte sequence 0x11 0x22 0x33 0xAA 0xBB 0xCC
from the parent to all children is shown.
[Sending side: Parent]
:7801112233AABBCCF0<CR><LF> <- Input
:DBA1800103<CR><LF> <- Output
The trailing
0xF0
is the checksum: the two’s complement of the sum from0x78
to0xCC
(LSB 8 bits).
[Receiving side: All children]
:0001112233AABBCC68<CR><LF> <- Output
The trailing
0x68
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Extended Format
When using the extended format of format mode, follow the format below.
Transmitting Side Input
When specifying destination using Logical Device ID
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , child 0x01 -0x64 , all children 0x78 |
1 | uint8 | Command number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | [uint8] | Options | Option list of length (N) (Details of option list) |
3+(N) | [uint8] | Arbitrary data | Byte sequence of length (M) (recommended (M \leqq 80)) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
When specifying destination using Extended Address
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Extended Address Specifier | Only 0x80 |
1 | uint8 | Command number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | uint32 | Destination Extended Address | Serial ID with 0x8 added at the front |
7 | [uint8] | Options | Option list of length (N) (Details of option list) |
7+(N) | [uint8] | Arbitrary data | Byte sequence of length (M) (recommended (M \leqq 80)) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Details of Option List
In the extended format, you can specify fine settings by specifying the option list.
The option list is represented by repeating option IDs and their arguments. The end is 0xFF
.
0xFF
.ID | Argument | Default | Description |
---|---|---|---|
0x01 | None | Disabled | Enable MAC ACK |
0x02 | uint8 | 0x00 | Enable application retry |
0x03 | uint16 | 0x0000 | Minimum initial transmission delay |
0x04 | uint16 | 0x0000 | Maximum initial transmission delay |
0x05 | uint16 | 10 | Application retry interval |
0x06 | None | Disabled | Allow parallel requests |
0x07 | None | Disabled | Disable response messages |
0x08 | None | Disabled | Sleep after transmission |
0x01
: Enable MAC ACK
Enables MAC layer ACK (acknowledgment).
Not suitable for frequent data transmission, but can improve reliability.
0x78
).0x02
: Enable Application Retry
When using MAC ACK, specify 0x00
-0x0F
. Retries 0-16 times respectively until the transmission succeeds.
When not using MAC ACK, specify 0x81
-0x8F
. Always retries 1-16 times.
Response messages are output after all retries are completed.
0x03
: Minimum Initial Transmission Delay
Specifies the minimum delay before the first transmission in milliseconds.
0x04
: Maximum Initial Transmission Delay
Specifies the maximum delay before the first transmission in milliseconds.
0x05
: Application Retry Interval
Specifies the retry interval in milliseconds when application retry is enabled.
0x06
: Allow Parallel Requests
Allows parallel requests.
When allowed, the next request can be accepted without blocking until the current request completes.
For example, if three requests with a 0.5-second delay are input consecutively, normally they are processed sequentially at 0.5s, 1.0s, and 1.5s. When parallel requests are allowed, they are processed in no particular order after 0.5s. Note that it cannot be used when packet fragmentation is required.
0x07
: Disable Response Messages
Disables the response messages output when data is input on the transmitting side.
0x08
: Sleep After Transmission
Immediately puts the device to sleep after transmission.
When RX
detects a rising edge, it wakes up from sleep. Please input any 1 byte of data.
After waking up, UART initialization completes and input is accepted.
Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , child 0x01 -0x64 , unset child 0x78 |
1 | uint8 | Command number | Only 0xA0 |
2 | uint8 | Response ID | Value specified by the sender |
3 | uint32 | Source Extended Address | Serial ID with 0x8 added at the front |
7 | uint32 | Destination Extended Address | 0xFFFFFFFF if using Logical Device ID |
11 | uint8 | LQI | Radio communication quality at reception |
12 | uint16 | Length of following byte sequence | Number of bytes (M) |
14 | [uint8] | Arbitrary data | Byte sequence of length (M) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command number | Only 0xA1 |
2 | uint8 | Response ID | Value specified at input |
3 | uint8 | Result | Success 1 , failure 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Example Usage
An example of sending byte sequence 0x11 0x22 0x33 0xAA 0xBB 0xCC
from the parent to a child is shown.
Example specifying Logical Device ID
An example sending from the parent to the child with Logical Device ID 0x42
.
- Response ID is
0x01
- No options
- Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:42A001FF112233AABBCC87<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0x87
is the checksum: the two’s complement of the sum from0x42
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A00181000000FFFFFFFFC80006112233AABBCC7D<CR><LF> <- Output
The trailing
0x7D
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Example specifying Extended Address
An example sending from the parent to the child with extended address 0x81000001
(Serial ID 0x1000001
).
- Response ID is
0x01
- No options
- Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:80A00181000001FF112233AABBCCC7<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0xC7
is the checksum: the two’s complement of the sum from0x80
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A0018100000081000001C80006112233AABBCCF7<CR><LF> <- Output
The trailing
0xF7
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Example using MAC ACK
An example sending from the parent to the child with Logical Device ID 0x42
using MAC ACK.
- Response ID is
0x01
- Option
0x01
: Enable MAC ACK specified - Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:42A00101FF112233AABBCC86<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0x86
is the checksum: the two’s complement of the sum from0x42
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A00181000000FFFFFFFFC80006112233AABBCC7D<CR><LF> <- Output
The trailing
0x7D
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Example using delay
An example sending from the parent to the child with Logical Device ID 0x42
with a 768ms delay.
- Response ID is
0x01
- Option
0x03
: Minimum initial transmission delay specified - Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:42A001030300FF112233AABBCC81<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0x81
is the checksum: the two’s complement of the sum from0x42
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A00181000000FFFFFFFFC80006112233AABBCC7D<CR><LF> <- Output
The trailing
0x7D
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
0xDB
Command
Instead of setting interactive mode, you can operate and configure the module by inputting the 0xDB
command from UART.
1.2.1.1 - 0xDB Command in Serial Communication App Format Mode (ASCII)
0xDB
command instead of Interactive Mode.Input Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB itself |
1 | uint8 | Command number | Selected from values below |
2 | [uint8] | Parameter | Optional length N bytes representing setting values |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
List of Command Numbers
Function | |
---|---|
0xF0 | Enable ACK |
0xF1 | Get Device Info |
0xF2 | Apply Device Settings |
0xF3 | Get Device Settings |
0xFD | Erase Device Settings |
0xFE | Save Device Settings |
0xFF | Reset Device |
0xF0
: Enable ACK
Requests an ACK response.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF0 |
2 | uint8 | Data | Only 0x01 |
uint8 | Checksum | 0x34 : LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF1
: Get Device Info
Displays address and other information. Also output at startup.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF1 |
2 | uint32 | Default Application ID | 67720103 |
6 | uint32 | Version number | For 1.4.7 , 00010407 |
10 | uint8 | Logical device ID | |
11 | uint32 | Serial ID | |
15 | uint8 | Silent mode status | Enabled 1 , Disabled 0 |
16 | uint8 | Network status | UP 1 , DOWN 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF2
: Apply Device Settings
Applies the settings.
Response Format
On Success
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF3 |
2 | [uint8] | Settings content | Identifier |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
On Failure
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF3 |
2 | uint8 | Error | Only 0xFF |
uint8 | Checksum | 0x33 : LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF3
: Get Device Settings
Gets the settings.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF3 |
2 | [uint8] | Settings content | Identifier and data |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xFD
: Erase Device Settings
Resets device settings and resets the device.
No parameters or response.
0xFE
: Save Device Settings
Saves applied settings and resets the device.
No parameters or response.
0xFF
: Reset Device
Discards applied settings and resets the device.
No parameters or response.
Parameter List (0xF2
/ 0xF3
)
Parameters for 0xF2
: Apply Device Settings and 0xF3
: Get Device Settings are represented by repeated pairs of identifiers and data (big endian).
Identifier | Data | Content |
---|---|---|
0x00 | uint32 | Application ID |
0x01 | uint32 | Frequency Channel Mask |
0x02 | uint16 | Retry Count and Output |
0x03 | uint8 | Logical Device ID |
0x04 | uint8 | Role |
0x05 | uint8 | Relay Layer |
0x06 | uint8 | Communication Mode |
0x07 | uint32 | Baud Rate |
0x08 | uint8 | Parity |
0x09 | uint8 | Encryption Function |
0x0A | [uint8] | Encryption Key |
0x0B | [uint8] | Header / Handle name |
0x0C | uint16 | Delimiter Character |
0xFF | uint8 | Error |
0x00
: Application ID
Specifies the application ID.
0x01
: Frequency Channel Mask
Specifies the bit mask of frequency channels.
Set bits for channels to be used. For example, to use channel 11, specify 1<<11
.
0x02
: Retry Count and Output
Specifies the radio transmission output and the number of additional packet transmissions in transparent mode and header-attached transparent mode.
Only the lower 1 byte is used. The upper 4 bits represent the retry count (0
-9
), and the lower 4 bits represent the transmission output (0
-3
). For example, 8 retries / output 3 is 0x0083
.
0x03
: Logical Device ID
Specifies the logical device ID.
0x04
: Role
Effective only for slave devices. Specify one of the following values. Normally, select a delivery method that does not use the network layer.
Delivery Methods Without Network Layer
0
: Normal designation (parent or child device)1
-3
: Relay slave devices (logical device IDs are1
-100
or120
). Numbers1
-3
indicate the maximum relay hop count. This method retransmits up to the maximum relay hops, which may cause duplicate packets depending on relay device placement and count.
Delivery Methods Using Network Layer
11
: Parent device12
: Relay device13
: Child device
80
to the above values. For example, 93
means “network layer enabled and silent mode”.0x05
: Relay Layer
The relay layer number. Relay devices attempt to connect to relay devices or parent devices in upper (smaller value) relay layers. Effective only when Role is set to 12
.
0x06
: Communication Mode
0
: Transparent mode1
: Format mode (ASCII)2
: Format mode (Binary)3
: Chat mode4
: Header-attached transparent mode
0x07
: Baud Rate
Specifies the UART baud rate.
0x08
: Parity
Specifies the sum of settings in the following combination:
- Bit
0
: 8Bit8
: 7Bit
- Parity
0
: None1
: Odd2
: Even
- Stop
0
: STOP 14
: STOP 2
For example, 7-E-1 is specified as 8+2+0=10(0xA)
.
0x09
: Encryption Function
Specifies whether encryption is enabled.
0
: Disabled1
: AES128bit encryption enabled
0x0A
: Encryption Key
Specifies a 16-byte encryption key.
Can store binary sequences that cannot be set in Interactive Mode. This may cause display issues in Interactive Mode.
0x0B
: Header / Handle name
Specifies a header format on the mode E
or handle name on the mode C
.
0x0C
: Delimiter Character
Specifies the delimiter character (0x00
-0xFF
).
1.2.2 - Serial Communication App Format Mode (Binary)

Overview
When data formatted in a specific manner is input on the transmitting side, the receiving side outputs data formatted in the same manner.
Data represented in hexadecimal is output as raw binary.
Transmitting Side Input | Receiving Side Output | |
---|---|---|
Simple/Extended Format Data | → | Simple/Extended Format Data |
- On TWELITE UART, format mode (ASCII) is enabled by connecting the
SET
pin toGND
at startup. - On TWELITE / TWELITE DIP, format mode (binary) is enabled by connecting the
EX1
pin toGND
at startup.
There are two types of supported formats.
- Simple format: uses Logical Device ID only; Extremely Simple! Compatible with UART transmission function of the standard app
- Extended format: uses Logical Device ID plus options such as Serial ID and retry count
For example, 5 bytes of binary data 0x48 0x45 0x4C 0x4C 0x4F
can be transmitted using the simple format as follows.
Hereafter, the 0x
in binary data representation is omitted.
For example, 0x48 0x45 0x4C 0x4C 0x4F
is represented as 48 45 4C 4C 4F
.
[Transmitting Side]
A5 5A 80 07 00 01 48 45 4C 4C 4F 43 04 <- Input
A5 5A 80 04 DB A1 80 01 FB 04 <- Output
[Receiving Side]
A5 5A 80 07 78 01 48 45 4C 4C 4F 3B 04 <- Output
Basic Format
When sending data expressed in basic or extended format, handle it as raw binary data.
Header | Length | Payload | Checksum | Footer |
---|---|---|---|---|
A5 5A | Payload Length | Repeated 00 -FF | XOR of Payload | EOT |
- All binary
- Header is 2 bytes:
A5 5A
- Payload length is 2 bytes representing the byte count, OR’ed with
0x8000
- Checksum is XOR of payload
- Footer is EOT
0x04
(can be omitted on input) - Big-endian
For example, binary data 00 11 22 33 AA BB CC
is expressed as follows.
A5 5A 80 07 00 11 22 33 AA BB CC DD 04
Although debugging is troublesome, it offers high efficiency for communication between microcontrollers.
Distinguishing Parent and Child Devices
Format mode distinguishes between parent and child devices.
Parent and child devices must match Application ID and Frequency Channel.
Source Identification
Format mode allows identification of the source from received data.
Simple format uses Logical Device ID, and extended format uses Logical Device ID plus extended address.
0x8
added at the front.Simple Format
When using the simple format of format mode, follow the format below.
Transmitting Side Input
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , All Children 0x78 |
1 | uint8 | Command Number | Any value less than 0x80 |
2 | [uint8] | Arbitrary Data | Byte sequence of length \(N\) (recommended \(N\leqq80\)) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , Unset Child 0x78 |
1 | uint8 | Command Number | Value less than 0x80 specified by sender |
2 | [uint8] | Arbitrary Data | Byte sequence of length \(N\) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 4 | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command Number | Only 0xA1 |
2 | uint8 | Response ID | Continuation number in the range 128 -255 (0x80 -0xFF ) |
3 | uint8 | Result | Success 1 , Failure 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Example
Example of sending byte sequence 11 22 33 AA BB CC
from parent to all children.
[Transmitting Side: Parent]
A5 5A 80 08 78 01 11 22 33 AA BB CC A4 04 <- Input
A5 5A 80 04 DB A1 80 01 FB 04 <- Output
The last byte
0xA4
is the checksum: XOR from0x78
to0xCC
.
[Receiving Side: All Children]
A5 5A 80 08 00 01 11 22 33 AA BB CC DC 04 <- Output
The last byte
0xDC
is the checksum: XOR from0x00
to0xCC
.
Extended Format
When using the extended format of format mode, follow the format below.
Transmitting Side Input
When using Logical Device ID as destination
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+\(M\)+3 | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , All Children 0x78 |
1 | uint8 | Command Number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | [uint8] | Options | Option list of length \(N\) (Details below) |
3+\(N\) | [uint8] | Arbitrary Data | Byte sequence of length \(M\) (recommended \(M\leqq80\)) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
When using Extended Address as destination
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+\(M\)+7 | |
0 | uint8 | Extended Address Specifier | Only 0x80 |
1 | uint8 | Command Number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | uint32 | Destination Extended Address | Serial ID with 0x8 added at the front |
7 | [uint8] | Options | Option list of length \(N\) (Details below) |
7+\(N\) | [uint8] | Arbitrary Data | Byte sequence of length \(M\) (recommended \(M\leqq80\)) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Details of Option List
In extended format, detailed settings can be specified by providing an option list.
The option list consists of repeated option IDs and arguments. It ends with 0xFF
.
0xFF
.ID | Argument | Default | Description |
---|---|---|---|
0x01 | None | Disabled | Enable MAC ACK |
0x02 | uint8 | 0x00 | Enable Application Retransmission |
0x03 | uint16 | 0x0000 | Minimum Initial Transmission Delay |
0x04 | uint16 | 0x0000 | Maximum Initial Transmission Delay |
0x05 | uint16 | 10 | Application Retransmission Interval |
0x06 | None | Disabled | Allow Parallel Requests |
0x07 | None | Disabled | Disable Response Messages |
0x08 | None | Disabled | Sleep After Transmission |
0x01
: Enable MAC ACK
Enables MAC layer ACK (acknowledgment).
Not suitable for frequent data transmissions but can improve reliability.
0x78
).0x02
: Enable Application Retransmission
When using MAC ACK, specify 0x00
-0x0F
. Retransmits 0-16 times until successful.
When not using MAC ACK, specify 0x81
-0x8F
. Always retransmits 1-16 times.
Response messages are output after all retransmissions are complete.
0x03
: Minimum Initial Transmission Delay
Specifies the minimum delay before the first transmission in milliseconds.
0x04
: Maximum Initial Transmission Delay
Specifies the maximum delay before the first transmission in milliseconds.
0x05
: Application Retransmission Interval
Specifies the interval between application retransmissions in milliseconds.
0x06
: Allow Parallel Requests
Allows parallel requests.
When allowed, the next request can be accepted without blocking until the previous request completes.
For example, if three requests each with 0.5 seconds delay are input consecutively, normally they are processed sequentially at 0.5s, 1.0s, and 1.5s. With parallel requests allowed, they are processed in any order after 0.5s. Note that this cannot be used when packet segmentation is required.
0x07
: Disable Response Messages
Disables response messages output when data is input on the transmitting side.
0x08
: Sleep After Transmission
Immediately puts the device to sleep after transmission.
RX
detects rising edge to wake from sleep. Input any 1 byte of data.
After waking, UART initialization completes and input is accepted.
Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(M\)+14 | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , Unset Child 0x78 |
1 | uint8 | Command Number | Only 0xA0 |
2 | uint8 | Response ID | Value specified by sender |
3 | uint32 | Source Extended Address | Serial ID with 0x8 added at the front |
7 | uint32 | Destination Extended Address | 0xFFFFFFFF when using Logical Device ID |
11 | uint8 | LQI | Radio signal quality at reception |
12 | uint16 | Length of Following Bytes | Byte count \(M\) |
14 | [uint8] | Arbitrary Data | Byte sequence of length \(M\) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 4 | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command Number | Only 0xA1 |
2 | uint8 | Response ID | Value specified on input |
3 | uint8 | Result | Success 1 , Failure 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Examples
Example of sending byte sequence 11 22 33 AA BB CC
from parent to child.
Example specifying Logical Device ID
Example of sending from parent to child with Logical Device ID 0x01
.
- Response ID is
0x01
- No options
[Transmitting Side: Parent]
A5 5A 80 0A 01 A0 01 FF 11 22 33 AA BB CC 82 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0xC1
is checksum: XOR from0x42
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 FF FF FF FF FF 00 06 11 22 33 AA BB CC 2D 04 <- Output
The last byte
0x2D
is checksum: XOR from0x00
to0xCC
.
Example specifying Extended Address
Example of sending from parent to child with Extended Address 0x820163B2
(Serial ID 0x20163B2
).
- Response ID is
0x01
- No options
[Transmitting Side: Parent]
A5 5A 80 0E 80 A0 01 82 01 63 B2 FF 11 22 33 AA BB CC 51 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0x51
is checksum: XOR from0x80
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 82 01 63 B2 FF 00 06 11 22 33 AA BB CC 7F 04 <- Output
The last byte
0x7F
is checksum: XOR from0x00
to0xCC
.
Example using MAC ACK
Example of sending from parent to child with Logical Device ID 0x01
using MAC ACK.
- Response ID is
0x01
- Option
0x01
: Enable MAC ACK specified
[Transmitting Side: Parent]
A5 5A 80 0B 01 A0 01 01 FF 11 22 33 AA BB CC 83 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0x83
is checksum: XOR from0x01
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 00 00 01 01 FF 00 06 11 22 33 AA BB CC 2D 04 <- Output
The last byte
0x2D
is checksum: XOR from0x00
to0xCC
.
Example with Delay
Example of sending from parent to child with Logical Device ID 0x01
with 768ms delay.
- Response ID is
0x01
- Option
0x03
: Minimum Initial Transmission Delay specified
[Transmitting Side: Parent]
A5 5A 80 0D 01 A0 01 03 03 00 FF 11 22 33 AA BB CC 82 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0x82
is checksum: XOR from0x01
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 FF FF FF FF FF 00 06 11 22 33 AA BB CC 2D 04 <- Output
The last byte
0x2D
is checksum: XOR from0x00
to0xCC
.
0xDB
Command
Instead of setting interactive mode, you can operate and configure the module by inputting the 0xDB
command from UART.
1.2.2.1 - 0xDB Command in Serial Communication App Format Mode (Binary)
0xDB
command instead of Interactive Mode.Input Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB indicating itself |
1 | uint8 | Command Number | Selected from values below |
2 | [uint8] | Parameter | Byte sequence of length \(N\) indicating setting value (optional) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Command Number List
Function | |
---|---|
0xF0 | Enable ACK |
0xF1 | Get Device Info |
0xF2 | Apply Device Settings |
0xF3 | Get Device Settings |
0xFD | Erase Device Settings |
0xFE | Save Device Settings |
0xFF | Reset Device |
0xF0
: Enable ACK
Requests ACK response.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 3 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF0 |
2 | uint8 | Data | Only 0x01 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF1
: Get Device Info
Displays information such as address. Also output at startup.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 17 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF1 |
2 | uint32 | Default Application ID | 67720103 |
6 | uint32 | Version Number | For 1.4.7 , 00010407 |
10 | uint8 | Logical Device ID | |
11 | uint32 | Serial ID | |
15 | uint8 | Silent Mode Status | Enabled 1 , Disabled 0 |
16 | uint8 | Network Status | UP 1 , DOWN 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF2
: Apply Device Settings
Applies settings.
Response Format
On Success
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF3 |
2 | [uint8] | Setting Content | Identifier |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
On Failure
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 3 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF3 |
2 | uint8 | Error | Only 0xFF |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF3
: Get Device Settings
Retrieves settings.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF3 |
2 | [uint8] | Setting Content | Identifier and data |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xFD
: Erase Device Settings
Initializes settings and resets the device.
No parameters or response.
0xFE
: Save Device Settings
Saves applied settings and resets the device.
No parameters or response.
0xFF
: Reset Device
Discards applied settings and resets the device.
No parameters or response.
Parameter List (0xF2
/0xF3
)
Parameters for 0xF2
: Apply Device Settings and 0xF3
: Get Device Settings are represented as repeated identifier and data (big endian) pairs.
Identifier | Data | Content |
---|---|---|
0x00 | uint32 | Application ID |
0x01 | uint32 | Frequency Channel Mask |
0x02 | uint16 | Retry Count and Output |
0x03 | uint8 | Logical Device ID |
0x04 | uint8 | Role |
0x05 | uint8 | Relay Layer |
0x06 | uint8 | Communication Mode |
0x07 | uint32 | Baud Rate |
0x08 | uint8 | Parity |
0x09 | uint8 | Encryption Function |
0x0A | [uint8] | Encryption Key |
0x0B | [uint8] | Header / Handle name |
0x0C | uint16 | Delimiter Character |
0xFF | uint8 | Error |
0x00
: Application ID
Specifies the application ID.
0x01
: Frequency Channel Mask
Specifies the bit mask of frequency channels.
Set bits for channels to use. For example, to use channel 11, set 1<<11
.
0x02
: Retry Count and Output
Specifies the radio transmission output and the number of additional packets to send in transparent mode and header-attached transparent mode.
Only the lower 1 byte is used. The upper 4 bits indicate retry count (0
-9
), and the lower 4 bits indicate transmission output (0
-3
). For example, 8 retries/output 3 is 0x0083
.
0x03
: Logical Device ID
Specifies the logical device ID.
0x04
: Role
Valid only for child devices. Specify the following values. Usually, select a delivery method without using the network layer.
Delivery Methods Without Using Network Layer
0
: Normal designation (parent or child)1
-3
: Relay child devices (logical device IDs1
-100
or120
). Numbers1
-3
indicate maximum relay hops. This method repeats retries up to the maximum relay hops, which may cause duplicate packets depending on relay device placement and number.
Delivery Methods Using Network Layer
11
: Parent device12
: Relay device13
: Child device
80
to the above values. For example, 93
means “using network layer and silent mode”.0x05
: Relay Layer
The relay layer number. Relay devices attempt to connect to relay devices or parent devices with higher layers (lower values). Effective only when Role is set to 12
.
0x06
: Communication Mode
0
: Transparent mode1
: Format mode (binary)2
: Format mode (binary)3
: Chat mode4
: Header-attached transparent mode
0x07
: Baud Rate
Specifies UART baud rate.
0x08
: Parity
Specifies the sum of settings in the following combination.
- Bit
0
: 8Bit8
: 7Bit
- Parity
0
: None1
: Odd2
: Even
- Stop
0
: STOP 14
: STOP 2
For example, 7-E-1 is 8+2+0=10(0xA)
.
0x09
: Encryption Function
Specifies whether encryption is enabled.
0
: Disabled1
: AES128bit encryption enabled
0x0A
: Encryption Key
Specifies a 16-byte encryption key.
Allows storing binary sequences that cannot be set in Interactive Mode. In this case, the display in Interactive Mode may be disrupted.
0x0B
: Header / Handle name
Specifies a header format on the mode E
or handle name on the mode C
.
0x0C
: Delimiter Character
Specifies the delimiter character string (0x00
-0xFF
).
1.2.3 - Serial Communication App Chat Mode
By connecting MONOSTICK to a PC etc., chat can be performed among multiple terminals.
Overview
Enables text chat.
Sending Side Input | Receiving Side Output | |
---|---|---|
Any string | → | Any string + auxiliary information |
Displays prompt and echoes back (outputs input characters). All terminals operate as child devices, performing broadcast communication.
For example, when sending the string Hello
from one terminal to another, it behaves as follows.
[Sending Side]
810A4778:0> Hello <- Input
810A4778:1> <- Output
[Receiving Side]
[810A4778:0] Hello <- Output
82018CA0:0> <- Output
Chat mode displays prompt and echoes back (outputs input characters entered by itself).
All terminals are treated as child devices and broadcast their transmitted content. Communication is possible with all terminals but destination cannot be specified. Binary data cannot be sent. Only strings are supported (0x00-0x1F, 0x7F cannot be sent).
Relay supports up to 3 hops. Relay is disabled by default.
Distinction between Parent and Child Devices
Chat mode does not distinguish between parent and child devices.
If the Application ID and frequency channel are the same, data entered in any terminal is sent to other terminals.

Network configuration image
Identification of Source
The auxiliary information in the received output can identify the sender.
If the Interactive Mode’s h: Header format
is blank, the 7-digit serial ID with a leading 0x8 is used as the extended address. For example, the following output indicates the sender’s serial ID was 0x10A4778
.
[810A4778:0] Hello
If h: Header format
is set to an arbitrary string, it is used as the handle name. Handle name consumes data space in the wireless packet.
Sending Side Input Format
Enter message and newline after prompt.
Data | Content | Remarks |
---|---|---|
[char] | Message | 0x00 -0x1F , 0x7F not allowed |
char | CR (0x0D /'\r' ) | Allowed alone |
char | LF (0x0A /'\n' ) | Allowed alone |
810A4778:0> Hello
Receiving Side Output Format
Outputs received message following auxiliary info.
Auxiliary information includes the module’s extended address or handle name and a sequence number.
Data | Content | Remarks |
---|---|---|
char | Auxiliary info header | [ only |
[char] | Identification info | 8-digit extended address or handle name |
char | Auxiliary info delimiter | : only |
[char] | Sequence number | Starting from 0 |
char | Auxiliary info footer | ] only |
char | Separator | Space only |
[char] | Message | |
char | Footer | CR (0x0D /'\r' ) |
char | Footer | LF (0x0A /'\n' ) |
(err)
or (canceled)
are output.
[810A4778:0] Hello
Other Inputs
Terminals supporting escape sequences can use the following control commands.
Ctrl-L
: Clear screenCtrl-C
: Cancel inputBS
/DEL
: Move cursor back
1.2.4 - Serial Communication App Transparent Mode

External microcontrollers can be easily connected, but to optimize communication using formats, format modes (ASCII / Binary) are suitable.
Overview
Purely wirelesss UART.
Sending side input | Receiving side output | |
---|---|---|
Any data | → | Any data |
Since no format is required, existing UART communication can be easily wirelessized.
However, data delimiters are ambiguous and it is impossible to identify the sender from the receiver output.
The initial state specifies CRLF as the transmission trigger character. Therefore, data input to the transmitter is separated by CRLF, and the data before CRLF is transmitted.
For example, entering Hello<Enter>
on the transmitting terminal results in Hello
being output on the receiving terminal.
[Sending side]
Hello <- Input
[Receiving side]
Hello <- Output
Continuous input strings are split and sent in chunks of 80 bytes. Data up to the trigger character should normally be 80 bytes or less.
All terminals are considered child devices, and the transmitted content is broadcast. Communication with all terminals is possible, but the destination cannot be specified. Both ASCII characters and binary data can be sent.
Relay supports up to 3 hops. By default, relay is disabled.
Distinction between Parent and Child Devices
Transparent mode does not distinguish between parent and child devices.
If application ID and frequency channel are the same, data entered into any terminal is sent to other terminals.

Network configuration image
Identification of Sender
Transparent mode cannot identify the sender.
To identify sender, sender information must be included in data input to the transmitter.
Transmission Trigger
Transmission trigger must be considered, as data is divided and transmitted wirelessly packet by packet.
Therefore, the following transmission triggers must be taken into account:
- When a timeout after data input is reached
- When the input data reaches the minimum data size
- When the transmission trigger character is received
Transmission Trigger Priority
Transmission trigger settings can be specified from the interactive mode k
: Transmission Trigger item.
Example Setting
When setting the transmission trigger character to LF, minimum data size to 8 bytes, and timeout to 30 ms, set as follows:
m: set UART mode (D)
k: set Tx Trigger (sep=0x0a, min_bytes=8 dly=30[ms])
o: set option bits (0x00000100)
1.2.5 - Serial Communication App Header Transparent Mode
Overview
Enabled by default.
When arbitrary data is input to the transmitting terminal, the receiving terminal outputs data with auxiliary information in a specific format.
Transmitting side input | Receiving side output | |
---|---|---|
Any data | → | Any data + auxiliary info |
By default, data input on the transmitting side is separated by CRLF and data before CRLF is sent.
For example, entering Hello<Enter>
on the transmitting side results in output Hello
with auxiliary info on the receiving side. The transmitting side also outputs a message indicating transmission completion.
[Transmitting side]
Hello <- input
;U;00004;219;0x820163B2;000;000;0,1,Hel...;6E; <- output
[Receiving side]
;U;00003;000;0x820163B2;255;000;Hello;42; <- output
The auxiliary information output by the receiving side includes the source address, received signal strength, checksum, etc. The format of the auxiliary information can be customized.
Distinction between Parent and Child Devices
Header Transparent Mode does not distinguish between parent and child devices.
If the Application ID and frequency channel are the same, data input to any terminal is sent to other terminals.

Network configuration image
Identification of Source
The header on the received data includes the logical device ID and serial ID of the sender.
Output Format on Receiving Side
The output format is represented as semicolon (;
) separated fields.
[Example output in default state]
;U;00777;120;0x81025A17;120;013;HELLO;79;
This output can be interpreted as follows.
Data | Description | Value | |
---|---|---|---|
U | char | Fixed value | U |
00777 | uint16 | Timestamp at output | 777 seconds |
120 | uint8 | Source logical device ID | 120 ID-less child device |
0x81025A17 | uint32 | Source extended address | 81025A17 |
120 | uint8 | LQI (link quality indicator) | 120/255 |
013 | uint8 | Source sequence number | 13 |
HELLO | [uint8] | Input data | HELLO |
79 | uint8 | XOR checksum | 0x79 |
The source logical device ID is 219
for its own response message.
The extended address is the 7-bit serial ID printed on the TWELITE device with a leading 0x8
added.
Customization by Header Format
The output format on the receiving side follows the header format.
Changing the header format customizes the content of the auxiliary information output and the checksum calculation range.
;U;%t;%i;0x%A;%q;%s;<*;%X;\n
.The header format can be changed via the interactive mode command h: set header format
.
Simplest Format
The simplest header format is *\n
. It outputs the received data with CRLF line endings.
h: set header format [*\n]
When sending HELLO
in this case, it behaves as follows.
[Receiving side]
HELLO<CR><LF> or HELLO<LF>
[Transmitting side]
HELLO<CR><LF>
Special Characters in Header Format
You can customize the output by including the following special characters in the header format.
General
Description | |
---|---|
* | Received data |
&hl | Arbitrary ASCII character (e.g., &20 is space) |
< | Start position for checksum calculation (default is start of string) |
> | End position for checksum calculation (only from v1.4.6) |
Characters following \
(backslash)
Description | |
---|---|
\n | CRLF (0x0D 0x0A ) |
\t | TAB |
\* | * |
\% | % |
\< | < |
\> | > |
\& | & |
Characters following %
Description | Length | Data format | |
---|---|---|---|
%A | Source address (32bit) | 8 chars | Hexadecimal |
%a | Source address (32bit) | 10 chars | Hexadecimal |
%I | Source logical address (8bit) | 2 chars | Hexadecimal |
%i | Source logical address (8bit) | 3 chars | Decimal |
%T | Current system time (seconds) | 4 chars | Hexadecimal |
%t | Current system time (seconds) | 5 chars | Decimal |
%S | Source sequence number (hex) | 2 chars | Hexadecimal |
%s | Source sequence number (hex) | 3 chars | Hexadecimal |
%Q | Received signal strength | 2 chars | Hexadecimal |
%q | Received signal strength | 3 chars | Decimal |
%X | Checksum | 2 chars | Hexadecimal |
%x | Checksum | 3 chars | Decimal |
Checksum Calculation
The checksum is calculated by XOR (exclusive OR) from the start of the data or from the position indicated by <
in the header format up to just before %X
or %x
.
Example in Default State
The default header format is ;U;%t;%i;0x%A;%q;%s;<*;%X;\n
, where the checksum calculation range is *;
.
That is, when sending HELLO
, the binary data HELLO;
is targeted, resulting in checksum 0x79
.
[Verification code in Python]
from functools import reduce
def main():
data = "HELLO;"
checksum = reduce(lambda x, y: x ^ y, data.encode("ascii"))
print(f"{data} -> {hex(checksum)}")
if __name__ == "__main__":
main() # HELLO; -> 0x79
Other Examples
For example, consider the header format ;%I;*;%X
.
Since <
is not specified, the checksum calculation range is ;%I;*;
.
That is, when sending HELLO
, the binary data ;000;HELLO;
is targeted, resulting in checksum 0x49
.
[Verification code in Python]
from functools import reduce
def main():
data = ";000;HELLO;"
checksum = reduce(lambda x, y: x ^ y, data.encode("ascii"))
print(f"{data} -> {hex(checksum)}")
if __name__ == "__main__":
main() # ;000;HELLO; -> 0x49
Transmission Trigger
There is no format on the transmitting side input, but data is split and transmitted packet by packet.
Therefore, the following transmission triggers must be considered.
- When timeout after data input occurs
- When input data reaches the minimum data size
- When a transmission trigger character is received
Priority of Transmission Triggers
Transmission trigger settings are specified via the interactive mode k
: set transmission trigger item.
Example Setting
To set the transmission trigger character to LF, minimum data size to 8 bytes, and timeout to 30 ms, use the following settings.
m: set UART mode (E)
k: set Tx Trigger (sep=0x0a, min_bytes=8 dly=30[ms])
o: set option bits (0x00000100)
1.3 - Interactive Mode (Serial Communication App)
This section describes features specific to the serial communication app (App_Uart). For common functions, refer to the TWELITE APPS Manual Top Page.
Interactive Mode cannot be used while TWELITE is in sleep mode.
Make sure that the M3
pin is not connected to GND
.
Display Example
[CONFIG MENU/App_Uart:0/v1-05-1/SID=8300051A]
a: (0x67720103) Application ID [HEX:32bit]
i: ( 120) Device ID [1-100,etc]
c: (18 ) Channel(s)
x: ( 0x03) RF Power/Retransmissions [HEX:8bit]
b: (115200,8N1) UART Baud Alt. [XXXXX]
o: (0x00000100) Option bits [HEX:32bit]
r: ( 0x00) Role [0-3,11-13]
l: ( 1) LayerTree repeat layer [1-63]
m: (E ) UART mode [ABCDE]
t: ( 0x0D0A) Tx trigger character [XX,XXYY]
u: ( 0) Minimum data size [0,1-80]
T: ( 0) Timeout [0,10-200 msec]
h: (;U;%t;%i;0x%A;%q;%s;<*;%X;\n) Header format / Handle name
C: ( 0) Encryption [0,1]
K: (*CRYPT_KEY_HERE*) Encryption key [16chrs]
[ESC]:Exit [!]:Reset System [*]:Extr Menu [:]:AppSel
Commands
Parameter | Default | Remarks | |
---|---|---|---|
a | Application ID | 0x67720103 | 32bit |
i | Logical Device ID | 120 | Parent 121 , Child 1 -100 , No ID Child 120 |
c | Frequency Channel | 18 | 11 -26 |
x | TX Power & Retransmit Count | 0x03 | |
Retransmit Count | 0 | 1 -9 times, 0 disables | |
TX Power | 3 | 0 -3 | |
b | UART Alternate Setting | 115200 ,`8N1 | Enable with BPS pin |
o | Option Bits | 0x00000000 | Other detailed settings |
r | Role | 0 | Normal 0 , Relay Child 1 -3 , Other |
l | LayerTree Relay Layer | 0x01 | |
m | Communication Mode | E | A /B /C /D /E |
t | TX Trigger Characters | 0x0D0A | ASCII code of trigger characters |
u | Minimum Data Size | 0 | Disabled 0 , 1 -80 |
T | Timeout | 0 | Disabled 0 , 10 -200 ms |
h | Header Format / Handle Name | Details | |
Header Format | When using Header Transmission Mode | ||
Handle Name | When using Chat Mode | ||
C | Encryption | 0 | Disabled 0 , AES128bit 1 |
K | Encryption Key | *CRYPT_KEY_HERE* | 16 characters |
Each command is described in detail below.
a
: Application ID
All devices participating in communication must use the same value. This logically separates networks.
i
: Logical Device ID
Set this value if it is necessary to distinguish between multiple child devices.
If no distinction is needed or possible, set it to 120
. If distinction is required, use any value between 1
and 100
for child devices, and use 121
for parent devices.
c
: Frequency Channel
All devices participating in communication must use the same value. This physically separates networks.
x
: TX Power & Retransmit Count
Specifies the RF transmission power and the number of retransmissions in Transparent Mode and Header Transmission Mode.
b
: UART Alternate Setting
Overrides the default 38400bps alternate baud rate used when booting with the BPS
pin connected to GND
.
Select from: 9600
/ 19200
/ 38400
/ 57600
/ 115200
/ 230400
.
If the device is booted with the BPS
pin open, this setting will not be applied and the baud rate will be fixed at 115200
bps.
To forcibly apply the alternate baud rate regardless of the BPS
pin state, enable the Option Bit Force Apply Alternate Setting.
Bit-Parity-Stop
.o
: Option Bits
Specify a 32-bit value. Each bit enables a corresponding setting.
Bit | Setting Item | Default | A | B | C | D | E |
---|---|---|---|---|---|---|---|
0x00000001 | Disable Internal Pull-up of M3 | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00000100 | Enable TX Trigger | 1️⃣ | ✅ | ✅ | |||
0x00000200 | Prioritize New Input Stream | 0️⃣ | ✅ | ✅ | ✅ | ✅ | |
0x00001000 | Suppress Response Message | 0️⃣ | ✅ | ✅ | ✅ | ||
0x00004000 | Relax Duplicate Checker | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00010000 | Force Apply Alternate Baud Rate | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00020000 | Simultaneous Output to Sub Port | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00040000 | Switch Primary Port | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x01000000 | Disable LED | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x02000000 | Disable LED in Standby | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
r
: Role
Valid for child devices only. Select one of the following. Normally, use a transmission mode that does not rely on the network layer (LayerTree).
Transmission Modes Not Using the Network Layer
0
: Default (Parent or Child)1
–3
: Repeater Child (set Logical Device ID to1
–100
or120
). The value indicates the maximum number of relay hops. Duplicated packets may occur depending on placement and number of repeaters.
Transmission Modes Using the Network Layer
Only supported in Header Transmission Mode.
11
: Parent12
: Repeater13
: Child
l
: LayerTree Relay Layer
Specifies the relay layer number. A repeater attempts to connect to parent or repeater devices with higher relay layers (smaller values). Valid only when Role is set to 12
.
m
: Communication Mode
A
: Format Mode (ASCII)B
: Format Mode (Binary)C
: Chat ModeD
: Transparent ModeE
: Header Transmission Mode
t
: TX Trigger Characters
In Transparent and Header Transmission modes, entering these characters triggers transmission of a packet.
If Minimum Data Size is specified, the characters will be ignored until that size is reached.
This setting is applied when Option Bit 0x00000100
(enabled by default) is set.
Initially, CRLF is used as the trigger.
u
: Minimum Data Size
Specifies the minimum size of data to be handled continuously. TX Trigger Characters are ignored until this size is met.
In Interactive Mode, specify a number between 1
–80
as byte count. Set to 0
to disable. The default is disabled.
T
: Timeout
Time to wait from the last input before transmitting a packet.
In Interactive Mode, specify a value between 10
–200
in milliseconds. Set to 0
to disable. The default is disabled.
h
: Header Format / Handle Name
Specifies the header format for Header Transmission Mode, or the handle name for Chat Mode.
Header (Header Transmission Mode)
Specify the Header Format Syntax for use in Header Transmission Mode.
Handle Name (Chat Mode)
Specify the handle name to display on the receiving device.
Up to 23 characters. This consumes part of the data transmission area (80 bytes).
C
: Encryption
Specifies whether to enable encryption.
To enable AES128-bit encryption, set this to 1
.
K
: Encryption Key
Specify a 16-character encryption key when encryption is enabled.
Option Bits Details
This section describes each setting associated with the bits of the Option Bits value.
00000001
: Disable Internal Pull-up of M3
Disables the internal pull-up resistor of the M3
pin used for sleep configuration on TWELITE DIP.
00000100
: Enable TX Trigger
Enables the TX Trigger setting in Transparent or Header Transmission Mode.
00000200
: Prioritize New Input Stream
In Format Mode (ASCII/Binary), Transparent Mode, and Header Transmission Mode, if multiple input streams are received before the previous transmission is complete, the newer input is prioritized.
00001000
: Suppress Response Message
In Format Mode (ASCII/Binary) and Header Transmission Mode, suppresses the response message after transmission completes.
00004000
: Relax Duplicate Checker
Relaxes the duplicate check conditions on the receiver side.
The duplicate checker prevents redundant packets that may arrive due to relays.
If the transmission interval is short (e.g., under 100 ms), even different packets might be mistakenly recognized as duplicates (even with different sequence numbers).
Enable this option when using short intervals or multiple transmitters concurrently.
00010000
: Force Apply Alternate Setting
Applies the UART Alternate Setting even if the BPS
pin is not pulled low at boot.
00020000
: Simultaneous Output to Sub Port
Also outputs serial TX data to the secondary TX_SUB port.
00040000
: Switch Primary Port
Switches the serial I/O between the main TX/RX and the sub TX_SUB/RX_SUB ports.
About Repeater Function
When the communication range is insufficient or obstructed, using a repeater can be effective.
A repeater device retransmits packets it receives to other devices.
01000000
: Disable LED
Disables the LED on TWELITE STICK and MONOSTICK.
02000000
: Disable LED in Standby
Disables the LED on TWELITE STICK and MONOSTICK while in standby.
Configuring Repeater Function
Normally, enter Interactive Mode and change the Role to a value between 1
and 3
. The default is 0
, which does not enable the repeater function.
r: set Role (0x0)
The values 1
to 3
indicate the maximum number of relay hops. For example, setting it to 3
allows up to 3 hops.
This setting is only valid for child devices, not for parent devices.
Example Configuration
The following network configuration shows an example where the Role of red devices is set to 0
, and that of blue devices is set to 3
.

Example of relaying via Role setting
By adding more red devices, communication with up to three relay hops between them can be established.

Example of adding transmitters and receivers
1.4 - Notes on Communication in Serial Communication App
UART Data Input and Output
4KB buffers are allocated for UART input and output. When outputting two UART lines, 2KB is used for input and output buffers for each line.
In format mode and chat mode, it is rarely necessary to be aware of buffer sizes, but in header transparent mode and transparent mode when continuously inputting streams, or even in format mode when inputting many streams at once, it is necessary to be aware of the buffer size limits. On the output side, if a slow baud rate is set, the output of data received wirelessly may not keep up.
Data beyond the buffer limits is not protected at the boundary, causing data loss. Especially on the input side, consider referring to the flow control pins described below.
UART Flow Control
Input flow control is implemented to behave like the RTS pin. The pin used is PWM1
(DIO5
), targeting the main UART port. When input is not accepted, the state is High; when input is accepted, the state is Low. Output flow control is not supported. Receiving devices should ensure sufficient baud rate and processing speed.
- After power-on or reset, the pin is High. It becomes Low once UART is initialized.
- When the UART input buffer exceeds 7/8 full, the pin goes High; it goes Low when below that threshold.
- In transparent mode, the pin is High during packet transmission.
Countermeasures for Wireless Communication Errors
If data loss occurs on the receiving side, increase the number of wireless retransmissions.
Increasing the number of additional packets sent can improve the success rate of reception.
The number of retransmissions can be set in Interactive Mode (x: set RF Conf
).
1.5 - Custom Default Feature of Serial Communication App
For example, if you create firmware that changes the baud rate from 115200bps to 9600bps, you can use it at 9600bps from the start.
Configuration Procedure
1. Apply Settings
Change the settings in Interactive Mode and press S
to save.
2. Download Settings
Prepare software that can download data using the xmodem protocol.
While still in Interactive Mode (before selecting items), request xmodem download.
In TeraTerm, perform the following operations:
- Select
File > Transfer > XMODEM > Receive...
- Choose
Option > Checksum, Binary
- Specify file name (e.g.,
conf.bin
) - Press
Open
You can use lrzsz
on macOS or Linux.
lrx --binary --xmodem /path/to/conf.bin
Usually, enter Interactive Mode with
screen
, then pressCtrl+A
and execute:exec !! lrx -b -X /path/to/conf.bin
If the download succeeds, a 128-byte file is generated (may be smaller depending on xmodem implementation).
3. Creating Custom Binary
Concatenate the downloaded file to the end of the firmware binary file to create a custom binary.
Use command line tools or general file concatenation tools for concatenation.
Example
Example assuming downloaded xmodem file is conf.bin
, original binary file is App_Uart_BLUE_L1305_V1-4-X.bin
, and custom binary to create is App_Uart_custom_V1-4-X.bin
.
【Windows】
copy App_Uart_BLUE_L1305_V1-4-X.bin App_Uart_custom_V1-4-X.bin
type conf.bin >> App_Uart_custom_V1-4-X.bin
【macOS / Linux】
cat App_Uart_BLUE_L1305_V1-4-X.bin conf.bin > App_Uart_custom_V1-4-X.bin
4. Writing Custom Binary
Write the concatenated custom binary to TWELITE.
When entering Interactive Mode after writing custom binary, C-
is displayed at the end of the first line.
--- CONFIG/TWE UART APP V1-04-2/SID=0x81001f1c/LID=0x78 C- ---
When overwriting settings from Interactive Mode and saving to custom binary, CE
is displayed instead of C-
.
--- CONFIG/TWE UART APP V1-04-2/SID=0x81001f1c/LID=0x78 CE ---
2 - Serial Communication App Manual
Download
To install the Serial Communication App (App_Uart
), install the TWELITE STAGE SDK and rewrite using the TWELITE STAGE App.
2.1 - Pin Assignments of Serial Communication App
TWELITE / TWELITE DIP
The functions of pins used by the Serial Communication App are represented using the pin names from the Super Simple! Standard App Pins shown in the figure below.

Super Simple! Standard App Pin Assignment Table
Serial Communication | Super Simple! Standard | Function |
---|---|---|
VCC GND | VCC GND | Power Input |
TX RX | TX RX | Serial Input and Output |
TX_SUB RX_SUB | SCL SDA | Serial Sub Input and Output |
RTS | PWM1 | Serial Input Permission |
M1 | M1 | Parent/Child Selection |
M2 | M2 | Adding Relay Function to Child |
M3 | M3 | Sleep |
EX1 | AI2 | Overwriting Operation Mode |
BPS | BPS | Enabling Alternative Baud Rate Setting |
RST | RST | Reset Input |
Power Input
Connect a 3.3V (2.0-3.6V) power supply to VCC
/GND
.
Serial Input and Output
TX
/RX
are used for transmitting and receiving serial communication (UART).
Serial Sub Input and Output
TX_SUB
(SCL
) / RX_SUB
(SDA
) can be used as sub-ports for serial input and output.
Serial Input Permission
When RTS
(PWM1
) is at Low level, it indicates that serial input to RX
is being accepted.
RX
when at High level, it is expected to prevent data loss.Parent/Child Selection
Connecting M1
to GND
sets the device as a parent, while leaving it open or connecting to VCC
sets it as a child.
Setting via Interactive Mode
You can omit this connection and configure it via the interactive mode.
i set Device ID
:0
Adding Relay Function to Child
When M2
is connected to GND
in child mode, relay functionality can be added.
Setting via Interactive Mode
You can omit this connection and configure it via the interactive mode.
r set Role
:1
or0x12
Sleep
Connecting M3
to GND
puts the device into sleep mode.
Overwriting Operation Mode
By connecting EX1
to GND
at startup, the operation mode can be overwritten to format mode (binary).
Enabling Alternative Baud Rate Setting
Connecting BPS
to GND
enables the alternative baud rate setting specified in interactive mode.
Reset Input
By connecting a push button between RST
and GND
, a reset button can be implemented. RST
has an internal pull-up resistor.
TWELITE UART
The functions of pins used by the Serial Communication App are represented using the pin names of the 7P interface printed on the board (② in the figure below).

Board Antenna Type

Coaxial Connector Type
Silkscreen | Function |
---|---|
VCC GND | Power Input |
TXD RXD | Serial Input and Output |
SET | Overwriting Operation Mode |
RST | Reset Input |
Power Input
Connect a 3.3V (2.0-3.6V) power supply to VCC
/GND
.
Serial Input and Output
TX
/RX
are used for transmitting and receiving serial communication (UART).
Overwriting Operation Mode
By connecting SET
to GND
at startup, the operation mode can be overwritten to format mode (ASCII).
Reset Input
By connecting a push button between RST
and GND
, a reset button can be implemented. RST
has an internal pull-up resistor.
2.2 - Communication Modes of Serial Communication App
List of Communication Modes
Each mode is switched by Interactive Mode (some modes can be set via pin input).
ID | Mode |
---|---|
A | Format Mode (ASCII) |
B | Format Mode (Binary) |
C | Chat Mode |
D | Transparent Mode |
E | Header Transparent Mode |
Initial state is Header Transparent Mode.
Regardless of mode, please keep transmitted data within 80 bytes
Due to packet size constraints, please keep the data sent at one time within 80 bytes in binary.
The maximum length of packets in IEEE 802.15.4 adopted by TWELITE is 128 bytes, and considering overhead, the payload area available for the serial communication app is limited to 80 bytes.
If you need to send a large amount of data, please consider other products using Wi-Fi, etc. TWELITE is suitable for efficiently sending small amounts of data.
A
: Format Mode (ASCII)
When data is input to the transmitting terminal according to a specific format, the receiving terminal outputs data according to the same specific format.
Data represented in hexadecimal is expressed as ASCII strings.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Simple/Extended format data | → | Simple/Extended format data |
In TWELITE UART, this mode is enabled when started with the SET
pin connected to GND
.
There are two formats to represent data.
- Simple format: Uses only logical device ID. Super simple! Compatible with the standard app’s UART transmission function.
- Extended format: Uses transmission options such as serial ID and retransmission count in addition to logical device ID.
For example, 5-byte binary data 0x48 0x45 0x4C 0x4C 0x4F
can be sent using the simple format as follows.
[Transmitting Side]
:000148454C4C4F8B <- Input
:DBA1800103 <- Output
[Receiving Side]
:780148454C4C4F13 <- Output
In format mode, settings such as application ID can be dynamically applied not only by Interactive Mode but also by commands via UART (ASCII format).
B
: Format Mode (Binary)
When data is input to the transmitting terminal according to a specific format, the receiving terminal outputs data according to the same specific format.
Data represented in hexadecimal is expressed in binary format as is.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Simple/Extended format data | → | Simple/Extended format data |
In TWELITE / TWELITE DIP, this mode is enabled when started with the EX1
pin connected to GND
.
Like Format Mode (ASCII), there are two formats to represent data.
For example, 5-byte binary data 0x48 0x45 0x4C 0x4C 0x4F
can be sent using the simple format as follows.
[Transmitting Side]
0xA5 0x5A 0x00 0x07 0x00 0x01 0x48 0x45 0x4C 0x4C 0x4F 0x43 0x04 <- Input
0xA5 0x5A 0x00 0x04 0xDB 0xA1 0x80 0x01 0xFB 0x04 <- Output
[Receiving Side]
0xA5 0x5A 0x00 0x07 0x78 0x01 0x48 0x45 0x4C 0x4C 0x4F 0x3B 0x04 <- Output
In format mode, settings such as application ID can be dynamically applied not only by Interactive Mode but also by commands via UART (binary format).
C
: Chat Mode
Enables text chat.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Any string | → | Auxiliary information + any string |
Displays prompt and echoes back (outputs the entered characters). All terminals act as child devices and perform broadcast communication.
For example, when a terminal sends the string Hello
to other terminals, the behavior is as follows.
[Transmitting Side]
810A4778:0> Hello <- Input
810A4778:1> <- Output
[Receiving Side]
[810A4778:0] Hello <- Output
82018CA0:0> <- Output
In the above example, the prompt shows the serial ID, but you can also use any handle name.
D
: Transparent Mode
When arbitrary data is input to the transmitting terminal, the receiving terminal outputs the received data as is.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Any data | → | Any data |
Since no format is required, existing UART communication can be easily wirelessized.
On the other hand, data boundaries become ambiguous, and the receiving output cannot identify the sender, which are drawbacks.
By default, data input to the transmitting side is separated by CRLF, and data before CRLF is sent.
For example, when Hello<Enter>
is input on the transmitting terminal, the receiving terminal outputs Hello
as is.
[Transmitting Side]
Hello <- Input
[Receiving Side]
Hello <- Output
E
: Header Transparent Mode
When arbitrary data is input to the transmitting terminal, the receiving terminal outputs the received content with auxiliary information added in a specific format.
Input on Transmitting Side | Output on Receiving Side | |
---|---|---|
Any data | → | Any data + auxiliary information |
By default, data input to the transmitting side is separated by CRLF, and data before CRLF is sent.
For example, when Hello<Enter>
is input on the transmitting terminal, the receiving terminal outputs Hello
in a format including auxiliary information. The transmitting terminal also outputs a format that conveys a transmission completion message.
[Transmitting Side]
Hello <- Input
;U;00004;219;0x820163B2;000;000;0,1,Hel...;6E; <- Output
[Receiving Side]
;U;00003;000;0x820163B2;255;000;Hello;42; <- Output
The auxiliary information output by the receiving side includes the sender’s address, received signal strength, checksum, etc. The format of auxiliary information can be customized.
2.2.1 - Serial Communication App Format Mode (ASCII)

Overview
When data formatted in a specific manner is input on the transmitting side, the receiving side outputs data formatted in the same manner.
Data is represented as hexadecimal ASCII strings.
Transmitting Side Input | Receiving Side Output | |
---|---|---|
Simple/Extended format data | → | Simple/Extended format data |
- In TWELITE UART, format mode (ASCII) is enabled by starting up with the
SET
pin connected toGND
. - In TWELITE / TWELITE DIP, format mode (binary) is enabled by starting up with the
EX1
pin connected toGND
.
There are two types of formats that can be handled.
- Simple format: uses only the Logical Device ID. Extremely Simple! Compatible with the UART transmission function of the standard app.
- Extended format: uses Logical Device ID plus transmission options such as Serial ID and retry count.
For example, 5-byte binary data 0x48 0x45 0x4C 0x4C 0x4F
can be sent using the simple format as follows.
[Sending side]
:000148454C4C4F8B <- Input
:DBA1800103 <- Output
[Receiving side]
:780148454C4C4F13 <- Output
Basic Format
When sending data sequences expressed in basic or extended formats, they are converted to ASCII strings (0-9, A-F).
The format is extremely simple! It starts with :
and ends with CRLF, just like the output of the standard app (App_Twelite) or the parent device output of the parent/repeater app (App_Wings).
Header | Payload | Checksum | Footer |
---|---|---|---|
: | Repeated 00 -FF | LRC8 of payload | CRLF |
- All ASCII characters
- Starts with
:
(0x3A
) - Checksum is the two’s complement of the sum of the payload
- Ends with CRLF (
\r\n
/0x0D 0x0A
) - Big-endian
For example, binary data 0x00 0x11 0x22 0x33 0xAA 0xBB 0xCC
is expressed as follows.
:00112233AABBCC69<CR><LF>
Distinguishing Parent and Child Devices
Format mode distinguishes between parent and child devices.
The Application ID and frequency channel must be matched between parent and child devices.
Source Identification
Format mode allows identifying the source from the received data.
The simple format uses the Logical Device ID, and the extended format uses the Logical Device ID plus the extended address.
0x8
added at the front.Simple Format
When using the simple format of format mode, follow the format below.
Transmitting Side Input
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , child 0x01 -0x64 , all children 0x78 |
1 | uint8 | Command number | Any value less than 0x80 |
2 | [uint8] | Arbitrary data | Byte sequence of length (N) (recommended (N \leqq 80)) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0x01
command of the Extremely Simple! Standard App.Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , child 0x01 -0x64 , unset child 0x78 |
1 | uint8 | Command number | Value less than 0x80 specified by the sender |
2 | [uint8] | Arbitrary data | Byte sequence of length (N) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0x01
command of the Extremely Simple! Standard App.Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command number | Only 0xA1 |
2 | uint8 | Response ID | Continuation number in the range 128 -255 (0x80 -0xFF ) |
3 | uint8 | Result | Success 1 , failure 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Example Usage
An example of sending byte sequence 0x11 0x22 0x33 0xAA 0xBB 0xCC
from the parent to all children is shown.
[Sending side: Parent]
:7801112233AABBCCF0<CR><LF> <- Input
:DBA1800103<CR><LF> <- Output
The trailing
0xF0
is the checksum: the two’s complement of the sum from0x78
to0xCC
(LSB 8 bits).
[Receiving side: All children]
:0001112233AABBCC68<CR><LF> <- Output
The trailing
0x68
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Extended Format
When using the extended format of format mode, follow the format below.
Transmitting Side Input
When specifying destination using Logical Device ID
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , child 0x01 -0x64 , all children 0x78 |
1 | uint8 | Command number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | [uint8] | Options | Option list of length (N) (Details of option list) |
3+(N) | [uint8] | Arbitrary data | Byte sequence of length (M) (recommended (M \leqq 80)) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
When specifying destination using Extended Address
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Extended Address Specifier | Only 0x80 |
1 | uint8 | Command number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | uint32 | Destination Extended Address | Serial ID with 0x8 added at the front |
7 | [uint8] | Options | Option list of length (N) (Details of option list) |
7+(N) | [uint8] | Arbitrary data | Byte sequence of length (M) (recommended (M \leqq 80)) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Details of Option List
In the extended format, you can specify fine settings by specifying the option list.
The option list is represented by repeating option IDs and their arguments. The end is 0xFF
.
0xFF
.ID | Argument | Default | Description |
---|---|---|---|
0x01 | None | Disabled | Enable MAC ACK |
0x02 | uint8 | 0x00 | Enable application retry |
0x03 | uint16 | 0x0000 | Minimum initial transmission delay |
0x04 | uint16 | 0x0000 | Maximum initial transmission delay |
0x05 | uint16 | 10 | Application retry interval |
0x06 | None | Disabled | Allow parallel requests |
0x07 | None | Disabled | Disable response messages |
0x08 | None | Disabled | Sleep after transmission |
0x01
: Enable MAC ACK
Enables MAC layer ACK (acknowledgment).
Not suitable for frequent data transmission, but can improve reliability.
0x78
).0x02
: Enable Application Retry
When using MAC ACK, specify 0x00
-0x0F
. Retries 0-16 times respectively until the transmission succeeds.
When not using MAC ACK, specify 0x81
-0x8F
. Always retries 1-16 times.
Response messages are output after all retries are completed.
0x03
: Minimum Initial Transmission Delay
Specifies the minimum delay before the first transmission in milliseconds.
0x04
: Maximum Initial Transmission Delay
Specifies the maximum delay before the first transmission in milliseconds.
0x05
: Application Retry Interval
Specifies the retry interval in milliseconds when application retry is enabled.
0x06
: Allow Parallel Requests
Allows parallel requests.
When allowed, the next request can be accepted without blocking until the current request completes.
For example, if three requests with a 0.5-second delay are input consecutively, normally they are processed sequentially at 0.5s, 1.0s, and 1.5s. When parallel requests are allowed, they are processed in no particular order after 0.5s. Note that it cannot be used when packet fragmentation is required.
0x07
: Disable Response Messages
Disables the response messages output when data is input on the transmitting side.
0x08
: Sleep After Transmission
Immediately puts the device to sleep after transmission.
When RX
detects a rising edge, it wakes up from sleep. Please input any 1 byte of data.
After waking up, UART initialization completes and input is accepted.
Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , child 0x01 -0x64 , unset child 0x78 |
1 | uint8 | Command number | Only 0xA0 |
2 | uint8 | Response ID | Value specified by the sender |
3 | uint32 | Source Extended Address | Serial ID with 0x8 added at the front |
7 | uint32 | Destination Extended Address | 0xFFFFFFFF if using Logical Device ID |
11 | uint8 | LQI | Radio communication quality at reception |
12 | uint16 | Length of following byte sequence | Number of bytes (M) |
14 | [uint8] | Arbitrary data | Byte sequence of length (M) |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
char | Header | Only : | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command number | Only 0xA1 |
2 | uint8 | Response ID | Value specified at input |
3 | uint8 | Result | Success 1 , failure 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
Example Usage
An example of sending byte sequence 0x11 0x22 0x33 0xAA 0xBB 0xCC
from the parent to a child is shown.
Example specifying Logical Device ID
An example sending from the parent to the child with Logical Device ID 0x42
.
- Response ID is
0x01
- No options
- Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:42A001FF112233AABBCC87<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0x87
is the checksum: the two’s complement of the sum from0x42
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A00181000000FFFFFFFFC80006112233AABBCC7D<CR><LF> <- Output
The trailing
0x7D
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Example specifying Extended Address
An example sending from the parent to the child with extended address 0x81000001
(Serial ID 0x1000001
).
- Response ID is
0x01
- No options
- Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:80A00181000001FF112233AABBCCC7<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0xC7
is the checksum: the two’s complement of the sum from0x80
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A0018100000081000001C80006112233AABBCCF7<CR><LF> <- Output
The trailing
0xF7
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Example using MAC ACK
An example sending from the parent to the child with Logical Device ID 0x42
using MAC ACK.
- Response ID is
0x01
- Option
0x01
: Enable MAC ACK specified - Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:42A00101FF112233AABBCC86<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0x86
is the checksum: the two’s complement of the sum from0x42
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A00181000000FFFFFFFFC80006112233AABBCC7D<CR><LF> <- Output
The trailing
0x7D
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
Example using delay
An example sending from the parent to the child with Logical Device ID 0x42
with a 768ms delay.
- Response ID is
0x01
- Option
0x03
: Minimum initial transmission delay specified - Parent’s extended address is
0x81000000
(Serial ID0x1000000
)
[Sending side: Parent]
:42A001030300FF112233AABBCC81<CR><LF> <- Input
:DBA1010182<CR><LF> <- Output
The trailing
0x81
is the checksum: the two’s complement of the sum from0x42
to0xCC
(LSB 8 bits).
[Receiving side: Child]
:00A00181000000FFFFFFFFC80006112233AABBCC7D<CR><LF> <- Output
The trailing
0x7D
is the checksum: the two’s complement of the sum from0x00
to0xCC
(LSB 8 bits).
0xDB
Command
Instead of setting interactive mode, you can operate and configure the module by inputting the 0xDB
command from UART.
2.2.1.1 - 0xDB Command in Serial Communication App Format Mode (ASCII)
0xDB
command instead of Interactive Mode.Input Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB itself |
1 | uint8 | Command number | Selected from values below |
2 | [uint8] | Parameter | Optional length N bytes representing setting values |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
List of Command Numbers
Function | |
---|---|
0xF0 | Enable ACK |
0xF1 | Get Device Info |
0xF2 | Apply Device Settings |
0xF3 | Get Device Settings |
0xF8 | Device Control |
0xFD | Erase Device Settings |
0xFE | Save Device Settings |
0xFF | Reset Device |
0xF0
: Enable ACK
Requests an ACK response.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF0 |
2 | uint8 | Data | Only 0x01 |
uint8 | Checksum | 0x34 : LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF1
: Get Device Info
Displays address and other information. Also output at startup.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF1 |
2 | uint32 | Default Application ID | 67720103 |
6 | uint32 | Version number | For 1.4.7 , 00010407 |
10 | uint8 | Logical device ID | |
11 | uint32 | Serial ID | |
15 | uint8 | Silent mode status | Enabled 1 , Disabled 0 |
16 | uint8 | Network status | UP 1 , DOWN 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF2
: Apply Device Settings
Applies the settings.
Response Format
On Success
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF3 |
2 | [uint8] | Settings content | Length N repeated pairs of identifier and data |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
On Failure
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF3 |
2 | uint8 | Error | Only 0xFF |
uint8 | Checksum | 0x33 : LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF3
: Get Device Settings
Gets the settings.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF3 |
2 | [uint8] | Settings content | Repeated pairs of identifier and data |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xF8
: Device Control
If silent mode was enabled at startup, this disables it.
0x10
.Response Format
# | Data | Content | Remarks |
---|---|---|---|
char | Header | : only | |
0 | uint8 | Destination logical device ID | Only 0xDB |
1 | uint8 | Command number | Only 0xF8 |
2 | uint8 | Data | Only 0x11 |
3 | uint8 | Status | Disabled 1 , Not disabled 0 |
uint8 | Checksum | LRC8 | |
char | Footer | CR (0x0D /'\r' ) | |
char | Footer | LF (0x0A /'\n' ) |
0xFD
: Erase Device Settings
Resets device settings and resets the device.
No parameters or response.
0xFE
: Save Device Settings
Saves applied settings and resets the device.
No parameters or response.
0xFF
: Reset Device
Discards applied settings and resets the device.
No parameters or response.
Parameter List (0xF2
/ 0xF3
)
Parameters for 0xF2
: Apply Device Settings and 0xF3
: Get Device Settings are represented by repeated pairs of identifiers and data (big endian).
Identifier | Data | Content |
---|---|---|
0x00 | uint32 | Application ID |
0x01 | uint32 | Frequency Channel Mask |
0x02 | uint16 | Retry Count and Output |
0x03 | uint8 | Logical Device ID |
0x04 | uint8 | Role |
0x05 | uint8 | Relay Layer |
0x06 | uint8 | Communication Mode |
0x07 | uint32 | Baud Rate |
0x08 | uint8 | Parity |
0x09 | uint8 | Encryption Function |
0x0A | [uint8] | Encryption Key |
0x0C | uint16 | Delimiter Character |
0xFF | uint8 | Error |
0x00
: Application ID
Specifies the application ID.
0x01
: Frequency Channel Mask
Specifies the bit mask of frequency channels.
Set bits for channels to be used. For example, to use channel 11, specify 1<<11
.
0x02
: Retry Count and Output
Specifies the radio transmission output and the number of additional packet transmissions in transparent mode and header-attached transparent mode.
Only the lower 1 byte is used. The upper 4 bits represent the retry count (0
-9
), and the lower 4 bits represent the transmission output (0
-3
). For example, 8 retries / output 3 is 0x0083
.
0x03
: Logical Device ID
Specifies the logical device ID.
0x04
: Role
Effective only for slave devices. Specify one of the following values. Normally, select a delivery method that does not use the network layer.
Delivery Methods Without Network Layer
0
: Normal designation (parent or child device)1
-3
: Relay slave devices (logical device IDs are1
-100
or120
). Numbers1
-3
indicate the maximum relay hop count. This method retransmits up to the maximum relay hops, which may cause duplicate packets depending on relay device placement and count.
Delivery Methods Using Network Layer
11
: Parent device12
: Relay device13
: Child device
80
to the above values. For example, 93
means “network layer enabled and silent mode”.0x05
: Relay Layer
The relay layer number. Relay devices attempt to connect to relay devices or parent devices in upper (smaller value) relay layers. Effective only when Role is set to 12
.
0x06
: Communication Mode
0
: Transparent mode1
: Format mode (ASCII)2
: Format mode (Binary)3
: Chat mode4
: Header-attached transparent mode
0x07
: Baud Rate
Specifies the UART baud rate.
0x08
: Parity
Specifies the sum of settings in the following combination:
- Bit
0
: 8Bit8
: 7Bit
- Parity
0
: None1
: Odd2
: Even
- Stop
0
: STOP 14
: STOP 2
For example, 7-E-1 is specified as 8+2+0=10(0xA)
.
0x09
: Encryption Function
Specifies whether encryption is enabled.
0
: Disabled1
: AES128bit encryption enabled
0x0A
: Encryption Key
Specifies a 16-byte encryption key.
Can store binary sequences that cannot be set in Interactive Mode. This may cause display issues in Interactive Mode.
0x0C
: Delimiter Character
Specifies the delimiter character (0x00
-0xFF
).
Silent Mode
0xDB
command from an external microcontroller connected after startup.Configuration Method
Perform the following settings in Interactive Mode.
- Add
80
tor: Role
. For example, set to80
for normal parent or child devices. - Set
m: UART mode
to format mode (A
/B
).
Operation Check
Check the content of the DB F1 response output immediately after startup.
Disabling Method
Send DB F8 request (ASCII format: :DBF8101D<CR><LF>
).
Notes
- Silent mode cannot be reconfigured.
- Behavior is undefined if a command is sent while silent mode is enabled.
2.2.2 - Serial Communication App Format Mode (Binary)

Overview
When data formatted in a specific manner is input on the transmitting side, the receiving side outputs data formatted in the same manner.
Data represented in hexadecimal is output as raw binary.
Transmitting Side Input | Receiving Side Output | |
---|---|---|
Simple/Extended Format Data | → | Simple/Extended Format Data |
- On TWELITE UART, format mode (ASCII) is enabled by connecting the
SET
pin toGND
at startup. - On TWELITE / TWELITE DIP, format mode (binary) is enabled by connecting the
EX1
pin toGND
at startup.
There are two types of supported formats.
- Simple format: uses Logical Device ID only; Extremely Simple! Compatible with UART transmission function of the standard app
- Extended format: uses Logical Device ID plus options such as Serial ID and retry count
For example, 5 bytes of binary data 0x48 0x45 0x4C 0x4C 0x4F
can be transmitted using the simple format as follows.
Hereafter, the 0x
in binary data representation is omitted.
For example, 0x48 0x45 0x4C 0x4C 0x4F
is represented as 48 45 4C 4C 4F
.
[Transmitting Side]
A5 5A 80 07 00 01 48 45 4C 4C 4F 43 04 <- Input
A5 5A 80 04 DB A1 80 01 FB 04 <- Output
[Receiving Side]
A5 5A 80 07 78 01 48 45 4C 4C 4F 3B 04 <- Output
Basic Format
When sending data expressed in basic or extended format, handle it as raw binary data.
Header | Length | Payload | Checksum | Footer |
---|---|---|---|---|
A5 5A | Payload Length | Repeated 00 -FF | XOR of Payload | EOT |
- All binary
- Header is 2 bytes:
A5 5A
- Payload length is 2 bytes representing the byte count, OR’ed with
0x8000
- Checksum is XOR of payload
- Footer is EOT
0x04
(can be omitted on input) - Big-endian
For example, binary data 00 11 22 33 AA BB CC
is expressed as follows.
A5 5A 80 07 00 11 22 33 AA BB CC DD 04
Although debugging is troublesome, it offers high efficiency for communication between microcontrollers.
Distinguishing Parent and Child Devices
Format mode distinguishes between parent and child devices.
Parent and child devices must match Application ID and Frequency Channel.
Source Identification
Format mode allows identification of the source from received data.
Simple format uses Logical Device ID, and extended format uses Logical Device ID plus extended address.
0x8
added at the front.Simple Format
When using the simple format of format mode, follow the format below.
Transmitting Side Input
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , All Children 0x78 |
1 | uint8 | Command Number | Any value less than 0x80 |
2 | [uint8] | Arbitrary Data | Byte sequence of length \(N\) (recommended \(N\leqq80\)) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , Unset Child 0x78 |
1 | uint8 | Command Number | Value less than 0x80 specified by sender |
2 | [uint8] | Arbitrary Data | Byte sequence of length \(N\) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 4 | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command Number | Only 0xA1 |
2 | uint8 | Response ID | Continuation number in the range 128 -255 (0x80 -0xFF ) |
3 | uint8 | Result | Success 1 , Failure 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Example
Example of sending byte sequence 11 22 33 AA BB CC
from parent to all children.
[Transmitting Side: Parent]
A5 5A 80 08 78 01 11 22 33 AA BB CC A4 04 <- Input
A5 5A 80 04 DB A1 80 01 FB 04 <- Output
The last byte
0xA4
is the checksum: XOR from0x78
to0xCC
.
[Receiving Side: All Children]
A5 5A 80 08 00 01 11 22 33 AA BB CC DC 04 <- Output
The last byte
0xDC
is the checksum: XOR from0x00
to0xCC
.
Extended Format
When using the extended format of format mode, follow the format below.
Transmitting Side Input
When using Logical Device ID as destination
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+\(M\)+3 | |
0 | uint8 | Destination Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , All Children 0x78 |
1 | uint8 | Command Number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | [uint8] | Options | Option list of length \(N\) (Details below) |
3+\(N\) | [uint8] | Arbitrary Data | Byte sequence of length \(M\) (recommended \(M\leqq80\)) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
When using Extended Address as destination
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+\(M\)+7 | |
0 | uint8 | Extended Address Specifier | Only 0x80 |
1 | uint8 | Command Number | Only 0xA0 |
2 | uint8 | Response ID | Any value |
3 | uint32 | Destination Extended Address | Serial ID with 0x8 added at the front |
7 | [uint8] | Options | Option list of length \(N\) (Details below) |
7+\(N\) | [uint8] | Arbitrary Data | Byte sequence of length \(M\) (recommended \(M\leqq80\)) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Details of Option List
In extended format, detailed settings can be specified by providing an option list.
The option list consists of repeated option IDs and arguments. It ends with 0xFF
.
0xFF
.ID | Argument | Default | Description |
---|---|---|---|
0x01 | None | Disabled | Enable MAC ACK |
0x02 | uint8 | 0x00 | Enable Application Retransmission |
0x03 | uint16 | 0x0000 | Minimum Initial Transmission Delay |
0x04 | uint16 | 0x0000 | Maximum Initial Transmission Delay |
0x05 | uint16 | 10 | Application Retransmission Interval |
0x06 | None | Disabled | Allow Parallel Requests |
0x07 | None | Disabled | Disable Response Messages |
0x08 | None | Disabled | Sleep After Transmission |
0x01
: Enable MAC ACK
Enables MAC layer ACK (acknowledgment).
Not suitable for frequent data transmissions but can improve reliability.
0x78
).0x02
: Enable Application Retransmission
When using MAC ACK, specify 0x00
-0x0F
. Retransmits 0-16 times until successful.
When not using MAC ACK, specify 0x81
-0x8F
. Always retransmits 1-16 times.
Response messages are output after all retransmissions are complete.
0x03
: Minimum Initial Transmission Delay
Specifies the minimum delay before the first transmission in milliseconds.
0x04
: Maximum Initial Transmission Delay
Specifies the maximum delay before the first transmission in milliseconds.
0x05
: Application Retransmission Interval
Specifies the interval between application retransmissions in milliseconds.
0x06
: Allow Parallel Requests
Allows parallel requests.
When allowed, the next request can be accepted without blocking until the previous request completes.
For example, if three requests each with 0.5 seconds delay are input consecutively, normally they are processed sequentially at 0.5s, 1.0s, and 1.5s. With parallel requests allowed, they are processed in any order after 0.5s. Note that this cannot be used when packet segmentation is required.
0x07
: Disable Response Messages
Disables response messages output when data is input on the transmitting side.
0x08
: Sleep After Transmission
Immediately puts the device to sleep after transmission.
RX
detects rising edge to wake from sleep. Input any 1 byte of data.
After waking, UART initialization completes and input is accepted.
Receiving Side Output
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(M\)+14 | |
0 | uint8 | Source Logical Device ID | Parent 0x00 , Child 0x01 -0x64 , Unset Child 0x78 |
1 | uint8 | Command Number | Only 0xA0 |
2 | uint8 | Response ID | Value specified by sender |
3 | uint32 | Source Extended Address | Serial ID with 0x8 added at the front |
7 | uint32 | Destination Extended Address | 0xFFFFFFFF when using Logical Device ID |
11 | uint8 | LQI | Radio signal quality at reception |
12 | uint16 | Length of Following Bytes | Byte count \(M\) |
14 | [uint8] | Arbitrary Data | Byte sequence of length \(M\) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Transmitting Side Output (Response Message)
# | Data | Description | Notes |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 4 | |
0 | uint8 | Source Logical Device ID | Only 0xDB : indicates itself |
1 | uint8 | Command Number | Only 0xA1 |
2 | uint8 | Response ID | Value specified on input |
3 | uint8 | Result | Success 1 , Failure 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Examples
Example of sending byte sequence 11 22 33 AA BB CC
from parent to child.
Example specifying Logical Device ID
Example of sending from parent to child with Logical Device ID 0x01
.
- Response ID is
0x01
- No options
[Transmitting Side: Parent]
A5 5A 80 0A 01 A0 01 FF 11 22 33 AA BB CC 82 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0xC1
is checksum: XOR from0x42
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 FF FF FF FF FF 00 06 11 22 33 AA BB CC 2D 04 <- Output
The last byte
0x2D
is checksum: XOR from0x00
to0xCC
.
Example specifying Extended Address
Example of sending from parent to child with Extended Address 0x820163B2
(Serial ID 0x20163B2
).
- Response ID is
0x01
- No options
[Transmitting Side: Parent]
A5 5A 80 0E 80 A0 01 82 01 63 B2 FF 11 22 33 AA BB CC 51 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0x51
is checksum: XOR from0x80
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 82 01 63 B2 FF 00 06 11 22 33 AA BB CC 7F 04 <- Output
The last byte
0x7F
is checksum: XOR from0x00
to0xCC
.
Example using MAC ACK
Example of sending from parent to child with Logical Device ID 0x01
using MAC ACK.
- Response ID is
0x01
- Option
0x01
: Enable MAC ACK specified
[Transmitting Side: Parent]
A5 5A 80 0B 01 A0 01 01 FF 11 22 33 AA BB CC 83 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0x83
is checksum: XOR from0x01
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 00 00 01 01 FF 00 06 11 22 33 AA BB CC 2D 04 <- Output
The last byte
0x2D
is checksum: XOR from0x00
to0xCC
.
Example with Delay
Example of sending from parent to child with Logical Device ID 0x01
with 768ms delay.
- Response ID is
0x01
- Option
0x03
: Minimum Initial Transmission Delay specified
[Transmitting Side: Parent]
A5 5A 80 0D 01 A0 01 03 03 00 FF 11 22 33 AA BB CC 82 04 <- Input
A5 5A 80 04 DB A1 01 01 7A 04 <- Output
The last byte
0x82
is checksum: XOR from0x01
to0xCC
.
[Receiving Side: Child]
A5 5A 80 14 00 A0 01 82 03 68 41 FF FF FF FF FF 00 06 11 22 33 AA BB CC 2D 04 <- Output
The last byte
0x2D
is checksum: XOR from0x00
to0xCC
.
0xDB
Command
Instead of setting interactive mode, you can operate and configure the module by inputting the 0xDB
command from UART.
2.2.2.1 - 0xDB Command in Serial Communication App Format Mode (Binary)
0xDB
command instead of Interactive Mode.Input Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB indicating itself |
1 | uint8 | Command Number | Selected from values below |
2 | [uint8] | Parameter | Byte sequence of length \(N\) indicating setting value (optional) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
Command Number List
Function | |
---|---|
0xF0 | Enable ACK |
0xF1 | Get Device Info |
0xF2 | Apply Device Settings |
0xF3 | Get Device Settings |
0xF8 | Device Control |
0xFD | Erase Device Settings |
0xFE | Save Device Settings |
0xFF | Reset Device |
0xF0
: Enable ACK
Requests ACK response.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 3 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF0 |
2 | uint8 | Data | Only 0x01 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF1
: Get Device Info
Displays information such as address. Also output at startup.
No parameters.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 17 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF1 |
2 | uint32 | Default Application ID | 67720103 |
6 | uint32 | Version Number | For 1.4.7 , 00010407 |
10 | uint8 | Logical Device ID | |
11 | uint32 | Serial ID | |
15 | uint8 | Silent Mode Status | Enabled 1 , Disabled 0 |
16 | uint8 | Network Status | UP 1 , DOWN 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF2
: Apply Device Settings
Applies settings.
Response Format
On Success
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF3 |
2 | [uint8] | Setting Content | Repeated identifier and data of length \(N\) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
On Failure
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 3 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF3 |
2 | uint8 | Error | Only 0xFF |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF3
: Get Device Settings
Retrieves settings.
Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | \(N\)+2 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF3 |
2 | [uint8] | Setting Content | Repeated identifier and data of length \(N\) |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xF8
: Device Control
If silent mode was enabled at startup, this disables it.
0x10
as the parameter.Response Format
# | Data | Content | Remarks |
---|---|---|---|
uint8 | Header | Only 0xA5 | |
uint8 | Header | Only 0x5A | |
uint16 | Data Length | 4 | |
0 | uint8 | Destination Logical Device ID | Only 0xDB |
1 | uint8 | Command Number | Only 0xF8 |
2 | uint8 | Data | Only 0x11 |
3 | uint8 | Status | Disabled 1 , Not Disabled 0 |
uint8 | Checksum | XOR | |
uint8 | Footer | EOT (0x04 ) |
0xFD
: Erase Device Settings
Initializes settings and resets the device.
No parameters or response.
0xFE
: Save Device Settings
Saves applied settings and resets the device.
No parameters or response.
0xFF
: Reset Device
Discards applied settings and resets the device.
No parameters or response.
Parameter List (0xF2
/0xF3
)
Parameters for 0xF2
: Apply Device Settings and 0xF3
: Get Device Settings are represented as repeated identifier and data (big endian) pairs.
Identifier | Data | Content |
---|---|---|
0x00 | uint32 | Application ID |
0x01 | uint32 | Frequency Channel Mask |
0x02 | uint16 | Retry Count and Output |
0x03 | uint8 | Logical Device ID |
0x04 | uint8 | Role |
0x05 | uint8 | Relay Layer |
0x06 | uint8 | Communication Mode |
0x07 | uint32 | Baud Rate |
0x08 | uint8 | Parity |
0x09 | uint8 | Encryption Function |
0x0A | [uint8] | Encryption Key |
0x0C | uint16 | Delimiter Character |
0xFF | uint8 | Error |
0x00
: Application ID
Specifies the application ID.
0x01
: Frequency Channel Mask
Specifies the bit mask of frequency channels.
Set bits for channels to use. For example, to use channel 11, set 1<<11
.
0x02
: Retry Count and Output
Specifies the radio transmission output and the number of additional packets to send in transparent mode and header-attached transparent mode.
Only the lower 1 byte is used. The upper 4 bits indicate retry count (0
-9
), and the lower 4 bits indicate transmission output (0
-3
). For example, 8 retries/output 3 is 0x0083
.
0x03
: Logical Device ID
Specifies the logical device ID.
0x04
: Role
Valid only for child devices. Specify the following values. Usually, select a delivery method without using the network layer.
Delivery Methods Without Using Network Layer
0
: Normal designation (parent or child)1
-3
: Relay child devices (logical device IDs1
-100
or120
). Numbers1
-3
indicate maximum relay hops. This method repeats retries up to the maximum relay hops, which may cause duplicate packets depending on relay device placement and number.
Delivery Methods Using Network Layer
11
: Parent device12
: Relay device13
: Child device
80
to the above values. For example, 93
means “using network layer and silent mode”.0x05
: Relay Layer
The relay layer number. Relay devices attempt to connect to relay devices or parent devices with higher layers (lower values). Effective only when Role is set to 12
.
0x06
: Communication Mode
0
: Transparent mode1
: Format mode (binary)2
: Format mode (binary)3
: Chat mode4
: Header-attached transparent mode
0x07
: Baud Rate
Specifies UART baud rate.
0x08
: Parity
Specifies the sum of settings in the following combination.
- Bit
0
: 8Bit8
: 7Bit
- Parity
0
: None1
: Odd2
: Even
- Stop
0
: STOP 14
: STOP 2
For example, 7-E-1 is 8+2+0=10(0xA)
.
0x09
: Encryption Function
Specifies whether encryption is enabled.
0
: Disabled1
: AES128bit encryption enabled
0x0A
: Encryption Key
Specifies a 16-byte encryption key.
Allows storing binary sequences that cannot be set in Interactive Mode. In this case, the display in Interactive Mode may be disrupted.
0x0C
: Delimiter Character
Specifies the delimiter character string (0x00
-0xFF
).
Silent Mode
0xDB
command from an external microcontroller connected after startup.Setting Method
Perform the following settings in Interactive Mode.
- Add
80
tor: Role
. For example, for normal parent or child, set80
. - Set
m: UART mode
to format mode (A
/B
).
Operation Check
Check the content of the DB F1 response output immediately after startup.
Disable Method
Issue a DB F8 request (binary format: A5 5A 80 03 DB F8 10 33 04
).
Notes
- Silent mode cannot be reset.
- Behavior when sending commands while silent mode is enabled is undefined.
2.2.3 - Serial Communication App Chat Mode
By connecting MONOSTICK to a PC etc., chat can be performed among multiple terminals.
Overview
Enables text chat.
Sending Side Input | Receiving Side Output | |
---|---|---|
Any string | → | Any string + auxiliary information |
Displays prompt and echoes back (outputs input characters). All terminals operate as child devices, performing broadcast communication.
For example, when sending the string Hello
from one terminal to another, it behaves as follows.
[Sending Side]
810A4778:0> Hello <- Input
810A4778:1> <- Output
[Receiving Side]
[810A4778:0] Hello <- Output
82018CA0:0> <- Output
Chat mode displays prompt and echoes back (outputs input characters entered by itself).
All terminals are treated as child devices and broadcast their transmitted content. Communication is possible with all terminals but destination cannot be specified. Binary data cannot be sent. Only strings are supported (0x00-0x1F, 0x7F cannot be sent).
Relay supports up to 3 hops. Relay is disabled by default.
Distinction between Parent and Child Devices
Chat mode does not distinguish between parent and child devices.
If the Application ID and frequency channel are the same, data entered in any terminal is sent to other terminals.

Network configuration image
Identification of Source
The auxiliary information in the received output can identify the sender.
If the Interactive Mode’s h: Header format
is blank, the 7-digit serial ID with a leading 0x8 is used as the extended address. For example, the following output indicates the sender’s serial ID was 0x10A4778
.
[810A4778:0] Hello
If h: Header format
is set to an arbitrary string, it is used as the handle name. Handle name consumes data space in the wireless packet.
Sending Side Input Format
Enter message and newline after prompt.
Data | Content | Remarks |
---|---|---|
[char] | Message | 0x00 -0x1F , 0x7F not allowed |
char | CR (0x0D /'\r' ) | Allowed alone |
char | LF (0x0A /'\n' ) | Allowed alone |
810A4778:0> Hello
Receiving Side Output Format
Outputs received message following auxiliary info.
Auxiliary information includes the module’s extended address or handle name and a sequence number.
Data | Content | Remarks |
---|---|---|
char | Auxiliary info header | [ only |
[char] | Identification info | 8-digit extended address or handle name |
char | Auxiliary info delimiter | : only |
[char] | Sequence number | Starting from 0 |
char | Auxiliary info footer | ] only |
char | Separator | Space only |
[char] | Message | |
char | Footer | CR (0x0D /'\r' ) |
char | Footer | LF (0x0A /'\n' ) |
(err)
or (canceled)
are output.
[810A4778:0] Hello
Other Inputs
Terminals supporting escape sequences can use the following control commands.
Ctrl-L
: Clear screenCtrl-C
: Cancel inputBS
/DEL
: Move cursor back
2.2.4 - Serial Communication App Transparent Mode

External microcontrollers can be easily connected, but to optimize communication using formats, format modes (ASCII / Binary) are suitable.
Overview
Purely wirelesss UART.
Sending side input | Receiving side output | |
---|---|---|
Any data | → | Any data |
Since no format is required, existing UART communication can be easily wirelessized.
However, data delimiters are ambiguous and it is impossible to identify the sender from the receiver output.
The initial state specifies CRLF as the transmission trigger character. Therefore, data input to the transmitter is separated by CRLF, and the data before CRLF is transmitted.
For example, entering Hello<Enter>
on the transmitting terminal results in Hello
being output on the receiving terminal.
[Sending side]
Hello <- Input
[Receiving side]
Hello <- Output
Continuous input strings are split and sent in chunks of 80 bytes. Data up to the trigger character should normally be 80 bytes or less.
All terminals are considered child devices, and the transmitted content is broadcast. Communication with all terminals is possible, but the destination cannot be specified. Both ASCII characters and binary data can be sent.
Relay supports up to 3 hops. By default, relay is disabled.
Distinction between Parent and Child Devices
Transparent mode does not distinguish between parent and child devices.
If application ID and frequency channel are the same, data entered into any terminal is sent to other terminals.

Network configuration image
Identification of Sender
Transparent mode cannot identify the sender.
To identify sender, sender information must be included in data input to the transmitter.
Transmission Trigger
Transmission trigger must be considered, as data is divided and transmitted wirelessly packet by packet.
Therefore, the following transmission triggers must be taken into account:
- When a timeout after data input is reached
- When the input data reaches the minimum data size
- When the transmission trigger character is received
Transmission Trigger Priority
Transmission trigger settings can be specified from the interactive mode k
: Transmission Trigger item.
Example Setting
When setting the transmission trigger character to LF, minimum data size to 8 bytes, and timeout to 30 ms, set as follows:
m: set UART mode (D)
k: set Tx Trigger (sep=0x0a, min_bytes=8 dly=30[ms])
o: set option bits (0x00000100)
2.2.5 - Serial Communication App Header Transparent Mode
Overview
Enabled by default.
When arbitrary data is input to the transmitting terminal, the receiving terminal outputs data with auxiliary information in a specific format.
Transmitting side input | Receiving side output | |
---|---|---|
Any data | → | Any data + auxiliary info |
By default, data input on the transmitting side is separated by CRLF and data before CRLF is sent.
For example, entering Hello<Enter>
on the transmitting side results in output Hello
with auxiliary info on the receiving side. The transmitting side also outputs a message indicating transmission completion.
[Transmitting side]
Hello <- input
;U;00004;219;0x820163B2;000;000;0,1,Hel...;6E; <- output
[Receiving side]
;U;00003;000;0x820163B2;255;000;Hello;42; <- output
The auxiliary information output by the receiving side includes the source address, received signal strength, checksum, etc. The format of the auxiliary information can be customized.
Distinction between Parent and Child Devices
Header Transparent Mode does not distinguish between parent and child devices.
If the Application ID and frequency channel are the same, data input to any terminal is sent to other terminals.

Network configuration image
Identification of Source
The header on the received data includes the logical device ID and serial ID of the sender.
Output Format on Receiving Side
The output format is represented as semicolon (;
) separated fields.
[Example output in default state]
;U;00777;120;0x81025A17;120;013;HELLO;79;
This output can be interpreted as follows.
Data | Description | Value | |
---|---|---|---|
U | char | Fixed value | U |
00777 | uint16 | Timestamp at output | 777 seconds |
120 | uint8 | Source logical device ID | 120 ID-less child device |
0x81025A17 | uint32 | Source extended address | 81025A17 |
120 | uint8 | LQI (link quality indicator) | 120/255 |
013 | uint8 | Source sequence number | 13 |
HELLO | [uint8] | Input data | HELLO |
79 | uint8 | XOR checksum | 0x79 |
The source logical device ID is 219
for its own response message.
The extended address is the 7-bit serial ID printed on the TWELITE device with a leading 0x8
added.
Customization by Header Format
The output format on the receiving side follows the header format.
Changing the header format customizes the content of the auxiliary information output and the checksum calculation range.
;U;%t;%i;0x%A;%q;%s;<*;%X;\n
.The header format can be changed via the interactive mode command h: set header format
.
Simplest Format
The simplest header format is *\n
. It outputs the received data with CRLF line endings.
h: set header format [*\n]
When sending HELLO
in this case, it behaves as follows.
[Receiving side]
HELLO<CR><LF> or HELLO<LF>
[Transmitting side]
HELLO<CR><LF>
Special Characters in Header Format
You can customize the output by including the following special characters in the header format.
General
Description | |
---|---|
* | Received data |
&hl | Arbitrary ASCII character (e.g., &20 is space) |
< | Start position for checksum calculation (default is start of string) |
> | End position for checksum calculation (only from v1.4.6) |
Characters following \
(backslash)
Description | |
---|---|
\n | CRLF (0x0D 0x0A ) |
\t | TAB |
\* | * |
\% | % |
\< | < |
\> | > |
\& | & |
Characters following %
Description | Length | Data format | |
---|---|---|---|
%A | Source address (32bit) | 8 chars | Hexadecimal |
%a | Source address (32bit) | 10 chars | Hexadecimal |
%I | Source logical address (8bit) | 2 chars | Hexadecimal |
%i | Source logical address (8bit) | 3 chars | Decimal |
%T | Current system time (seconds) | 4 chars | Hexadecimal |
%t | Current system time (seconds) | 5 chars | Decimal |
%S | Source sequence number (hex) | 2 chars | Hexadecimal |
%s | Source sequence number (hex) | 3 chars | Hexadecimal |
%Q | Received signal strength | 2 chars | Hexadecimal |
%q | Received signal strength | 3 chars | Decimal |
%X | Checksum | 2 chars | Hexadecimal |
%x | Checksum | 3 chars | Decimal |
Checksum Calculation
The checksum is calculated by XOR (exclusive OR) from the start of the data or from the position indicated by <
in the header format up to just before %X
or %x
.
Example in Default State
The default header format is ;U;%t;%i;0x%A;%q;%s;<*;%X;\n
, where the checksum calculation range is *;
.
That is, when sending HELLO
, the binary data HELLO;
is targeted, resulting in checksum 0x79
.
[Verification code in Python]
from functools import reduce
def main():
data = "HELLO;"
checksum = reduce(lambda x, y: x ^ y, data.encode("ascii"))
print(f"{data} -> {hex(checksum)}")
if __name__ == "__main__":
main() # HELLO; -> 0x79
Other Examples
For example, consider the header format ;%I;*;%X
.
Since <
is not specified, the checksum calculation range is ;%I;*;
.
That is, when sending HELLO
, the binary data ;000;HELLO;
is targeted, resulting in checksum 0x49
.
[Verification code in Python]
from functools import reduce
def main():
data = ";000;HELLO;"
checksum = reduce(lambda x, y: x ^ y, data.encode("ascii"))
print(f"{data} -> {hex(checksum)}")
if __name__ == "__main__":
main() # ;000;HELLO; -> 0x49
Transmission Trigger
There is no format on the transmitting side input, but data is split and transmitted packet by packet.
Therefore, the following transmission triggers must be considered.
- When timeout after data input occurs
- When input data reaches the minimum data size
- When a transmission trigger character is received
Priority of Transmission Triggers
Transmission trigger settings are specified via the interactive mode k
: set transmission trigger item.
Example Setting
To set the transmission trigger character to LF, minimum data size to 8 bytes, and timeout to 30 ms, use the following settings.
m: set UART mode (E)
k: set Tx Trigger (sep=0x0a, min_bytes=8 dly=30[ms])
o: set option bits (0x00000100)
2.3 - Custom Default Feature of Serial Communication App
For example, if you create firmware that changes the baud rate from 115200bps to 9600bps, you can use it at 9600bps from the start.
Configuration Procedure
1. Apply Settings
Change the settings in Interactive Mode and press S
to save.
2. Download Settings
Prepare software that can download data using the xmodem protocol.
While still in Interactive Mode (before selecting items), request xmodem download.
In TeraTerm, perform the following operations:
- Select
File > Transfer > XMODEM > Receive...
- Choose
Option > Checksum, Binary
- Specify file name (e.g.,
conf.bin
) - Press
Open
You can use lrzsz
on macOS or Linux.
lrx --binary --xmodem /path/to/conf.bin
Usually, enter Interactive Mode with
screen
, then pressCtrl+A
and execute:exec !! lrx -b -X /path/to/conf.bin
If the download succeeds, a 128-byte file is generated (may be smaller depending on xmodem implementation).
3. Creating Custom Binary
Concatenate the downloaded file to the end of the firmware binary file to create a custom binary.
Use command line tools or general file concatenation tools for concatenation.
Example
Example assuming downloaded xmodem file is conf.bin
, original binary file is App_Uart_BLUE_L1305_V1-4-X.bin
, and custom binary to create is App_Uart_custom_V1-4-X.bin
.
【Windows】
copy App_Uart_BLUE_L1305_V1-4-X.bin App_Uart_custom_V1-4-X.bin
type conf.bin >> App_Uart_custom_V1-4-X.bin
【macOS / Linux】
cat App_Uart_BLUE_L1305_V1-4-X.bin conf.bin > App_Uart_custom_V1-4-X.bin
4. Writing Custom Binary
Write the concatenated custom binary to TWELITE.
When entering Interactive Mode after writing custom binary, C-
is displayed at the end of the first line.
--- CONFIG/TWE UART APP V1-04-2/SID=0x81001f1c/LID=0x78 C- ---
When overwriting settings from Interactive Mode and saving to custom binary, CE
is displayed instead of C-
.
--- CONFIG/TWE UART APP V1-04-2/SID=0x81001f1c/LID=0x78 CE ---
2.4 - Notes on Communication in Serial Communication App
UART Data Input and Output
4KB buffers are allocated for UART input and output. When outputting two UART lines, 2KB is used for input and output buffers for each line.
In format mode and chat mode, it is rarely necessary to be aware of buffer sizes, but in header transparent mode and transparent mode when continuously inputting streams, or even in format mode when inputting many streams at once, it is necessary to be aware of the buffer size limits. On the output side, if a slow baud rate is set, the output of data received wirelessly may not keep up.
Data beyond the buffer limits is not protected at the boundary, causing data loss. Especially on the input side, consider referring to the flow control pins described below.
UART Flow Control
Input flow control is implemented to behave like the RTS pin. The pin used is PWM1
(DIO5
), targeting the main UART port. When input is not accepted, the state is High; when input is accepted, the state is Low. Output flow control is not supported. Receiving devices should ensure sufficient baud rate and processing speed.
- After power-on or reset, the pin is High. It becomes Low once UART is initialized.
- When the UART input buffer exceeds 7/8 full, the pin goes High; it goes Low when below that threshold.
- In transparent mode, the pin is High during packet transmission.
Countermeasures for Wireless Communication Errors
If data loss occurs on the receiving side, increase the number of wireless retransmissions.
Increasing the number of additional packets sent can improve the success rate of reception.
The number of retransmissions can be set in Interactive Mode (x: set RF Conf
).
2.5 - Interactive Mode (Serial Communication App)
This section explains functions specific to the Serial Communication App (App_Uart). For common features, see the TWELITE APPS Manual top page.
Interactive Mode cannot be used while TWELITE is sleeping.
Make sure that the M3
pin is not connected to GND
.
Example Display
The following screen will be displayed.
--- CONFIG/TWE UART APP V1-04-5/SID=0x82018ca0/LID=0x78 -- ---
a: set Application ID (0x67720103)
i: set Device ID (120=0x78)
c: set Channels (18)
x: set RF Conf (3)
r: set Role (0x0)
l: set Layer (0x1)
b: set UART baud (38400)
B: set UART option (8N1)
m: set UART mode (E)
k: set Tx Trigger (sep=0x0d0a, min_bytes=0 dly=0[ms])
h: set header format [;U;%t;%i;0x%A;%q;%s;<*>;%X;\n]
C: set crypt mode (0)
o: set option bits (0x00000100)
---
S: save Configuration
R: reset to Defaults
Commands
Setting Item | Default | Remarks | |
---|---|---|---|
a | Application ID | 0x67720103 | 32bit |
i | Logical Device ID | 120 | Parent device 0 /121 , child device 1 -100 , ID-less child device 120 |
c | Frequency Channel | 18 | 11 -26 |
x | Retry count and transmission output | 3 | |
Retry count | 0 | 1 -9 times, 0 disables | |
Transmission output | 3 | 0 -3 | |
r | Role | 0 | Normal 0 , relay child 1 -3 , others |
l | Relay Layer | 0x01 | |
b | UART alternative baud rate | 38400 | Enabled with BPS pin |
B | UART option | 8N1 | |
m | Communication mode | E | A /B /C /D /E |
k | Transmission trigger | 0x0d0a,0,0 | Trigger character, minimum size, timeout |
h | Header / Handle name | Reference | |
Header | For header transparent mode | ||
Handle name | For chat mode | ||
C | Encryption | 0 | Disabled 0 , AES128bit 1 |
o | Option bits | 0x00000000 | Other detailed settings |
Details of each command are as follows.
a
: Application ID
All devices communicating must use the same value. This logically separates networks.
i
: Logical Device ID
Set this to distinguish multiple child devices.
If no distinction is necessary or possible, set to 120
. If distinction is necessary, child devices should use any value from 1
to 100
, and parent devices should be 0
or 121
.
c
: Frequency Channel
All devices communicating must use the same value. This physically separates networks.
x
: Transmission output and retry count
Specify the RF transmission output power and the number of additional packet transmissions in transparent mode and header transparent mode.
r
: Role
Valid only for child devices. Specify the following values. Normally select the delivery method that does not use the network layer.
Delivery method not using network layer
0
: Normal designation (parent or child)1
-3
: Relay child (logical device ID is1
-100
or120
). The number1
-3
indicates the maximum number of relay hops. Since retransmission is repeated up to the maximum relay hops, duplicate packets may be relayed depending on the placement and number of relay devices.
Delivery methods using network layer
Supported only in format mode.
11
: Parent12
: Relay13
: Child
80
to the above values. For example, 93
means “network layer use with silent mode”.l
: Relay Layer
The relay layer number. Relay devices attempt to connect to relay devices or parents in upper relay layers (smaller values). Effective only when Role is set to 12
.
m
: Communication mode
A
: Format mode (ASCII)B
: Format mode (Binary)C
: Chat modeD
: Transparent modeE
: Header transparent mode
b
: UART alternative baud rate
Overrides the alternative baud rate selected when the BPS
pin is connected to GND
at startup.
Selectable values are 9600
/19200
/38400
/57600
/115200
/230400
. Other values may cause inaccuracies.
If the BPS
pin is left open at startup, this setting is not applied. The baud rate is fixed at 115200
.
To forcibly apply the alternative baud rate setting ignoring the BPS
pin state, enable the option bit Force apply alternative baud rate.
B
: UART option
Specify three characters in the order Bit-Parity-Stop.
- Bit
8
: 8 Bit7
: 7 Bit
- Parity
N
: NoneO
: OddE
: Even
- Stop
1
: STOP 12
: STOP 2
k
: Transmission trigger
Set the transmission trigger applied to input in transparent mode and header transparent mode.
Enter separated by commas ,
in the following order:
Transmission trigger character
Packets are sent when this character is input (except when the minimum data size is not met).
In Interactive Mode, specify the ASCII code in hexadecimal. The leading 0x
is ignored. Default is CRLF.
The transmitted data includes the transmission trigger character. To enable the transmission trigger character, specify option bit 0x00000100
(enabled by default).
Minimum data size
Specify the minimum size of continuous data to be handled. Even if the trigger character is included before reaching the minimum data size, it is invalid.
In Interactive Mode, specify a number between 1
and 80
as byte count. 0
disables. Default is disabled.
Timeout
The wait time until the packet is sent after the last input.
In Interactive Mode, specify a number between 10
and 200
milliseconds. 0
disables. Default is disabled.
When all settings are enabled, the priority order is as follows:
- Timeout
- Minimum data size
- Transmission trigger character
Timeout always takes precedence if set. Even if the trigger character is set, packets are not sent until the minimum data size is reached.
h
: Header / Handle name
For header transparent mode, specify the header format; for chat mode, specify the handle name.
Header (header transparent mode)
Specify the header format syntax.
Handle name (chat mode)
Specify the handle name displayed on the counterpart device.
Maximum 23 characters. Consumes the data area (80 bytes) for transmission.
C
: Encryption
Specify whether to enable encryption.
Specify 1
to enable AES128bit encryption.
o
: Option bits
Specify a 32-bit value. Various settings linked to each bit can be enabled.
Target bit | Setting item | Default | A | B | C | D | E |
---|---|---|---|---|---|---|---|
0x00000001 | Disable internal pull-up of M3 | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00000002 | Unused | 0️⃣ | |||||
0x00000100 | Enable transmission trigger | 1️⃣ | ✅ | ✅ | |||
0x00000200 | Prioritize new input series | 0️⃣ | ✅ | ✅ | ✅ | ✅ | |
0x00001000 | Disable response message | 0️⃣ | ✅ | ✅ | ✅ | ||
0x00004000 | Loosen duplicate checker | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00010000 | Force apply alternative baud rate | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00020000 | Simultaneous output to secondary port | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00040000 | Switch main port | 0️⃣ | ✅ | ✅ | ✅ | ✅ | ✅ |
0x00100000 | Limit relay layer | 0️⃣ | ❗ | ❗ |
Details of Option Bits
Explanation of settings linked to each bit of the option bit value.
00000001
: Disable internal pull-up of M3
Disables the internal pull-up of the M3
pin used for sleep setting on TWELITE DIP.
00000100
: Enable transmission trigger
Enables the transmission trigger setting in transparent mode or header transparent mode.
00000200
: Prioritize new input series
In format modes (ASCII/Binary), transparent mode, and header transparent mode, prioritize new input series if multiple series are input before transmission completes.
00001000
: Disable response message
In format modes (ASCII/Binary) and header transparent mode, disables response messages after transmission completes.
00004000
: Loosen duplicate checker
Loosens the duplicate checker conditions on the receiving side.
The duplicate checker eliminates packets duplicated by relaying.
If sending intervals are short (e.g., less than 100ms), different packets may be mistakenly considered identical (including those with different sequence numbers).
Enable this setting when setting short sending intervals or using many transmitters simultaneously.
00010000
: Force apply alternative baud rate
Applies the alternative baud rate setting even if the BPS
pin input is not Low at startup.
00020000
: Simultaneous output to secondary port
Outputs the serial output TX
also to the serial secondary output TX_SUB
.
00040000
: Switch main port
Swaps the serial input/output TX
/RX
with the serial secondary input/output TX_SUB
/RX_SUB
.
00100000
: Limit relay layer
In format modes (ASCII/Binary), when specifying delivery methods using network layer, always send to relay devices or parent devices one layer above. Normally, delivery methods using network layer send to the relay or parent device with the best radio quality in the upper layer.
About Relay Function
When communication distance is insufficient or there are obstacles preventing communication, using relay devices is useful.
Devices with relay function retransmit packets they receive to other devices.
Relay Function Settings
Normally, change the Role value to 1
-3
while in Interactive Mode. The default value is 0
, which does not have relay function.
r: set Role (0x0)
The number 1
-3
indicates the maximum number of relay hops. For example, specifying 3
allows up to 3 relay hops.
Distinction between parent and child devices applies only to child devices.
Setting Example
The following network configuration shows devices with red color set to Role 0
and devices with blue color set to Role 3
.

Example of relay by role setting
Adding red devices allows communication with up to 3 relay hops between red devices.

Example of adding transmitters and receivers