Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dev:tailcontrol-command-protocol [2024/10/19 15:56] – [Device Advertisement] darkgrue | en:dev:tailcontrol-command-protocol [2024/11/09 17:09] (current) – darkgrue | ||
---|---|---|---|
Line 6: | Line 6: | ||
All commands are case-sensitive. Trailing whitespace (e.g., `NULL`, `CR`, etc.) are ignored. The space between a command keyword and the parameters is mandatory. | All commands are case-sensitive. Trailing whitespace (e.g., `NULL`, `CR`, etc.) are ignored. The space between a command keyword and the parameters is mandatory. | ||
- | <WRAP round todo 60%> | + | <WRAP round todo 90%> |
**IMPORTANT NOTICE:** TailCoNTROL and the TailCoNTROL Protocol is still under development. Some commands and features described here relate to a future release and are subject to change at this time, especially EarGear 2 features. | **IMPORTANT NOTICE:** TailCoNTROL and the TailCoNTROL Protocol is still under development. Some commands and features described here relate to a future release and are subject to change at this time, especially EarGear 2 features. | ||
</ | </ | ||
Line 28: | Line 28: | ||
* TX Characteristic is '' | * TX Characteristic is '' | ||
* Battery Voltage is '' | * Battery Voltage is '' | ||
- | |||
- | <WRAP round important 60%> | ||
- | For tail-series v3.6 controller hardware, the battery charging characteristic is unset (charging state is not available). | ||
- | </ | ||
- | |||
The BLE Device Service for the EarGear 2 is '' | The BLE Device Service for the EarGear 2 is '' | ||
Line 39: | Line 34: | ||
* Battery Voltage is '' | * Battery Voltage is '' | ||
+ | <WRAP round todo 90%> | ||
+ | TailCoNTROL will use a new Service and Characteristics UUIDs going forward, to distinguish it from previous firmwares (and to further enforce the “forklift upgrade” required). | ||
+ | |||
+ | The BLE Device Service for TailCoNTROL is '' | ||
+ | * RX Characteristic is '' | ||
+ | * TX Characteristic is '' | ||
+ | * Under the standard Device Information Service (DIS, '' | ||
+ | * Manufacturer Name '' | ||
+ | * Model Number '' | ||
+ | * Firmware Revision '' | ||
+ | * Hardware Revision '' | ||
+ | * Under the standard Battery Service UUID ('' | ||
+ | * Battery Percentage '' | ||
+ | * Battery Voltage is '' | ||
+ | * Charging State (if hardware supported) is '' | ||
+ | </ | ||
+ | |||
+ | <WRAP round important 90%> | ||
+ | For tail-series (MiTail, MiTail Mini, and FlutterWings) v3.6 controller hardware, the battery charging characteristic is unset (charging state is not available). | ||
+ | </ | ||
===== TailCoNTROL Device Indicators ===== | ===== TailCoNTROL Device Indicators ===== | ||
Line 188: | Line 203: | ||
^ Prefix ^ Parameter Type ^ Range of Values for Moves ^ | ^ Prefix ^ Parameter Type ^ Range of Values for Moves ^ | ||
- | | **E** | Easing function to apply to Servo 1 | Default is Linear, if not specified.\\ This is the decimal representation of the (hexadecimal) easing type enumeration, | + | | **E** | Easing function to apply to Servo 1 | Default is Linear |
| **F** | Easing function to apply to Servo 2 | (Same as **E**) | | | **F** | Easing function to apply to Servo 2 | (Same as **E**) | | ||
| **A** | Point for Servo 1 | <0 ... 8>\\ 0 -> 25 degrees\\ 1 -> 41 degrees\\ 2 -> 58 degrees\\ ...\\ 8 -> 160 degrees | | | **A** | Point for Servo 1 | <0 ... 8>\\ 0 -> 25 degrees\\ 1 -> 41 degrees\\ 2 -> 58 degrees\\ ...\\ 8 -> 160 degrees | | ||
Line 220: | Line 235: | ||
^ Prefix ^ Parameter Type ^ Range of Values for Moves ^ | ^ Prefix ^ Parameter Type ^ Range of Values for Moves ^ | ||
| **U** | User preset number | <1 ... 4> | | | **U** | User preset number | <1 ... 4> | | ||
- | | **E** | Easing function to apply to Servo 1 | Default is Linear, if not specified.\\ | + | | **E** | Easing function to apply to Servo 1 | Default is Linear |
| **F** | Easing function to apply to Servo 2 | (Same as **E**) | | | **F** | Easing function to apply to Servo 2 | (Same as **E**) | | ||
| **A** | Point for Servo 1 | <0 ... 8>\\ 0 -> 25 degrees\\ 1 -> 41 degrees\\ 2 -> 58 degrees\\ ...\\ 8 -> 160 degrees | | | **A** | Point for Servo 1 | <0 ... 8>\\ 0 -> 25 degrees\\ 1 -> 41 degrees\\ 2 -> 58 degrees\\ ...\\ 8 -> 160 degrees | | ||
Line 233: | Line 248: | ||
| **U** | User preset number | <1 ... 4> | | | **U** | User preset number | <1 ... 4> | | ||
| **P** | Number of points in the Glow Tip pattern | <1 ... 32> | | | **P** | Number of points in the Glow Tip pattern | <1 ... 32> | | ||
- | | **N** | Number of cycles (times the pattern will be repeated) | <0 ... 255> | | + | | **N** | Number of cycles (times the pattern will be performed) | <0 ... 255> | |
| **A** | Brightness point for Glow Tip | <0 ... 8>\\ 0 -> LEDs off\\ ...\\ 4 -> 50% intensity\\ ...\\ 8-> LEDs max intensity | | | **A** | Brightness point for Glow Tip | <0 ... 8>\\ 0 -> LEDs off\\ ...\\ 4 -> 50% intensity\\ ...\\ 8-> LEDs max intensity | | ||
| **S/L** | Time between the current point and the next (in 20 ms increments)\\ **S** will wait in the current position, then move to the next when the time has elapsed\\ **L** will gradually move from the current position to the next, over the time specified | 0 ... 127 (time * 20 ms) | | | **S/L** | Time between the current point and the next (in 20 ms increments)\\ **S** will wait in the current position, then move to the next when the time has elapsed\\ **L** will gradually move from the current position to the next, over the time specified | 0 ... 127 (time * 20 ms) | | ||
Line 253: | Line 268: | ||
Both servos move from 143° to 41° (position 7 to 1) and back, for 3 times; each cycle is (75 + 75) * 20 ms = 3 s long. | Both servos move from 143° to 41° (position 7 to 1) and back, for 3 times; each cycle is (75 + 75) * 20 ms = 3 s long. | ||
- | **USERMOVE U1 P2 N3 E0E42 F0F42 A7A1 B7B1 L75L75 M75M75 H1** | + | **USERMOVE U1 P2 N3 E0E66 F0F66 A7A1 B7B1 L75L75 M75M75 H1** |
- | USERMOVE U1 P2 N3 E0E42 F0F42 A7A1 B7B1 L75L75 M75M75 H1 | + | |
* **U1** Store into user preset 1 | * **U1** Store into user preset 1 | ||
* **P2** The move consists of 2 points | * **P2** The move consists of 2 points | ||
- | * **N3** | + | * **N3** |
- | * **E0E42** Move to Position 1 has no easing, move to Position 2 uses | + | * **E0E66** Servo 1 move to Position 1 has no easing, move to Position 2 uses EASE_CUBIC_OUT (0x42) |
- | * **F0F42** Move to Position 1 has no easing, move to Position 2 uses | + | * **F0F66** Servo 2 move to Position 1 has no easing, move to Position 2 uses EASE_CUBIC_OUT (0x42) |
* **A7A1** Servo 1 moves from 7 to 1 (143° to 41°) | * **A7A1** Servo 1 moves from 7 to 1 (143° to 41°) | ||
* **B7B1** Servo 2 moves exactly as Servo 1 | * **B7B1** Servo 2 moves exactly as Servo 1 | ||
Line 276: | Line 290: | ||
* **U2** Store into user preset 2 | * **U2** Store into user preset 2 | ||
* **P4** The move consists of 4 points | * **P4** The move consists of 4 points | ||
- | * **N3** | + | * **N3** |
* **A0A4A8A4** Move Servo 1 90° at a time, starting from 0° | * **A0A4A8A4** Move Servo 1 90° at a time, starting from 0° | ||
* **B4B8B4B0** Move Servo 2 90° at a time, starting from 90° | * **B4B8B4B0** Move Servo 2 90° at a time, starting from 90° | ||
Line 283: | Line 297: | ||
* **H1** Home at end of move | * **H1** Home at end of move | ||
- | Note: because | + | <WRAP round info 90%> |
+ | Because | ||
+ | </ | ||
==== USERLEDS Examples ==== | ==== USERLEDS Examples ==== | ||
Line 295: | Line 312: | ||
* **U1** Store into user preset 1 | * **U1** Store into user preset 1 | ||
* **P2** The pattern consists of 2 brightness points | * **P2** The pattern consists of 2 brightness points | ||
- | * **N5** | + | * **N5** |
* **A8A0** Start at full brightness, then turn off | * **A8A0** Start at full brightness, then turn off | ||
* **S5S95** On for 5 * 20 ms = 100 ms; off for 50 * 20ms = 1 s | * **S5S95** On for 5 * 20 ms = 100 ms; off for 50 * 20ms = 1 s | ||
Line 301: | Line 318: | ||
=== Example 2 – Fade in/out (similar to '' | === Example 2 – Fade in/out (similar to '' | ||
- | The Glow Tip LEDs light up slowly, then dim until completely off; this is repeated | + | The Glow Tip LEDs light up slowly, then dim until completely off; this is performed |
**USERLEDS U2 P2 N3 A0A8 L100L100** | **USERLEDS U2 P2 N3 A0A8 L100L100** | ||
Line 307: | Line 324: | ||
* **U2** Store into user preset 2 | * **U2** Store into user preset 2 | ||
* **P2** The pattern consists of 2 brightness points | * **P2** The pattern consists of 2 brightness points | ||
- | * **N3** | + | * **N3** |
* **A0A8** Start off, finish at full brightness | * **A0A8** Start off, finish at full brightness | ||
* **L100L100** Each brightness point is reached in 100 * 20 ms = 2 s | * **L100L100** Each brightness point is reached in 100 * 20 ms = 2 s | ||
Line 345: | Line 362: | ||
Conference mode pairs the user's phone with the TailCoNTROL device and establishes a bond that performs long-term storage of encryption info (particularly keys) so that the devices “know” each other and can easily reconnect in an encrypted way. This protects your device in a number of different ways: | Conference mode pairs the user's phone with the TailCoNTROL device and establishes a bond that performs long-term storage of encryption info (particularly keys) so that the devices “know” each other and can easily reconnect in an encrypted way. This protects your device in a number of different ways: | ||
- | * Authentication: | + | |
- | * MITM (Man In The Middle): process by which a third device impersonates the other two legitimate devices, in order to fool them into connecting to it. Both BLE central and peripheral will connect to the malicious device, which in turn routes the communication between the other two devices. The malicious device intercepts all data being sent and can inject false data or remove data before it reaches its recipient. | + | |
- | * Replay Attack: a type of network attack in which an attacker captures a valid network transmission and then retransmits it later. The main objective is to trick the system into accepting the retransmission of the data as legitimate. | + | |
==== Enabling Conference Mode (Pairing and Binding) ==== | ==== Enabling Conference Mode (Pairing and Binding) ==== | ||
Line 377: | Line 394: | ||
- Ten seconds after the triple-flash (13 seconds total of continuous holding), the blue LED will blink quickly continuously, | - Ten seconds after the triple-flash (13 seconds total of continuous holding), the blue LED will blink quickly continuously, | ||
+ | <WRAP round info 90%> | ||
The bond will also need to be removed on the phone or other device as well, or it will attempt to continue to use the bond (which will fail, because those stored credentials will no longer be valid). | The bond will also need to be removed on the phone or other device as well, or it will attempt to continue to use the bond (which will fail, because those stored credentials will no longer be valid). | ||
* On Android, enter Settings, Connections, | * On Android, enter Settings, Connections, | ||
* On iOS, enter Settings, Bluetooth and find the device to remove under "My Devices" | * On iOS, enter Settings, Bluetooth and find the device to remove under "My Devices" | ||
+ | |||
+ | </ | ||
===== iOS Casual Mode ===== | ===== iOS Casual Mode ===== | ||
- | <WRAP round todo 60%> | + | <WRAP round todo 90%> |
This feature is pending removal in a future release. | This feature is pending removal in a future release. | ||
</ | </ |