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 [2026/05/14 17:37] – darkgrue | en:dev:tailcontrol-command-protocol [2026/07/04 19:44] (current) – darkgrue | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| - | Command list for the Tail Company TailControl firmware. TailControl is the unified firmware platform (version 5.// | + | Command list for the Tail Company TailControl firmware. TailControl is the unified firmware platform (version 5.// |
| 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. | ||
| Line 15: | Line 15: | ||
| The hardware platform uses the "Just Works" Bluetooth Low Energy (BLE) pairing method to connect. If Conference Mode ([[# | The hardware platform uses the "Just Works" Bluetooth Low Energy (BLE) pairing method to connect. If Conference Mode ([[# | ||
| - | + | ==== Device Advertisement ==== | |
| - | ===== Device Advertisement | + | |
| Device name is one of the following: | Device name is one of the following: | ||
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * '' | + | |
| - | TailControl will uses the same Service and Characteristics UUIDs across all supported products: '' | + | The BLE Device |
| + | * RX Characteristic is '' | ||
| + | * TX Characteristic is '' | ||
| + | * Battery Voltage is '' | ||
| - | | + | The BLE Device Service for the EarGear 2 is '' |
| - | * TX Characteristic is '' | + | * RX Characteristic is '' |
| + | * TX Characteristic 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 '' | ||
| + | | ||
| + | * TX Characteristic is '' | ||
| * Battery Voltage is '' | * Battery Voltage is '' | ||
| + | </ | ||
| <WRAP round important 90%> | <WRAP round important 90%> | ||
| Line 38: | Line 49: | ||
| ===== TailControl Device Indicators ===== | ===== TailControl Device Indicators ===== | ||
| - | |||
| ==== Blue LED ==== | ==== Blue LED ==== | ||
| Line 51: | Line 61: | ||
| - **Blink fast three times** when the button is held for more than 3 seconds (but less than 13), indicates the device is ready to power off when the button is released. | - **Blink fast three times** when the button is held for more than 3 seconds (but less than 13), indicates the device is ready to power off when the button is released. | ||
| - **Blink fast continuously** when the button is held for more than 13 seconds, indicates the device is ready to factory reset when the button is released. | - **Blink fast continuously** when the button is held for more than 13 seconds, indicates the device is ready to factory reset when the button is released. | ||
| - | |||
| ==== Red LED ==== | ==== Red LED ==== | ||
| Line 73: | Line 82: | ||
| **Note:** Unlike the DIGITAiL, MiTail, MiTail Mini, and FlutterWings devices **can** be used while charging. | **Note:** Unlike the DIGITAiL, MiTail, MiTail Mini, and FlutterWings devices **can** be used while charging. | ||
| - | |||
| ==== Green LED ==== | ==== Green LED ==== | ||
| Line 86: | Line 94: | ||
| - | ==== Automatic Actions ==== | + | ===== Automatic Actions |
| TailControl will automatically shut down the device if there is no BLE connection for '' | TailControl will automatically shut down the device if there is no BLE connection for '' | ||
| Line 93: | Line 101: | ||
| - | ===== Servo-Based Moves (ClawGear, EarGear 2, MiTail, MiTail Mini, FlutterWings) | + | ===== Move Commands |
| - | Move commands return ''< | + | Move commands return ''< |
| A command will return '' | A command will return '' | ||
| Line 119: | Line 127: | ||
| | **TAILU3** | **U**ser defined **3** | | | **TAILU3** | **U**ser defined **3** | | ||
| | **TAILU4** | **U**ser defined **4** | | | **TAILU4** | **U**ser defined **4** | | ||
| - | |||
| - | |||
| - | ===== Stepper-Based Moves (Not Currently Used) ===== | ||
| - | |||
| - | Move commands return ''< | ||
| - | |||
| - | A command will return '' | ||
| - | |||
| - | A new command that is received before the currently executing command is finished will immediately end the current command and start the new one. | ||
| - | |||
| - | | **TAILHM** | **H**o**M**e position | | ||
| - | | **MOVE1** | **MOVE** **1** | | ||
| - | | **MOVE2** | **MOVE** **2** | | ||
| - | | **MOVE3** | **MOVE** **3** | | ||
| - | | **MOVE4** | **MOVE** **4** | | ||
| - | | **MOVE5** | **MOVE** **5** | | ||
| - | | **MOVE6** | **MOVE** **6** | | ||
| - | | **MOVE7** | **MOVE** **7** | | ||
| - | | **MOVEU1** | **MOVE** **U**ser defined **1** | | ||
| - | | **MOVEU2** | **MOVE** **U**ser defined **2** | | ||
| - | | **MOVEU3** | **MOVE** **U**ser defined **3** | | ||
| - | | **MOVEU4** | **MOVE** **U**ser defined **4** | | ||
| - | |||
| - | |||
| - | ===== ClawGear-only Commands ===== | ||
| - | |||
| - | | **CLAPMODE** | Starts Clap Mode (and disables Tilt Mode, if enabled), returns '' | ||
| - | | **STOPCLAP** | Stops Clap Mode, returns '' | ||
| - | | **STOPTILT** | Stops Tilt Mode, returns '' | ||
| - | | **TILTMODE** | Starts Tilt Mode (and disables Clap Mode, if enabled), returns '' | ||
| - | |||
| - | ===== EarGear 2-only Commands ===== | ||
| - | |||
| - | | **LISTENMODE** | Starts Listen Mode ([[#Listen Mode|see below]]), returns '' | ||
| - | | **STOPLISTEN** | Stops Listen Mode ([[#Listen Mode|see below]]), returns '' | ||
| - | | **STOPTILT** | Stops Tilt Mode ([[#Tilt Mode|see below]]), returns '' | ||
| - | | **TILTMODE** | Starts Tilt Mode ([[#Tilt Mode|see below]]), returns '' | ||
| Line 178: | Line 149: | ||
| | **LEDUS3** | **US**er defined **3** | | | **LEDUS3** | **US**er defined **3** | | ||
| | **LEDUS4** | **US**er defined **4** | | | **LEDUS4** | **US**er defined **4** | | ||
| + | |||
| + | |||
| + | ===== EarGear 2-only Commands ===== | ||
| + | |||
| + | | **LISTENMODE** (or **LISTEN FULL**) | Starts Listen Mode ([[#Listen Mode|see below]]), returns '' | ||
| + | | **STOPLISTEN** (or **ENDLISTEN**) | Stops Listen Mode ([[#Listen Mode|see below]]), returns '' | ||
| + | | **STOPTILT** (or **ENDTILTMODE**) | Stops Tilt Mode ([[#Tilt Mode|see below]]), returns '' | ||
| + | | **TILTMODE** (or **TILTMODE START**) | Starts Tilt Mode ([[#Tilt Mode|see below]]), returns '' | ||
| ===== RGB LED Commands ===== | ===== RGB LED Commands ===== | ||
| - | RGB support is experimental, and not included | + | All **RGB**'' |
| | **RGBOFF** | **RGB** LEDs **OFF**, returns '' | | **RGBOFF** | **RGB** LEDs **OFF**, returns '' | ||
| - | | **RGBRBO** | **RGB** **R**ain**B**ow pattern, returns '' | + | | **RGBCHS** | **RGB** **CH**a**S**e; theater marquee chase; optionally takes a hue color (in RGB Hexidecimal, |
| - | | **RGBRB2** | **RGB** **R**ain**B**ow pattern | + | | **RGBCLN** | **RGB** **CY**lo**N**; color dot sweeping back and forth, |
| - | | **RGBCON** | **RGB** **CON**fetti; random-colored speckles that blink in and fade smoothly, returns '' | + | | **RGBDMO** | **RGB** **DE**m**O**; cycle through all the preceding patterns, changing every 10 seconds (e.g., '' |
| - | | **RGBSIN** | **RGB** **SIN**e; a colored dot sweeping back and forth, with fading trails, returns '' | + | | **RGBFDE** | **RGB** **F**a**DE**; fade in/out effect (e.g., '' |
| - | | **RGBJUG** | **RGB** **JUG**gle; eight colored dots, weaving in and out of sync with each other, returns '' | + | | **RGBFIR** | **RGB** **FIR**e; fire effect (e.g., '' |
| - | | **RGBBPM** | **RGB** **BPM**; colored stripes pulsing at a defined Beats-Per-Minute, returns '' | + | | **RGBRBW** | **RGB** **R**ain**B**o**W** pattern (e.g., '' |
| - | | **RGBDMO** | **RGB** **DE**m**O**; cycle through | + | | **RGBSLD** | **RGB** **S**o**L**i**D**; display a solid color (in RGB Hexidecimal) on all pixels (e.g., '' |
| - | | **RGBTST** | **RGB** **TE**s**T**; | + | | **RGBSNO** | **RGB** **SNO**w; snow effect; optionally takes a hue color (in RGB Hexidecimal, |
| - | | **SETRGB** | **SET** **RGB** configuration; | + | | **RGBTST** | **RGB** **TE**s**T**; |
| + | | **RGBTWK** | **RGB** **TW**in**K**le; | ||
| + | | **RGBWPE** | **RGB** **W**i**PE**; | ||
| + | | **SETRGB** | **SET** **RGB** configuration; | ||
| Line 215: | Line 197: | ||
| | **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 | ||
| - | | **READCONF** | **READ** running **CONF**iguration; | + | | **READCONF** | **READ** running **CONF**iguration; |
| - | | **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., '' | + | | **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 (in minutes, '' | | **SETDISCONNECTEDCOUNT** | **SET** BLE **DISCONNECTED** power off **COUNT**down parameter in NVS and running configuration (in minutes, '' | ||
| | **SETHOLDONSTOP** | **SET** servo **HOLD** is maintained when the servos **STOP** (maintains servo PWM when not moving, default for EarGear 2); returns '' | | **SETHOLDONSTOP** | **SET** servo **HOLD** is maintained when the servos **STOP** (maintains servo PWM when not moving, default for EarGear 2); returns '' | ||
| | **UNSETHOLDONSTOP** | **UNSET** servo **HOLD** when the servos **STOP** (servo PWM is dropped when not moving, default for tail-based devices); returns '' | | **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., '' | + | | **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., '' |
| | **SETLISTENMOVES** | **SET** internal **LISTEN** Mode **MOVES** to play on a listen event in addition to sending event notifications; | | **SETLISTENMOVES** | **SET** internal **LISTEN** Mode **MOVES** to play on a listen event in addition to sending event notifications; | ||
| | **UNSETLISTENMOVES** | **UNSET** internal **LISTEN** Mode **MOVES** to play on a listen event, only an event notification will be sent and it is the responsibility of the connected application to send commands to react to events; returns '' | | **UNSETLISTENMOVES** | **UNSET** internal **LISTEN** Mode **MOVES** to play on a listen event, only an event notification will be sent and it is the responsibility of the connected application to send commands to react to events; returns '' | ||
| + | | **SETMYCOLOR** | **SET** **MYCOLOR** (in RGB Hexidecimal) to persist in app UI display for this device (e.g., '' | ||
| | **SETTILTMOVES** | **SET** internal **LISTEN** Mode **MOVES** to play on a tilt event in addition to sending event notifications; | | **SETTILTMOVES** | **SET** internal **LISTEN** Mode **MOVES** to play on a tilt event in addition to sending event notifications; | ||
| | **UNSETTILTMOVES** | **UNSET** internal **LISTEN** Mode **MOVES** to play on a listen event, only an event notification will be sent and it is the responsibility of the connected application to send commands to react to events; returns '' | | **UNSETTILTMOVES** | **UNSET** internal **LISTEN** Mode **MOVES** to play on a listen event, only an event notification will be sent and it is the responsibility of the connected application to send commands to react to events; returns '' | ||
| | **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., '' | ||
| | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds), returns '' | | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds), returns '' | ||
| - | | **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**; returns '' | | **REBOOT** | **REBOOT**; returns '' | ||
| | **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 of remaining stack space that was available to the task since the task started executing (high water mark), returns '' | ||
| Line 253: | Line 236: | ||
| * Parameters can be separated by any character that is not a number or a letter (e.g., space, comma, semicolon). However, the letters themselves act as separators, and it is recommended that no additional characters are used, as the serial buffer has a limited capacity and may not be able to store the whole instruction. | * Parameters can be separated by any character that is not a number or a letter (e.g., space, comma, semicolon). However, the letters themselves act as separators, and it is recommended that no additional characters are used, as the serial buffer has a limited capacity and may not be able to store the whole instruction. | ||
| * Depending on the tail and position, it can sag out of the commanded position when servo power is released at the end of the DSSP move. This may cause a visual defect of jerking back into the previous position when the next move starts. | * Depending on the tail and position, it can sag out of the commanded position when servo power is released at the end of the DSSP move. This may cause a visual defect of jerking back into the previous position when the next move starts. | ||
| - | |||
| ==== DSSP Example ==== | ==== DSSP Example ==== | ||
| Line 300: | Line 282: | ||
| {{: | {{: | ||
| - | |||
| ==== USERMOVE Examples ==== | ==== USERMOVE Examples ==== | ||
| - | |||
| === Example 1 – Slow Wag 1 (same as the '' | === Example 1 – Slow Wag 1 (same as the '' | ||
| Line 321: | Line 301: | ||
| * **L75L75** Position 2 is reached in 75 * 20 ms = 1.5 s; return to Position 1 in the same time | * **L75L75** Position 2 is reached in 75 * 20 ms = 1.5 s; return to Position 1 in the same time | ||
| * **H1** Home at end of move | * **H1** Home at end of move | ||
| - | |||
| === Example 2 – Test Servos === | === Example 2 – Test Servos === | ||
| Line 342: | Line 321: | ||
| Because no easing parameters ('' | Because no easing parameters ('' | ||
| </ | </ | ||
| - | |||
| ==== USERLEDS Examples ==== | ==== USERLEDS Examples ==== | ||
| - | |||
| === Example 1 – Beacon (same as the '' | === Example 1 – Beacon (same as the '' | ||
| Line 371: | Line 348: | ||
| * **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 | ||
| + | |||
| + | |||
| + | ===== Autonomous Mode ===== | ||
| + | |||
| + | Defines a sequence of random moves, selected from any of three groups as below; interval between moves varies randomly | ||
| + | from T1 to T2. | ||
| + | |||
| + | **AUTOMODE G< | ||
| + | |||
| + | The tail will select a random move from the specified group(s), pausing for a random number of seconds between each move (min and max specified by the first and second '' | ||
| + | |||
| + | Autonomous Mode is ended (after completing any ongoing move) if a BLE connection is made. | ||
| + | |||
| + | ^ Group ^ Move Group Name ^ Move List ^ | ||
| + | | 1 | Calm and Relaxed | Slow Wag 1, Slow Wag 2, Slow Wag 3 | | ||
| + | | 2 | Fast and Excited | Fast Wag, Short Wag, Happy Wag, Erect | | ||
| + | | 3 | Frustrated and Tense | Tremble 1, Tremble 2, Tremble Erect, High Wag | | ||
| + | |||
| + | The parameter order is not important, except that the three '' | ||
| + | |||
| + | ^ Prefix | ||
| + | | **G** | Move Group (see table above) | <1 ... 3> | | ||
| + | | **T1** | Minimum random pause between moves in 1-second increments | <1 ... 240> (1 s ... 4 min) | | ||
| + | | **T2** | Maximum random pause between moves in 1-second increments | <1 ... 240> (1 s ... 4 min) | | ||
| + | | **T3** | Total duration in 15-second increments | <1 ... 240> (15 s ... 60 min); <251 ... 254> are reserved, see [[en: | ||
| + | |||
| + | **STOPAUTO** | ||
| + | |||
| + | '' | ||
| Line 383: | Line 389: | ||
| <WRAP round important 90%> | <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.</ | 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) ==== | ||
| Line 392: | Line 396: | ||
| The device will then reboot after 3 seconds. Conference Mode is then enabled, and pairing proceeds. The user's phone (or other device) will prompt for the passkey (which was set earlier), and the bond will be established on both devices. After that, the passkey or a previous bond (up to 3 can be stored) will be required to connect to the device. | The device will then reboot after 3 seconds. Conference Mode is then enabled, and pairing proceeds. The user's phone (or other device) will prompt for the passkey (which was set earlier), and the bond will be established on both devices. After that, the passkey or a previous bond (up to 3 can be stored) will be required to connect to the device. | ||
| - | |||
| ==== Disabling Conference Mode ==== | ==== Disabling Conference Mode ==== | ||
| Line 400: | Line 403: | ||
| **STOPPUSSKEY** | **STOPPUSSKEY** | ||
| - | The device will then reboot after 3 seconds. If the bond needs to be removed or reset, see [[en: | + | The device will then reboot after 3 seconds. If the bond needs to be removed or reset, see [[en: |
| - | ==== Unbinding | + | ==== Unbinding ==== |
| Resetting/ | Resetting/ | ||
| Line 410: | Line 412: | ||
| * 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. | ||
| - At approximately 3 seconds, the blue LED will flash three times and turn off. Continue to hold without releasing the button. If you wish to cancel the factory reset, release at any time before the next step and the device will power off. | - At approximately 3 seconds, the blue LED will flash three times and turn off. Continue to hold without releasing the button. If you wish to cancel the factory reset, release at any time before the next step and the device will power off. | ||
| Line 422: | Line 424: | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== iOS Casual Mode ===== | ||
| + | |||
| + | <WRAP round todo 90%> | ||
| + | This feature is pending removal in a future release. | ||
| + | </ | ||
| + | |||
| + | Because the CRUMPET application is not currently permitted to manage the tail while the iOS application is in the background, the application uses the '' | ||
| + | |||
| + | **AUTOMODEG1 | ||
| + | |||
| + | Note that the '' | ||
| + | |||
| + | Important! The minimum random pause cannot be less that 15 seconds. | ||
| + | |||
| + | ==== iOS Casual Mode Example ==== | ||
| + | |||
| + | **AUTOMODE T15T60T240 G1G2** | ||
| + | |||
| + | * **T15** 15-second minimum random pause between moves | ||
| + | * **T60** 60-second (1 minute) maximum random pause between moves | ||
| + | * **T240** 3600-second (240 * 15 = 3600 s = 1 hour) total duration of Autonomous Mode | ||
| + | * **G1G2** Randomly select a move from groups 1 and 2 | ||
| Line 438: | Line 464: | ||
| ===== No-phone Mode ===== | ===== No-phone Mode ===== | ||
| - | Perform random moves while disconnected from a BLE client, selected from any of three groups as below; interval between moves varies randomly from T1 to T2. This feature is comparable to Casual Mode in the app. | + | No-phone mode is a feature exclusive |
| - | **AUTOMODE G< | + | **AUTOMODE G< |
| - | + | ||
| - | The tail will select a random move from the specified group(s), pausing for a random number of seconds between each move (min and max specified by the first and second '' | + | |
| - | + | ||
| - | No-phone Mode is suspended (after completing any ongoing move) if a BLE connection is made. It will resume after BLE is disconnected. | + | |
| - | + | ||
| - | ^ Group ^ Move Group Name ^ Move List ^ | + | |
| - | | 1 | Calm and Relaxed | Slow Wag 1, Slow Wag 2, Slow Wag 3 | | + | |
| - | | 2 | Fast and Excited | Fast Wag, Short Wag, Happy Wag, Erect | | + | |
| - | | 3 | Frustrated and Tense | Tremble 1, Tremble 2, Tremble Erect, High Wag | | + | |
| - | + | ||
| - | The parameter order is not important, except that the three '' | + | |
| - | + | ||
| - | ^ Prefix | + | |
| - | | **G** | Move Group (see table above) | <1 ... 3> | | + | |
| - | | **T1** | Minimum random pause between moves in 1-second increments | <1 ... 240> (1 s ... 4 min) | | + | |
| - | | **T2** | Maximum random pause between moves in 1-second increments | <1 ... 240> (1 s ... 4 min) | | + | |
| - | | **T3** | Delay to wait for BLE connection before starting NPM | <25**1** ... 25**4**> (1 ... 4 min) | | + | |
| No-phone Mode (NPM) will cause the tail to delay one to four minutes (based on the setting of the third '' | No-phone Mode (NPM) will cause the tail to delay one to four minutes (based on the setting of the third '' | ||
| Line 466: | Line 475: | ||
| Stops No-phone mode and disables it in NVS configuration. | Stops No-phone mode and disables it in NVS configuration. | ||
| - | |||
| - | |||
| - | ==== No-phone Mode Example ==== | ||
| - | |||
| - | **AUTOMODE T15T60T243 G1G2** | ||
| - | |||
| - | * **T15** 15-second minimum random pause between moves | ||
| - | * **T60** 60-second (1 minute) maximum random pause between moves | ||
| - | * **T240** 3600-second (240 * 15 = 3600 s = 1 hour) total duration of Autonomous Mode | ||
| - | * **G1G2** Randomly select a move from groups 1 and 2 | ||
