Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dev:tailcontrol-command-protocol [2025/05/26 15:27] – [MiTail Mini-only Commands] darkgrueen:dev:tailcontrol-command-protocol [2025/06/21 14:27] (current) – [Conference Mode] darkgrue
Line 100: Line 100:
  
  
-===== Tail Moves =====+===== Move Commands =====
  
 Move commands return ''<movename> BEGIN'' upon start, and '' <movename> END'' upon completion. If the move is set to return home after completion (all firmware moves are), then it will be immediately followed by a ''TAILHM BEGIN'' and a ''TAILHM END'' as well. Move commands return ''<movename> BEGIN'' upon start, and '' <movename> END'' upon completion. If the move is set to return home after completion (all firmware moves are), then it will be immediately followed by a ''TAILHM BEGIN'' and a ''TAILHM END'' as well.
Line 152: Line 152:
 ===== EarGear 2-only Commands ===== ===== EarGear 2-only Commands =====
  
-| **LISTENMODE** (or **LISTEN FULL**) | Starts Listen Mode[[#Listen Mode|see below]], returns ''OK''+| **LISTENMODE** (or **LISTEN FULL**) | Starts Listen Mode ([[#Listen Mode|see below]]), returns ''OK''
-| **STOPLISTEN** (or **ENDLISTEN**) | Stops Listen Mode[[#Listen Mode|see below]], returns ''OK''+| **STOPLISTEN** (or **ENDLISTEN**) | Stops Listen Mode ([[#Listen Mode|see below]]), returns ''OK''
-| **STOPTILT** (or **ENDTILTMODE**) | Stops Tilt Mode[[#Tilt Mode|see below]], returns ''OK''+| **STOPTILT** (or **ENDTILTMODE**) | Stops Tilt Mode ([[#Tilt Mode|see below]]), returns ''OK''
-| **TILTMODE** (or **TILTMODE START**) | Starts Tilt Mode[[#Tilt Mode|see below]], returns ''OK'' |+| **TILTMODE** (or **TILTMODE START**) | Starts Tilt Mode ([[#Tilt Mode|see below]]), returns ''OK'' |
  
 ===== RGB LED Commands ===== ===== RGB LED Commands =====
  
 | **RGBOFF** | **RGB** LEDs **OFF**, returns ''OK'' | | **RGBOFF** | **RGB** LEDs **OFF**, returns ''OK'' |
- 
 | **RGBRBO** | **RGB** **R**ain**B**ow pattern, returns ''OK'' | | **RGBRBO** | **RGB** **R**ain**B**ow pattern, returns ''OK'' |
 | **RGBRB2** | **RGB** **R**ain**B**ow pattern with random sparkly glitter, returns ''OK'' | | **RGBRB2** | **RGB** **R**ain**B**ow pattern with random sparkly glitter, returns ''OK'' |
Line 167: Line 166:
 | **RGBJUG** | **RGB** **JUG**gle; eight colored dots, weaving in and out of sync with each other, returns ''OK'' | | **RGBJUG** | **RGB** **JUG**gle; eight colored dots, weaving in and out of sync with each other, returns ''OK'' |
 | **RGBBPM** | **RGB** **BPM**; colored stripes pulsing at a defined Beats-Per-Minute, returns ''OK'' | | **RGBBPM** | **RGB** **BPM**; colored stripes pulsing at a defined Beats-Per-Minute, returns ''OK'' |
 +| **RGBDMO** | **RGB** **DE**m**O**; cycle through all the preceding patterns, changing every 10 seconds, returns ''OK'' |
 +| **RGBTST** | **RGB** **TE**s**T**; color cycle the first and last pixel of the RGB string (endpoints test), returns ''OK'' |
 +| **SETRGB** | **SET** **RGB** configuration and restart after 3 seconds; (e.g., ''SETRGB 325 12 2900''), returns ''OK'' [''numRGBLEDs'' ''maxRGBVolt'' ''maxRGBmAmp''] |
 +
 ===== Other Commands ===== ===== Other Commands =====
  
-| **AUTOMODE** | **AUTO**nomous **MO**de[[#Autonomous Mode|see below]], returns ''OK''+| **AUTOMODE** | **AUTO**nomous **MO**de ([[#Autonomous Mode|see below]]), returns ''OK''
-| **DSSP** | **D**irectly **S**et **S**ervo **P**osition[[#Directly Set Servo Position|see below]], returns ''OK'' |+| **DSSP** | **D**irectly **S**et **S**ervo **P**osition ([[#Directly Set Servo Position|see below]]), returns ''OK'' |
 | **HWVER** | Returns **H**ard**W**are **VER**sion; returns ''HWVER LEGACY MITAIL'' or ''HWVER MITAIL x.x'' for tail-series controller hardware, ''HWVER EG2 x.x'' for EarGear 2 controller hardware | | **HWVER** | Returns **H**ard**W**are **VER**sion; returns ''HWVER LEGACY MITAIL'' or ''HWVER MITAIL x.x'' for tail-series controller hardware, ''HWVER EG2 x.x'' for EarGear 2 controller hardware |
 | **PING** | Keepalive heartbeat (from application), returns ''PONG'' | | **PING** | Keepalive heartbeat (from application), returns ''PONG'' |
-| **SETPUSSKEY** | **SET** **P**a**SSKEY**, enable Conference Mode, and restart after 3 seconds[[#Conference Mode|see below]], returns ''OK'' |+| **SETPUSSKEY** | **SET** **P**a**SSKEY**, enable Conference Mode, and restart after 3 seconds ([[#Conference Mode|see below]]), returns ''OK'' |
 | **SHUTDOWN** | **SHUT DOWN** the unit (will lose the BLE connection), returns ''SHUTDOWN BEGIN'' or ''ERR'' if charger is attached | | **SHUTDOWN** | **SHUT DOWN** the unit (will lose the BLE connection), returns ''SHUTDOWN BEGIN'' or ''ERR'' if charger is attached |
 | **STOPAUTO** | **STOP AUTO**nomous Mode, returns ''OK'', followed by ''AUTO END'' | | **STOPAUTO** | **STOP AUTO**nomous Mode, returns ''OK'', followed by ''AUTO END'' |
 | **STOPNPM** | **STOP** **N**o-**P**hone **M**ode and disables it in NVS configuration; returns ''OK'', followed by ''AUTO END'' | | **STOPNPM** | **STOP** **N**o-**P**hone **M**ode and disables it in NVS configuration; returns ''OK'', followed by ''AUTO END'' |
-| **USERMOVE** | [[#User-defined Tail Moves and LEDs Patterns|See below]], returns ''OK''+| **USERMOVE** | Set user-defined move ([[#User-defined Moves and Glow Tip Patterns|see below]]), returns ''OK''
-| **STOPPUSSKEY** | **STOP** **P**a**SSKEY**, disable Conference Mode and restart after 3 seconds[[#Conference Mode|see below]], returns ''OK''+| **STOPPUSSKEY** | **STOP** **P**a**SSKEY**, disable Conference Mode and restart after 3 seconds ([[#Conference Mode|see below]]), returns ''OK''
-| **USERLEDS** | [[#User-defined Tail Moves and LEDs Patterns|See below]], returns ''OK'' |+| **USERLEDS** | Set user-defined Glow Tip pattern ([[#User-defined Moves and Glow Tip Patterns|see below]]), returns ''OK'' |
 | **VER** | Returns the firmware **VER**sion number; ''VER x.x.x''; followed by a line that is either ''GLOWTIP TRUE'' if a Glow Tip is connected, or ''GLOWTIP FALSE'' if one is not; and a final line that is either ''RGB TRUE'' if a RGB LED strip is connected, or ''RGB FALSE'' if it is not | | **VER** | Returns the firmware **VER**sion number; ''VER x.x.x''; followed by a line that is either ''GLOWTIP TRUE'' if a Glow Tip is connected, or ''GLOWTIP FALSE'' if one is not; and a final line that is either ''RGB TRUE'' if a RGB LED strip is connected, or ''RGB FALSE'' if it is not |
  
Line 186: Line 189:
  
 | **BATT** | **BATT**ery percentage, returns the integer value of estimated battery capacity remaining  (e.g., ''61'') | | **BATT** | **BATT**ery percentage, returns the integer value of estimated battery capacity remaining  (e.g., ''61'') |
 +| **READCONF** | **READ** running **CONF**iguration; returns space-delimited running configuration parameters (e.g., ''READCONF 1 5 0 15 40 3 8 0 0 1 3 0 1 0 1 1 495974 325 12 2900'') [''ver'' ''minsToSleep'' ''minsToNPM'' ''minNPMPauseSec'' ''maxNPMPauseSec'' ''groupsNPM'' ''servo1home'' ''servo2home'' ''listenModeNPMEnabled'' ''listenModeResponseOnly'' ''groupsLM'' ''tiltModeNPMEnabled'' ''tiltModeResponseOnly'' ''disconnectedCountdownEnabled'' ''homeOnAppPoweroff'' ''conferenceModeEnabled'' ''securityPasskey'' ''numRGBLEDs'' ''maxRGBVolt'' ''maxRGBmAmp''] |
 +| **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., ''WRITECONF 1 5 0 15 40 3 8 0 0 1 3 0 1 0 1 1 495974 325 12 2900''), returns ''OK'' [''ver'' ''minsToSleep'' ''minsToNPM'' ''minNPMPauseSec'' ''maxNPMPauseSec'' ''groupsNPM'' ''servo1home'' ''servo2home'' ''listenModeNPMEnabled'' ''listenModeResponseOnly'' ''groupsLM'' ''tiltModeNPMEnabled'' ''tiltModeResponseOnly'' ''disconnectedCountdownEnabled'' ''homeOnAppPoweroff'' ''conferenceModeEnabled'' ''securityPasskey'' ''numRGBLEDs'' ''maxRGBVolt'' ''maxRGBmAmp''] |
 +| **SETDISCONNECTEDCOUNT** | **SET** BLE **DISCONNECTED** power off **COUNT**down parameter in NVS and running configuration (in minutes, ''SETDISCONNECTEDCOUNT 0'' disables automatic poweroff), returns ''OK'' |
 +| **SETHOLDONSTOP** | **SET** servo **HOLD** is maintained when the servos **STOP** (maintains servo PWM when not moving, default for EarGear 2); returns ''OK'' |
 +| **UNSETHOLDONSTOP** | **UNSET** servo **HOLD** when the servos **STOP** (servo PWM is dropped when not moving, default for tail-based devices); returns ''OK'' |
 +| **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., ''SETHOME 4 4''), NOTE: only available on FlutterWings, and EarGear 2; returns ''OK'' |
 +| **OTA** | Starts firmware **O**ver **T**he **A**ir update process (e.g., ''OTA <expected size in bytes> <expected MD5>''); returns ''BEGIN OTA'' or ''ERR'' on failure to start, ''OTA SUCCESS'' on success, or ''OTA ERR'' on error during OTA process |
 | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds) and reboot | | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds) and reboot |
-| **OTA** | Starts firmware **O**ver **T**he **A**ir update process (e.g., ''OTA <expected size in bytes> <expected MD5>''); returns ''BEGIN OTA'' or ''ERR'' on failure to start, ''OTA SUCCESS'' on success, or ''OTA ERR'' on error during OTA process | +| **READNVS** | **READ** **CONF**iguration from NVS; returns space-delimited configuration parameters stored in NVS (e.g., ''READNVS 1 5 0 15 40 3 8 0 0 3 0 1 0 1 1 495974 325 12 2900'') [''ver'' ''minsToSleep'' ''minsToNPM'' ''minNPMPauseSec'' ''maxNPMPauseSec'' ''groupsNPM'' ''servo1home'' ''servo2home'' ''listenModeNPMEnabled'' ''listenModeResponseOnly'' ''groupsLM'' ''tiltModeNPMEnabled'' ''tiltModeResponseOnly'' ''disconnectedCountdownEnabled'' ''homeOnAppPoweroff'' ''conferenceModeEnabled'' ''securityPasskey'' ''numRGBLEDs'' ''maxRGBVolt'' ''maxRGBmAmp''] |
-| **READCONF** | **READ** running **CONF**iguration; returns space-delimited running configuration parameters (e.g., ''READCONF 1 5 0 15 40 3 8 0 0 0 0 0 1 0 123456'') [''ver'' ''minsToSleep'' ''minsToNPM'' ''minNPMPauseSec'' ''maxNPMPauseSec'' ''groupsNPM'' ''servo1home'' ''servo2home'' ''listenModeNPMEnabled'' ''listenModeResponseOnly'' ''groupsLM'' ''tiltModeNPMEnabled'' ''tiltModeResponseOnly'' ''disconnectedCountdownEnabled'' ''homeOnAppPoweroff'' ''conferenceModeEnabled'' ''securityPasskey''] | +
-| **READNVS** | **READ** **CONF**iguration from NVS; returns space-delimited configuration parameters stored in NVS (e.g., ''READNVS 1 5 0 15 40 3 8 0 0 0 3 0 0 0 1 0 123456'') [''ver'' ''minsToSleep'' ''minsToNPM'' ''minNPMPauseSec'' ''maxNPMPauseSec'' ''groupsNPM'' ''servo1home'' ''servo2home'' ''listenModeNPMEnabled'' ''listenModeResponseOnly'' ''groupsLM'' ''tiltModeNPMEnabled'' ''tiltModeResponseOnly'' ''disconnectedCountdownEnabled'' ''homeOnAppPoweroff'' ''conferenceModeEnabled'' ''securityPasskey''] |+
 | **REBOOT** | **REBOOT** after 3 seconds, returns ''OK'' | | **REBOOT** | **REBOOT** after 3 seconds, returns ''OK'' |
-| **RELEASEHOLDONSTOP** | **RELEASE** servo **HOLD** when the servos **STOP** (default for tail-based devices); returns ''OK''+| **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 ''OK'' |
-| **SETHOLDONSTOP** | **SET** servo **HOLD** is maintained when the servos **STOP** (default for EarGear 2); returns ''OK'''+
-| **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., ''SETHOME 4 4''), NOTE: only available on FlutterWings, and EarGear 2; returns ''OK''+
-| **TASKU** | Prints to the hardware serial console the minimum amount in words of remaining stack space that was available to the task since the task started executing, returns ''OK''+
-| **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., ''WRITECONF 1 5 0 15 40 3 8 0 0 0 3 0 0 0 1 0 123456''), returns ''OK'' [''ver'' ''minsToSleep'' ''minsToNPM'' ''minNPMPauseSec'' ''maxNPMPauseSec'' ''groupsNPM'' ''servo1home'' ''servo2home'' ''listenModeNPMEnabled'' ''listenModeResponseOnly'' ''groupsLM'' ''tiltModeNPMEnabled'' ''tiltModeResponseOnly'' ''disconnectedCountdownEnabled'' ''homeOnAppPoweroff'' ''conferenceModeEnabled'' ''securityPasskey''| +
 ===== Directly Set Servo Position ===== ===== Directly Set Servo Position =====
  
Line 225: Line 228:
  
  
-===== User-defined Tail Moves and LEDs Patterns =====+===== 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 ''TAILU1'' ... ''TAILU4'' commands). These presets will be lost once the unit is powered off. presets (callable with the ''TAILU1'' ... ''TAILU4'' commands). These presets will be lost once the unit is powered off.
  
-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 (''USERMOVE'' or ''USERLEDS'') followed by a number of parameters. These are letter-number pairs, where the letter keyword (''USERMOVE'' or ''USERLEDS'') followed by a number of parameters. These are letter-number pairs, where the letter
 defines the type of parameter (see table, below). defines the type of parameter (see table, below).
Line 369: 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.</WRAP>
 ==== Enabling Conference Mode (Pairing and Binding) ==== ==== Enabling Conference Mode (Pairing and Binding) ====
  
Line 398: 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 will no longer be valid).+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 are no longer valid).
  
   * On Android, enter Settings, Connections, Bluetooth and find the device to remove (e.g., "mitail"). Select the gear icon, and then select "Unpair". Confirm the dialog to unpair and forget the device.   * On Android, enter Settings, Connections, Bluetooth and find the device to remove (e.g., "mitail"). Select the gear icon, and then select "Unpair". Confirm the dialog to unpair and forget the device.
Back to top