/      日本語

Communication Modes of Serial Communication App

Explanation of each communication mode
The Serial Communication App (App_Uart) has five communication modes.

List of Communication Modes

Each mode is switched by Interactive Mode (some modes can be set via pin input).

IDMode
AFormat Mode (ASCII)
BFormat Mode (Binary)
CChat Mode
DTransparent Mode
EHeader Transparent Mode

Initial state is Header Transparent Mode.

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 SideOutput on Receiving Side
Simple/Extended format dataSimple/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 SideOutput on Receiving Side
Simple/Extended format dataSimple/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 SideOutput on Receiving Side
Any stringAuxiliary 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 SideOutput on Receiving Side
Any dataAny 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 SideOutput on Receiving Side
Any dataAny 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.


Serial Communication App Format Mode (ASCII)

Mode that adds headers to both transmitted and received outputs (ASCII format)

Serial Communication App Format Mode (Binary)

Mode that adds headers to both transmitted and received outputs (binary format)

Serial Communication App Chat Mode

Mode that displays prompts and performs echo back

Serial Communication App Transparent Mode

Mode that purely wirelesss UART

Serial Communication App Header Transparent Mode

Mode that adds headers only to the received output