1.1.1.4.3 - Output from Aria App (Parent and Repeater App)
Output format when data is received from the Aria app
TWELITE ARIA Mode
Previously, instructions on how to interpret data using Python were provided here, but now the official library is distributed.
Please use MWings for Python.
1.1.1.4.4 - Details of Output from Pal, Cue, and Aria Apps (Parent and Repeater App)
Details of the common output format for Pal, Cue, and Aria apps
Data received from child devices of Pal, Cue, and Aria apps are output according to a common format. This section details that format. For specific output examples of each app, see the app pages.
Byte sequence of length \(N\) (recommended \(N\leqq80\))
uint8
Checksum
LRC8
char
Footer
CR (0x0D/'\r')
char
Footer
LF (0x0A/'\n')
1.1.2.3 - Input to the PAL App (Notification PAL) (Parent and Repeater App)
Commands to control the LED of the Notification PAL
You can control the LED of the Notification PAL.
:0190010004000169[CR][LF]
^1^2^3^^^^^^^4^5
No.
Bytes
Meaning
Example Data
Notes
1
1
Destination Logical Device ID
01
Specify the logical device ID of the destination TWELITE PAL. Valid values range from 0x01 to 0x64.
2
1
Command Type
90
3
1
Number of Command Parameters
01
Specify the number of command parameters. For example, set to 1 if specifying one command parameter, or 2 if specifying two.
4
Number of Commands x 4
Command Parameters
00040001
Specify parameters such as events and LED colors. See the command parameters section for details.
5
1
Checksum
69
Calculate the sum of bytes 1 to 4 within 8 bits and take the two’s complement. In other words, the sum of all data bytes plus the checksum byte equals zero within 8 bits. The checksum byte is represented by two ASCII characters. For example, in 00A01301FF123456, the sum 0x00 + 0xA0 + … + 0x56 = 0x4F, and its two’s complement is 0xB1 (i.e., 0x4F + 0xB1 = 0). The checksum can be omitted by using ‘X’ as the checksum.
6
2
Footer
[CR][LF]
Specify [CR] (0x0D) [LF] (0x0A). However, if the checksum is omitted with ‘X’, the footer can also be omitted.
Command Parameters
Combine 4-byte command parameters to specify commands.
0x00: Send Event ID
The TWELITE PAL has predefined behaviors for each received event ID. This parameter sends an event ID to the destination TWELITE PAL to trigger the configured behavior.
To change the behavior for each event, please modify the TWELITE PAL settings.
No.
Bytes
Content
Notes
1
1
Command Parameter ID
0x00
2
1
Destination PAL ID
Specify the destination PAL ID. 0x04: Notification PAL 0xFF: All TWELITE PALs
3
1
Unused
Fixed at 0x00
4
1
Event ID
Specify event ID from 0 to 16
0x01: Send LED Color, Blinking Pattern, and Brightness
Send the LED color, blinking pattern, and brightness to the destination Notification PAL.
No.
Bytes
Content
Notes
1
1
Command Parameter ID
0x01
2
1
Color
0: Red 1: Green 2: Blue 3: Yellow 4: Purple 5: Cyan 6: White 7: Warm White
3
1
Blinking Pattern
0: Always on 1-3: Blinking patterns (higher value means faster blinking)
4
1
Brightness
0: Off 0x01–0x0F: Brightness (higher value means brighter)
0x02: Send Lighting Duration
Send the lighting duration of the Notification PAL’s LED.
This command parameter does not include LED color, blinking pattern, or brightness, so use it in combination with command parameters 0x01 or 0x03.
When using this command parameter, be sure to set the transmission interval longer than the lighting duration.
No.
Bytes
Content
Notes
1
1
Command Parameter ID
0x02
2
1
Unused
Fixed at 0xFF
3
1
Unused
Fixed at 0x00
4
1
Lighting Duration
Specified in seconds (0 means always on)
0x03: Specify LED Color in RGBW
Send the LED lighting color of the Notification PAL in RGBW.
Cannot be used simultaneously with command parameters 0x00 and 0x01.
No.
Bytes
Content
Notes
1
1
Command Parameter ID
0x03
2
1
Unused
Fixed at 0xFF
3
2
LED Lighting Color
Specify 4 bits each for RGBW in order from LSB.
Higher value means brighter.
0x04: Specify Blinking Parameters
Send the blinking cycle and duty of the Notification PAL’s LED.
This command parameter does not include LED color, so use it in combination with command parameter 0x03.
Cannot be used simultaneously with command parameters 0x00 and 0x01.
No.
Bytes
Content
Notes
1
1
Command Parameter ID
0x04
2
1
Unused
Fixed at 0xFF
3
1
Blinking Time Ratio
Specify from 0x00 to 0xFF.
Higher value means longer ON time per cycle.
0x7F means ON for half of the cycle.
4
1
Blinking Cycle
Specify from 0x00 to 0xFF.
Each increment increases the blinking cycle by about 0.04s.
0x17 corresponds to a 1-second cycle.
Command Examples
Example 1: Send Event
Command example to send event 1 to the NOTICE PAL with logical device ID 1.
:0190010004000169
^1^2^3^4^5^6^7^8
No.
Bytes
Meaning
Example Data
Explanation of Example Data
Notes
1
1
Destination Logical Device ID
01
Logical device ID of the destination is 0x01
2
1
Command Type
90
0x90 command
Fixed at 90
3
1
Number of Commands
01
One command
4
1
Command ID
00
Command 00
5
1
Destination PAL ID
04
Sent to Notification PAL
6
1
Unused
00
7
1
Event ID
01
Event 1
0x00 to 0x10
8
1
Checksum
69
Example 2: Send LED Lighting Color to Notification PAL
Command to send LED lighting color with brightness 8 and slow blinking white to the NOTICE PAL with logical device ID 1.
:019001010601085E
^1^2^3^4^5^6^7^8
No.
Bytes
Meaning
Example Data
Explanation of Example Data
Notes
1
1
Destination Logical Device ID
01
Logical device ID of the destination is 0x01
2
1
Command Type
90
0x90 command
Fixed at 90
3
1
Number of Commands
01
One command
4
1
Command Parameter ID
01
Command parameter ID 0x01
5
1
Color
06
White
6
1
Blinking Pattern
01
Blinking
7
1
Brightness
08
Brightness 8
Range 0x00 to 0x0F
8
1
Checksum
5E
Example 3: Send LED Lighting Color and Lighting Duration to Notification PAL
Command to light up purple and turn off after 1 second for the NOTICE PAL with logical device ID 1.
When testing this command, be sure to set the transmission interval longer than the lighting duration.
In repeater mode, retransmitting received packets can extend the communication range between Child and Parent.
When relaying, the order of packets received by the Parent may be rearranged.
If there are Children sending continuously at short intervals such as about 100ms, the relay may not keep up. Please thoroughly verify in a production environment before use.
Example Settings
To use as a repeater, set the Operating Mode in interactive mode to 1 or higher.
Relay Methods
TWELITE NET provides two major relay methods for wireless packet delivery, as shown in the table below, which differ depending on the application. This app can identify and relay packets of the applications shown in the table below.
Relay Method
Supported Applications
Simple Net
Extremely Simple! Standard App, Remote Control App, Serial Communication App, ACT
Relay Net
Wireless Tag App, PAL App, CUE App
Relay Using Simple Net
When relaying applications using Simple Net, setting the operating mode to 1 or higher allows up to three relays.
For example, in case 1., if there are up to 3 Repeaters between the Parent and Child, data will reach the Parent, but in case 2., if there are 4 or more Repeaters, data will not reach the Parent.
1. Child ---> Repeater ---> Repeater ---> Repeater ---> Parent
→ Parent can receive Child's data relayed 3 times.
2. Child ---> Repeater ---> Repeater ---> Repeater ---> Repeater -x-> Parent
→ Stops relaying at the 4th relay.
Relaying with Simple Net basically uses broadcast communication and relays all received packets. The advantage is that communication to form and maintain the relay network is not necessary, but the disadvantage is that communication volume can explode as the number of Repeaters increases.
For relaying data of applications using Relay Net with one stage of relay, set the operating mode value to 1.
When performing multiple relays, increase the operating mode setting value as the distance from the Parent increases. (It is acceptable if the setting values are in ascending order even if some values are skipped.)
The maximum number of relays for this method is up to 63 times.
Example 1: One relay\
Child ---> Repeater (Operating Mode: 1) ---> Parent
Example 2: Two relays\
Child ---> Repeater (Operating Mode: 2) ---> Repeater (Operating Mode: **1**) ---> Parent
Example 3: Three relays\
Child ---> Repeater (Operating Mode: 6) ---> Repeater (Operating Mode: 3) ---> Repeater (Operating Mode: 1) ---> Parent
Relay Net is a tree-type network designed to efficiently deliver upstream packets. Repeaters search for an upper layer (Parent or Repeater with a smaller operating mode setting) and relay to one discovered upper layer device.
Therefore, even if the number of Repeaters increases, the communication volume is less likely to become large compared to Simple Net, but communication occurs to discover and maintain the connection destination.
When Performing Static Routing (Directly Specifying Relay Destination)
When relaying with Relay Net, considering the layout as shown in the figure below, Repeater 2 automatically selects either the Parent or Repeater 1 as the connection destination.
Basically, fewer relays tend to have a higher delivery rate to the Parent, but if the Parent is selected as the connection destination for Repeater 2, communication quality may deteriorate due to obstacles between Parent and Repeater 2, resulting in a lower delivery rate to the Parent than when relaying through Repeater 1.
Therefore, this app has a function (static routing function) to specify the connection destination of Repeaters by TWELITE serial number.
When performing static routing, set the route from Repeater 2 to Repeater 1 statically, or set all routes statically.
Setting all routes increases the amount of configuration and does not support redundancy for situations such as Repeater failure or changes in radio conditions, but it eliminates the time to determine the upper communication destination and allows prompt relay operation.
To perform static routing, set the connection destination as shown in the table below: Repeater 1’s connection destination is the Parent’s SID, and Repeater 2’s connection destination is Repeater 1’s SID.
Connection Destination (A: Access Point Address) Setting Example
Operating Mode (l:Mode) Setting Example
Parent
810F155E
-
0
Repeater 1
810E18E8
810F155E (Parent’s SID)※
1
Repeater 2
810F17FF
810E18E8 (Repeater 1’s SID)
2
※ If you only want to deal with effects caused by walls as shown in the figure, this setting is unnecessary.
2 - Interactive Mode (Parent and Repeater App)
Detailed setting changes using Interactive Mode
You can perform detailed app settings in Interactive Mode.
This section explains features specific to the Parent and Repeater App (App_Wings). For common features, please refer to the TWELITE APPS Manual Top Page.
Display Example
The screen shown below will be displayed.
[CONFIG MENU/App_Wings:0/v1-02-1/SID=820163B2]
a: (0x67720102) Application ID [HEX:32bit]
c: (18 ) Channels Set
x: ( 0x03) RF Power/Retry [HEX:8bit]
b: (38400,8N1 ) UART Baud [9600-230400]
o: (0x00000000) Option Bits [HEX:32bit]
k: (0xA5A5A5A5) Encryption Key [HEX:32bit]
m: ( 0) Mode (Parent or Router)
A: (0x00000000) Access point address [HEX:32bit]
[ESC]:Back [!]:Reset System [M]:Extr Menu
The value specifies baud rate and parity settings separated by a comma.
The baud rate can be selected from 9600/19200/38400/57600/115200/230400. Specifying other values may cause errors.
Parity can be set as N: None, O: Odd, E: Even. Hardware flow control cannot be set. Settings like 8N1, 7E2 can be specified, but settings other than 8N1 are unverified. Please confirm operation in advance.
Specify the serial ID (0x8???????) of the upper-level device connected when performing static routing in Repeater mode. When set to 0x00000000, automatic search is performed.
Details of Option Bits
Explanation of settings linked to each bit of the option bit value.