This is the multi-page printable view of this section. Click here to print...

Return to the regular view of this page

As of 2025-07-24

Pal App Manual

For the TWELITE PAL Series

Pal App (App_PAL) is an application dedicated to the wireless tag system TWELITE PAL Series.

It is installed on TWELITE BLUE / RED PAL at factory shipment.

1 - Pal App Manual

Latest Edition

Installation

To write the Pal App (App_PAL), install TWELITE STAGE SDK and rewrite using the TWELITE STAGE App.

Supported Hardware

  • TWELITE BLUE / RED PAL with Open/Close Sensor Pal attached
  • TWELITE BLUE / RED PAL with Environmental Sensor Pal attached
  • TWELITE BLUE / RED PAL with Motion Sensor Pal attached
  • TWELITE BLUE / RED PAL with Notification Pal attached

1.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.

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

Setting ItemDefaultRemarks
aApplication ID0x6772010732bit
iLogical Device ID120Child 1-100
cFrequency Channel1611-26
xRetry Count and Tx Power3
Retry Count01-9 times, 0 is default: none
Tx Power30-3
bUART Alternative Baud Rate38400Enabled with BPS pin
BUART Option8N1Enabled with BPS pin
kEncryption Key0xA5A5A5A532bit
oOption Bits0x00000000Other detailed settings
tTransmission Interval601-4095 seconds
pSensor-specific Parameter0
eNotification Event0180002A
0208002A
0300802A
0488002A
0580802A
0608802A
0880000A
1008000A
Notification Pal only
dTemperature Coefficient0Environmental Pal only 0-60000
DTemperature Offset0Environmental Pal only -2000-2000
fHumidity Coefficient0Environmental Pal only 0-60000
FHumidity Offset0Environmental Pal only -2000-2000

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.

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.

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.

BitSetting DescriptionDefault
0x00000001Enable Transmission to Repeater0️⃣
0x00001000Enable Encrypted Communication0️⃣
0x00010000Enable UART Output on Child0️⃣

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 Pal

Specifies the behavior when an event number is received.

For details, see Notification Event Details.

d: Temperature Coefficient

Environmental Sensor Pal

Specify 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 Pal

Specify 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 Pal

Specify 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 Pal

Specify 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.

bit31-2827-2423-2019-1615-1211-87-43-0
Function----ATHSFQSCT:7-4SCT:3-0
Default00000000

Each function represents the following:

NameItemDescription
SCTSample CountNumber of acceleration samples
SFQSampling FrequencySampling frequency of acceleration
ATHActive Detection ModeAcceleration threshold, 0 disables

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).

pSCTSample Count
0x??????000x0016 samples (default)
0x??????010x0132 samples
0x??????070x07128 samples
0x??????FF0xFF4096 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).

pSCTSubsequent Sample Count
0x??????000x0030 samples (default)
0x??????010x0160 samples
0x??????070x07240 samples
0x??????FF0xFF7680 samples

SFQ: Sampling Frequency

SFQ affects the sampling frequency of acceleration data.

pSFQSampling Frequency
0x?????0??0x025Hz (default)
0x?????1??0x150Hz
0x?????2??0x2100Hz
0x?????3??0x3190Hz

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.

pATHDescription
0x????0???0x0Disabled (default)
0x????1???0x11G (not recommended)
0x????2???0x22G
0x????F???0xF15G

Notification Pal

Specify a 32-bit value.

pDescription
0x00000000Tap & Shake Mode
0x00000001Dice Mode

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.

#DataDescriptionRemarks
1st event
0uint8Event ID0x00-0x10
1uint8Red and Green BrightnessRed 0x0?-0xF?, Green 0x?0-0x?F
2uint8Blue and White BrightnessBlue 0x0?-0xF?, White 0x?0-0x?F
3uint8Blink Pattern and On Time
Blink PatternSteady 0x0?, Slow 0x1?, Medium 0x2?, Fast 0x3?
On TimeNo off 0x?0, Seconds specified 0x?1-0x?F
2nd event
4uint8Event ID0x01-0x10
5uint8Red and Green BrightnessRed 0x0?-0xF?, Green 0x?0-0x?F
6uint8Blue and White BrightnessBlue 0x0?-0xF?, White 0x?0-0x?F
7uint8Blink Pattern and On Time
Blink PatternSteady 0x0?, Slow 0x1?, Medium 0x2?, Fast 0x3?
On TimeNo off 0x?0, Seconds specified 0x?1-0x?F
3rd event
17th event
64uint8Event ID0x01-0x10
65uint8Red and Green BrightnessRed 0x0?-0xF?, Green 0x?0-0x?F
66uint8Blue and White BrightnessBlue 0x0?-0xF?, White 0x?0-0x?F
67uint8Blink Pattern and On Time
Blink PatternSteady 0x0?, Slow 0x1?, Medium 0x2?, Fast 0x3?
On TimeNo off 0x?0, Seconds specified 0x?1-0x?F

Example Configuration Data

An example of the default setting is shown.

0180002A0208002A0300802A0488002A0580802A0608802A0880000A1008000A
#DataDescriptionValue
1st event
010uint8Event ID0x01
801uint8Red and Green BrightnessRed 8/15, Green 0/15
002uint8Blue and White BrightnessBlue 0/15, White 0/15
2A3uint8Blink Pattern and On TimeMedium, 10 seconds
2nd event
024uint8Event ID0x02
085uint8Red and Green BrightnessRed 0/15, Green 8/15
006uint8Blue and White BrightnessBlue 0/15, White 0/15
2A7uint8Blink Pattern and On TimeMedium, 10 seconds
3rd event
8th event
1028uint8Event ID0x10
0829uint8Red and Green BrightnessRed 0/15, Green 8/15
0030uint8Blue and White BrightnessBlue 0/15, White 0/15
0A31uint8Blink Pattern and On TimeSteady, 10 seconds