/      日本語

Interactive Mode (Serial Communication App)

Configuration changes via Interactive Mode
You can perform detailed configuration of the app via Interactive Mode.

This section explains functions specific to the Serial Communication App (App_Uart). For common features, see the TWELITE APPS Manual top page.

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 ItemDefaultRemarks
aApplication ID0x6772010332bit
iLogical Device ID120Parent device 0/121, child device 1-100, ID-less child device 120
cFrequency Channel1811-26
xRetry count and transmission output3
Retry count01-9 times, 0 disables
Transmission output30-3
rRole0Normal 0, relay child 1-3, others
lRelay Layer0x01
bUART alternative baud rate38400Enabled with BPS pin
BUART option8N1
mCommunication modeEA/B/C/D/E
kTransmission trigger0x0d0a,0,0Trigger character, minimum size, timeout
hHeader / Handle nameReference
HeaderFor header transparent mode
Handle nameFor chat mode
CEncryption0Disabled 0, AES128bit 1
oOption bits0x00000000Other 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 is 1-100 or 120). The number 1-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: Parent
  • 12: Relay
  • 13: Child

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 mode
  • D: Transparent mode
  • E: 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.

B: UART option

Specify three characters in the order Bit-Parity-Stop.

  • Bit
    • 8: 8 Bit
    • 7: 7 Bit
  • Parity
    • N: None
    • O: Odd
    • E: Even
  • Stop
    • 1: STOP 1
    • 2: 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:

  1. Transmission trigger character
  2. Minimum data size
  3. Timeout

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.

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 bitSetting itemDefaultABCDE
0x00000001Disable internal pull-up of M30️⃣
0x00000002Unused0️⃣
0x00000100Enable transmission trigger1️⃣
0x00000200Prioritize new input series0️⃣
0x00001000Disable response message0️⃣
0x00004000Loosen duplicate checker0️⃣
0x00010000Force apply alternative baud rate0️⃣
0x00020000Simultaneous output to secondary port0️⃣
0x00040000Switch main port0️⃣
0x00100000Limit relay layer0️⃣

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.

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

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

Example of adding transmitters and receivers