1 - Interactive Mode (Pal App)
Interactive mode for the Pal app
You can perform detailed configuration of the app in interactive mode.
This section explains features specific to the Pal app (App_PAL). For common features, please refer to the TWELITE APPS Manual main page.
Interactive mode cannot be used while TWELITE is sleeping.
Please start up with the SET
pin connected to GND
. TWELITE STAGE apps and TWELITE R2/R3 automatically perform this operation.
Example Display
The screen will display as follows.
--- CONFIG/App_PAL V1-05-2/SID=0x810e0e23/LID=0x01 ---
a: set Application ID (0x67726305)
i: set Device ID (--)
c: set Channels (15)
x: set Tx Power (13)
b: set UART baud (38400)
B: set UART option (8N1)
k: set Enc Key (0xA5A5A5A5)
o: set Option Bits (0x00000001)
t: set Transmission Interval (60)
p: set Sensor Parameter (0x00000000)
e: set Event Parameter(s) (0180002A0208002A0300802A0488002A0580802A0608802A0880000A1008000A)
d: set Temperature Coefficient (0)
D: set Temperature Offset (0)
f: set Humidity Coefficient (0)
F: set Humidity Offset (0)
---
S: save Configuration
R: reset to Defaults
Commands
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 when it is necessary to distinguish multiple child devices.
If there is no need or it is not possible to distinguish, set to 120
. If distinction is needed, children should use any value from 1
to 100
, and the parent should use 0
or 121
.
c
: Frequency Channel
All devices communicating must use the same value. This physically separates networks.
x
: Tx Power and Retry Count
Specify the radio transmission power and the number of additional packet transmissions in transparent mode and headered 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
. Specifying other values may cause errors.
If the BPS
pin is left open at startup, this setting does not apply. It is fixed at 115200
bps.
B
: UART Option
Overrides the alternative UART settings selected when the BPS
pin is connected to GND
at startup.
Parity can be set to N
: None, O
: Odd, or E
: Even. Hardware flow control cannot be set. Settings like 8N1 or 7E2 can be used, but settings other than 8N1 are unverified. Please confirm operation in advance.
If the BPS
pin is left open at startup, this setting does not apply. It is fixed at 115200
bps.
k
: Encryption Key
Specify the 32-bit hexadecimal encryption key used when enabling encrypted communication in option bits.
o
: Option Bits
Specify a 32-bit value. Various settings linked to each bit can be enabled.
t
: Transmission Interval
Specifies the data transmission interval. For notification pals, it indicates the interval for querying control information from the parent and reflecting it on LED output.
p
: Sensor-specific Parameter
Depends on the hardware.
e
: Notification Event
Notification PalSpecifies the behavior when an event number is received.
For details, see Notification Event Details.
d
: Temperature Coefficient
Environmental Sensor PalSpecify the temperature data coefficient (d) in the range 0
-60000
.
0
disables it. Otherwise, the final temperature is multiplied by (\frac{d}{1024}).
D
: Temperature Offset
Environmental Sensor PalSpecify the temperature data offset (D) in the range -2000
to 2000
.
(D) is added to the temperature multiplied by 100. The final temperature changes by (\frac{D}{100}) °C.
f
: Humidity Coefficient
Environmental Sensor PalSpecify the humidity data coefficient (f) in the range 0
-60000
.
0
disables it. Otherwise, the final humidity is multiplied by (\frac{f}{1024}).
F
: Humidity Offset
Environmental Sensor PalSpecify the humidity data offset (F) in the range -2000
to 2000
.
(F) is added to the humidity multiplied by 100. The final humidity changes by (\frac{F}{100}) %.
Details of Option Bits
Explanation of settings linked to each bit of the option bits value.
00000001
: Enable Transmission to Repeater
Enables transmission not only to the parent but also to repeaters.
You can use repeaters even without setting this option, but the parent will remove duplicated packets. In this case, there is no way to determine which repeater the packet passed through or if it was not relayed.
If this option is set, the parent can output packets received from multiple devices separately. Devices connected to the parent can analyze the output to determine which device the child was near.
00001000
: Enable Encrypted Communication
Enables encrypted communication. The other party must also enable encrypted communication.
00010000
: Enable UART Output on Child
Enables message output on the child device.
Details of Sensor-specific Parameters
Explanation of settings linked to the sensor-specific parameter value.
Open/Close Sensor Pal
Not used.
Environmental Sensor Pal
Not used.
Motion Sensor Pal
Specify a 32-bit value.
bit | 31-28 | 27-24 | 23-20 | 19-16 | 15-12 | 11-8 | 7-4 | 3-0 |
---|
Function | - | - | - | - | ATH | SFQ | SCT:7-4 | SCT:3-0 |
Default | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Each function represents the following:
SCT
: Sample Count
SCT
affects the number of samples transmitted.
Intermittent Transmission Mode
When ATH
is 0
and t
: Transmission Interval is non-zero, intermittent transmission mode is active.
If SCT
value is (C_i), the sample count is represented as (16C_i+16).
p | SCT | Sample Count |
---|
0x??????00 | 0x00 | 16 samples (default) |
0x??????01 | 0x01 | 32 samples |
| | … |
0x??????07 | 0x07 | 128 samples |
| | … |
0x??????FF | 0xFF | 4096 samples |
Active Detection Mode
When ATH
and t
: Transmission Interval are both non-zero, active detection mode is active.
In active detection mode, when acceleration exceeds the threshold given by ATH
, it transmits the samples immediately after, in addition to the previous 30 samples.
If SCT
value is (C_a), the number of subsequent samples is (30C_a+30).
p | SCT | Subsequent Sample Count |
---|
0x??????00 | 0x00 | 30 samples (default) |
0x??????01 | 0x01 | 60 samples |
| | … |
0x??????07 | 0x07 | 240 samples |
| | … |
0x??????FF | 0xFF | 7680 samples |
SFQ
: Sampling Frequency
SFQ
affects the sampling frequency of acceleration data.
p | SFQ | Sampling Frequency |
---|
0x?????0?? | 0x0 | 25Hz (default) |
0x?????1?? | 0x1 | 50Hz |
0x?????2?? | 0x2 | 100Hz |
0x?????3?? | 0x3 | 190Hz |
ATH
: Active Detection Mode
ATH
affects the behavior of active detection mode.
0
disables it. Values 1
-F
enable it with the value as the threshold.
p | ATH | Description |
---|
0x????0??? | 0x0 | Disabled (default) |
0x????1??? | 0x1 | 1G (not recommended) |
0x????2??? | 0x2 | 2G |
| | … |
0x????F??? | 0xF | 15G |
If ATH
is set to 1
, the device will always be in active state even when stationary.
Notification Pal
Specify a 32-bit value.
00000000
: Tap & Shake Mode
Sends data when tapped or shaken.
00000001
: Dice Mode
Detects six different top faces and sends data.
Notification Event Details
The value is binary data up to 68 bytes, represented as a hexadecimal string.
One event consists of 4 bytes. The maximum number of events is 17.
# | Data | Description | Remarks |
---|
| | 1st event | |
0 | uint8 | Event ID | 0x00 -0x10 |
1 | uint8 | Red and Green Brightness | Red 0x0? -0xF? , Green 0x?0 -0x?F |
2 | uint8 | Blue and White Brightness | Blue 0x0? -0xF? , White 0x?0 -0x?F |
3 | uint8 | Blink Pattern and On Time | |
| | Blink Pattern | Steady 0x0? , Slow 0x1? , Medium 0x2? , Fast 0x3? |
| | On Time | No off 0x?0 , Seconds specified 0x?1 -0x?F |
| | 2nd event | |
4 | uint8 | Event ID | 0x01 -0x10 |
5 | uint8 | Red and Green Brightness | Red 0x0? -0xF? , Green 0x?0 -0x?F |
6 | uint8 | Blue and White Brightness | Blue 0x0? -0xF? , White 0x?0 -0x?F |
7 | uint8 | Blink Pattern and On Time | |
| | Blink Pattern | Steady 0x0? , Slow 0x1? , Medium 0x2? , Fast 0x3? |
| | On Time | No off 0x?0 , Seconds specified 0x?1 -0x?F |
| | 3rd event | |
| | | |
| | 17th event | |
64 | uint8 | Event ID | 0x01 -0x10 |
65 | uint8 | Red and Green Brightness | Red 0x0? -0xF? , Green 0x?0 -0x?F |
66 | uint8 | Blue and White Brightness | Blue 0x0? -0xF? , White 0x?0 -0x?F |
67 | uint8 | Blink Pattern and On Time | |
| | Blink Pattern | Steady 0x0? , Slow 0x1? , Medium 0x2? , Fast 0x3? |
| | On Time | No off 0x?0 , Seconds specified 0x?1 -0x?F |
Example Configuration Data
An example of the default setting is shown.
0180002A0208002A0300802A0488002A0580802A0608802A0880000A1008000A
| # | Data | Description | Value |
---|
| | | 1st event | |
01 | 0 | uint8 | Event ID | 0x01 |
80 | 1 | uint8 | Red and Green Brightness | Red 8 /15 , Green 0 /15 |
00 | 2 | uint8 | Blue and White Brightness | Blue 0 /15 , White 0 /15 |
2A | 3 | uint8 | Blink Pattern and On Time | Medium, 10 seconds |
| | | 2nd event | |
02 | 4 | uint8 | Event ID | 0x02 |
08 | 5 | uint8 | Red and Green Brightness | Red 0 /15 , Green 8 /15 |
00 | 6 | uint8 | Blue and White Brightness | Blue 0 /15 , White 0 /15 |
2A | 7 | uint8 | Blink Pattern and On Time | Medium, 10 seconds |
| | | 3rd event | |
| | | | |
| | | 8th event | |
10 | 28 | uint8 | Event ID | 0x10 |
08 | 29 | uint8 | Red and Green Brightness | Red 0 /15 , Green 8 /15 |
00 | 30 | uint8 | Blue and White Brightness | Blue 0 /15 , White 0 /15 |
0A | 31 | uint8 | Blink Pattern and On Time | Steady, 10 seconds |