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/12/15 23:40] – [Device Advertisement] darkgrue | en:dev:tailcontrol-command-protocol [2025/06/21 14:27] (current) – [Conference Mode] darkgrue | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | Command list for the Tail Company | + | Command list for the Tail Company |
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 90%> | <WRAP round todo 90%> | ||
- | **IMPORTANT NOTICE: | + | **IMPORTANT NOTICE: |
</ | </ | ||
Line 35: | Line 35: | ||
<WRAP round todo 90%> | <WRAP round todo 90%> | ||
- | TailCoNTROL | + | TailControl |
- | The BLE Device Service for TailCoNTROL | + | The BLE Device Service for TailControl |
- | * RX Characteristic is '' | + | * RX Characteristic is '' |
- | * TX Characteristic is '' | + | * TX Characteristic is '' |
- | * Under the standard Device Information Service (DIS, '' | + | * Battery Voltage is '' |
- | * Manufacturer Name '' | + | |
- | * Model Number '' | + | |
- | * Firmware Revision '' | + | |
- | * Hardware Revision '' | + | |
- | | + | |
- | * Battery Percentage '' | + | |
- | | + | |
- | * Charging State (if hardware supported) is '' | + | |
</ | </ | ||
Line 55: | Line 47: | ||
</ | </ | ||
- | ===== TailCoNTROL | + | ===== TailControl |
==== Blue LED ==== | ==== Blue LED ==== | ||
Line 103: | Line 95: | ||
==== Automatic Actions ==== | ==== Automatic Actions ==== | ||
- | TailCoNTROL | + | TailControl |
Additional automatic actions are described in [[en: | Additional automatic actions are described in [[en: | ||
- | ===== Tail Moves ===== | + | ===== Move Commands |
Move commands return ''< | Move commands return ''< | ||
Line 160: | Line 152: | ||
===== EarGear 2-only Commands ===== | ===== EarGear 2-only Commands ===== | ||
- | | **LISTENMODE** | Starts Listen Mode; [[#Listen Mode|see below]], returns '' | + | | **LISTENMODE** |
- | | **STOPLISTEN** | Stops Listen Mode; [[#Listen Mode|see below]], returns '' | + | | **STOPLISTEN** |
- | | **STOPTILT** | Stops Tilt Mode; [[#Tilt Mode|see below]], returns '' | + | | **STOPTILT** |
- | | **TILTMODE** | Starts Tilt Mode; [[#Tilt Mode|see below]], returns '' | + | | **TILTMODE** |
+ | ===== RGB LED Commands ===== | ||
+ | |||
+ | | **RGBOFF** | **RGB** LEDs **OFF**, returns '' | ||
+ | | **RGBRBO** | **RGB** **R**ain**B**ow pattern, returns '' | ||
+ | | **RGBRB2** | **RGB** **R**ain**B**ow pattern with random sparkly glitter, returns '' | ||
+ | | **RGBCON** | **RGB** **CON**fetti; | ||
+ | | **RGBSIN** | **RGB** **SIN**e; a colored dot sweeping back and forth, with fading trails, returns '' | ||
+ | | **RGBJUG** | **RGB** **JUG**gle; eight colored dots, weaving in and out of sync with each other, returns '' | ||
+ | | **RGBBPM** | **RGB** **BPM**; colored stripes pulsing at a defined Beats-Per-Minute, | ||
+ | | **RGBDMO** | **RGB** **DE**m**O**; | ||
+ | | **RGBTST** | **RGB** **TE**s**T**; | ||
+ | | **SETRGB** | **SET** **RGB** configuration and restart after 3 seconds; (e.g., '' | ||
===== Other Commands ===== | ===== Other Commands ===== | ||
- | | **AUTOMODE** | **AUTO**nomous **MO**de; [[# | + | | **AUTOMODE** | **AUTO**nomous **MO**de |
- | | **DSSP** | **D**irectly **S**et **S**ervo **P**osition; [[#Directly Set Servo Position|see below]], returns '' | + | | **DSSP** | **D**irectly **S**et **S**ervo **P**osition |
| **HWVER** | Returns **H**ard**W**are **VER**sion; | | **HWVER** | Returns **H**ard**W**are **VER**sion; | ||
| **PING** | Keepalive heartbeat (from application), | | **PING** | Keepalive heartbeat (from application), | ||
- | | **SETPUSSKEY** | **SET** **P**a**SSKEY**, | + | | **SETPUSSKEY** | **SET** **P**a**SSKEY**, |
| **SHUTDOWN** | **SHUT DOWN** the unit (will lose the BLE connection), | | **SHUTDOWN** | **SHUT DOWN** the unit (will lose the BLE connection), | ||
| **STOPAUTO** | **STOP AUTO**nomous Mode, returns '' | | **STOPAUTO** | **STOP AUTO**nomous Mode, returns '' | ||
| **STOPNPM** | **STOP** **N**o-**P**hone **M**ode and disables it in NVS configuration; | | **STOPNPM** | **STOP** **N**o-**P**hone **M**ode and disables it in NVS configuration; | ||
- | | **USERMOVE** | [[# | + | | **USERMOVE** | Set user-defined move ([[# |
- | | **STOPPUSSKEY** | **STOP** **P**a**SSKEY**, | + | | **STOPPUSSKEY** | **STOP** **P**a**SSKEY**, |
- | | **USERLEDS** | [[# | + | | **USERLEDS** | Set user-defined Glow Tip pattern ([[# |
- | | **VER** | Returns the firmware **VER**sion number; '' | + | | **VER** | Returns the firmware **VER**sion number; '' |
Line 185: | Line 189: | ||
| **BATT** | **BATT**ery percentage, returns the integer value of estimated battery capacity remaining | | **BATT** | **BATT**ery percentage, returns the integer value of estimated battery capacity remaining | ||
- | | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default | + | | **READCONF** | **READ** running |
+ | | **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., '' | ||
+ | | **SETDISCONNECTEDCOUNT** | **SET** BLE **DISCONNECTED** power off **COUNT**down parameter in NVS and running configuration | ||
+ | | **SETHOLDONSTOP** | **SET** servo **HOLD** is maintained when the servos **STOP** (maintains servo PWM when not moving, | ||
+ | | **UNSETHOLDONSTOP** | **UNSET** servo **HOLD** when the servos **STOP** (servo PWM is dropped when not moving, default for tail-based devices); returns '' | ||
+ | | **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., '' | ||
| **OTA** | Starts firmware **O**ver **T**he **A**ir update process (e.g., '' | | **OTA** | Starts firmware **O**ver **T**he **A**ir update process (e.g., '' | ||
- | | **READCONF** | **READ** running | + | | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds) and reboot |
- | | **READNVS** | **READ** **CONF**iguration from NVS; returns space-delimited configuration parameters stored in NVS (e.g., '' | + | | **READNVS** | **READ** **CONF**iguration from NVS; returns space-delimited configuration parameters stored in NVS (e.g., '' |
| **REBOOT** | **REBOOT** after 3 seconds, returns '' | | **REBOOT** | **REBOOT** after 3 seconds, returns '' | ||
- | | **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., '' | + | | **TASKU** | Prints to the hardware serial console the minimum amount of remaining stack space that was available to the task since the task started executing (high water mark), returns '' |
- | | **TASKU** | Prints to the hardware serial console the minimum amount | + | |
- | | **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., '' | + | |
===== Directly Set Servo Position ===== | ===== Directly Set Servo Position ===== | ||
Line 222: | Line 228: | ||
- | ===== User-defined | + | ===== User-defined Moves and Glow Tip Patterns ===== |
- | Up to 4 user-defined move definitions and 4 LED patterns can be sent over the BT/BLE connection and assigned to user | + | Up to 4 user-defined move definitions and 4 Glow Tip LED patterns can be sent over the BT/BLE connection and assigned to user |
presets (callable with the '' | presets (callable with the '' | ||
- | The two instructions used to send a tail move or a Glow Tip LED pattern definition follow the same syntax and consist of a | + | The two instructions used to send a move or a Glow Tip LED pattern definition follow the same syntax and consist of a |
keyword ('' | keyword ('' | ||
defines the type of parameter (see table, below). | defines the type of parameter (see table, below). | ||
Line 248: | Line 254: | ||
| **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 performed) | <0 ... 255> | | + | | **N** | Number of cycles (times the pattern will be repeated) | <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 272: | Line 278: | ||
* **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** |
* **E0E66** Servo 1 move to Position 1 has no easing, move to Position 2 uses EASE_CUBIC_OUT (0x42) | * **E0E66** Servo 1 move to Position 1 has no easing, move to Position 2 uses EASE_CUBIC_OUT (0x42) | ||
* **F0F66** Servo 2 move to Position 1 has no easing, move to Position 2 uses EASE_CUBIC_OUT (0x42) | * **F0F66** Servo 2 move to Position 1 has no easing, move to Position 2 uses EASE_CUBIC_OUT (0x42) | ||
Line 290: | Line 296: | ||
* **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 312: | Line 318: | ||
* **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 318: | Line 324: | ||
=== 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 performed | + | The Glow Tip LEDs light up slowly, then dim until completely off; this is repeated |
**USERLEDS U2 P2 N3 A0A8 L100L100** | **USERLEDS U2 P2 N3 A0A8 L100L100** | ||
Line 324: | Line 330: | ||
* **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 360: | Line 366: | ||
===== Conference Mode ===== | ===== Conference Mode ===== | ||
- | Conference mode pairs the user's phone with the TailCoNTROL | + | Conference mode pairs the user's phone with the TailControl |
* **Authentication: | * **Authentication: | ||
Line 366: | Line 372: | ||
* **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. | * **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. | ||
+ | <WRAP round important 90%> | ||
+ | Do NOT attempt to use Conference Mode on TailControl firmware prior to 5.3.0, or a condition requiring repair of the control board can occur.</ | ||
==== Enabling Conference Mode (Pairing and Binding) ==== | ==== Enabling Conference Mode (Pairing and Binding) ==== | ||
- | Pairing is performed with a 6-digit number entered on each of the devices. In the case of TailCoNTROL, the passkey is set on the device in a " | + | Pairing is performed with a 6-digit number entered on each of the devices. In the case of TailControl, the passkey is set on the device in a " |
**SETPUSSKEY < | **SETPUSSKEY < | ||
Line 384: | Line 392: | ||
==== Unbinding ==== | ==== Unbinding ==== | ||
- | Resetting/ | + | Resetting/ |
- | There are two different methods of factory-resetting a TailCoNTROL | + | There are two different methods of factory-resetting a TailControl |
- | * Sending a '' | + | * Sending a '' |
* Performing a factory reset using the single button: | * Performing a factory reset using the single button: | ||
- Press and hold the power button. | - Press and hold the power button. | ||
Line 395: | Line 403: | ||
<WRAP round info 90%> | <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 | + | Note that 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 |
* On Android, enter Settings, Connections, | * On Android, enter Settings, Connections, | ||
Line 441: | Line 449: | ||
===== No-phone Mode ===== | ===== No-phone Mode ===== | ||
- | No-phone mode is a feature exclusive of MiTail firmware 4.0.0 or greater or TailCoNTROL. | + | No-phone mode is a feature exclusive of MiTail firmware 4.0.0 or greater or TailControl. |
**AUTOMODE G< | **AUTOMODE G< | ||
Line 461: | Line 469: | ||
- | == Copyright 2024 © The Mechanical Tail Company Limited contact@thetailcompany.com. All Rights Reserved. == | + | == Copyright 2024-2025 © The Mechanical Tail Company Limited contact@thetailcompany.com. All Rights Reserved. The Mechanical Tail Company Limited also claims trademark rights in the following: TailControl, |