MSP Command Reference
This page provides a complete reference of all MSP command codes used by Betaflight.
Command Code Constants
/// MSP Protocol & System Info (0-10)
pub const MSP_API_VERSION: u8 = 1;
pub const MSP_FC_VARIANT: u8 = 2;
pub const MSP_FC_VERSION: u8 = 3;
pub const MSP_BOARD_INFO: u8 = 4;
pub const MSP_BUILD_INFO: u8 = 5;
pub const MSP_NAME: u8 = 10;
pub const MSP_SET_NAME: u8 = 11;
/// MSP Configuration (32-62)
pub const MSP_BATTERY_CONFIG: u8 = 32;
pub const MSP_SET_BATTERY_CONFIG: u8 = 33;
pub const MSP_MODE_RANGES: u8 = 34;
pub const MSP_SET_MODE_RANGE: u8 = 35;
pub const MSP_FEATURE_CONFIG: u8 = 36;
pub const MSP_SET_FEATURE_CONFIG: u8 = 37;
pub const MSP_BOARD_ALIGNMENT_CONFIG: u8 = 38;
pub const MSP_SET_BOARD_ALIGNMENT_CONFIG: u8 = 39;
pub const MSP_CURRENT_METER_CONFIG: u8 = 40;
pub const MSP_SET_CURRENT_METER_CONFIG: u8 = 41;
pub const MSP_MIXER_CONFIG: u8 = 42;
pub const MSP_SET_MIXER_CONFIG: u8 = 43;
pub const MSP_RX_CONFIG: u8 = 44;
pub const MSP_SET_RX_CONFIG: u8 = 45;
pub const MSP_LED_COLORS: u8 = 46;
pub const MSP_SET_LED_COLORS: u8 = 47;
pub const MSP_LED_STRIP_CONFIG: u8 = 48;
pub const MSP_SET_LED_STRIP_CONFIG: u8 = 49;
pub const MSP_RSSI_CONFIG: u8 = 50;
pub const MSP_SET_RSSI_CONFIG: u8 = 51;
pub const MSP_ADJUSTMENT_RANGES: u8 = 52;
pub const MSP_SET_ADJUSTMENT_RANGE: u8 = 53;
pub const MSP_CF_SERIAL_CONFIG: u8 = 54;
pub const MSP_SET_CF_SERIAL_CONFIG: u8 = 55;
pub const MSP_VOLTAGE_METER_CONFIG: u8 = 56;
pub const MSP_SET_VOLTAGE_METER_CONFIG: u8 = 57;
pub const MSP_SONAR_ALTITUDE: u8 = 58;
pub const MSP_PID_CONTROLLER: u8 = 59;
pub const MSP_SET_PID_CONTROLLER: u8 = 60;
pub const MSP_ARMING_CONFIG: u8 = 61;
pub const MSP_SET_ARMING_CONFIG: u8 = 62;
/// MSP Data & Storage (64-99)
pub const MSP_RX_MAP: u8 = 64;
pub const MSP_SET_RX_MAP: u8 = 65;
pub const MSP_REBOOT: u8 = 68;
pub const MSP_DATAFLASH_SUMMARY: u8 = 70;
pub const MSP_DATAFLASH_READ: u8 = 71;
pub const MSP_DATAFLASH_ERASE: u8 = 72;
pub const MSP_FAILSAFE_CONFIG: u8 = 75;
pub const MSP_SET_FAILSAFE_CONFIG: u8 = 76;
pub const MSP_RXFAIL_CONFIG: u8 = 77;
pub const MSP_SET_RXFAIL_CONFIG: u8 = 78;
pub const MSP_SDCARD_SUMMARY: u8 = 79;
pub const MSP_BLACKBOX_CONFIG: u8 = 80;
pub const MSP_SET_BLACKBOX_CONFIG: u8 = 81;
pub const MSP_TRANSPONDER_CONFIG: u8 = 82;
pub const MSP_SET_TRANSPONDER_CONFIG: u8 = 83;
pub const MSP_OSD_CONFIG: u8 = 84;
pub const MSP_SET_OSD_CONFIG: u8 = 85;
pub const MSP_OSD_CHAR_READ: u8 = 86;
pub const MSP_OSD_CHAR_WRITE: u8 = 87;
pub const MSP_VTX_CONFIG: u8 = 88;
pub const MSP_SET_VTX_CONFIG: u8 = 89;
pub const MSP_ADVANCED_CONFIG: u8 = 90;
pub const MSP_SET_ADVANCED_CONFIG: u8 = 91;
pub const MSP_FILTER_CONFIG: u8 = 92;
pub const MSP_SET_FILTER_CONFIG: u8 = 93;
pub const MSP_PID_ADVANCED: u8 = 94;
pub const MSP_SET_PID_ADVANCED: u8 = 95;
pub const MSP_SENSOR_CONFIG: u8 = 96;
pub const MSP_SET_SENSOR_CONFIG: u8 = 97;
pub const MSP_CAMERA_CONTROL: u8 = 98;
pub const MSP_SET_ARMING_DISABLED: u8 = 99;
/// MSP Telemetry & Status (101-166)
pub const MSP_STATUS: u8 = 101;
pub const MSP_RAW_IMU: u8 = 102;
pub const MSP_SERVO: u8 = 103;
pub const MSP_MOTOR: u8 = 104;
pub const MSP_RC: u8 = 105;
pub const MSP_RAW_GPS: u8 = 106;
pub const MSP_COMP_GPS: u8 = 107;
pub const MSP_ATTITUDE: u8 = 108;
pub const MSP_ALTITUDE: u8 = 109;
pub const MSP_ANALOG: u8 = 110;
pub const MSP_RC_TUNING: u8 = 111;
pub const MSP_PID: u8 = 112;
pub const MSP_BOXNAMES: u8 = 116;
pub const MSP_PIDNAMES: u8 = 117;
pub const MSP_WP: u8 = 118;
pub const MSP_BOXIDS: u8 = 119;
pub const MSP_SERVO_CONFIGURATIONS: u8 = 120;
pub const MSP_NAV_STATUS: u8 = 121;
pub const MSP_NAV_CONFIG: u8 = 122;
pub const MSP_MOTOR_3D_CONFIG: u8 = 124;
pub const MSP_RC_DEADBAND: u8 = 125;
pub const MSP_SENSOR_ALIGNMENT: u8 = 126;
pub const MSP_LED_STRIP_MODECOLOR: u8 = 127;
pub const MSP_VOLTAGE_METERS: u8 = 128;
pub const MSP_CURRENT_METERS: u8 = 129;
pub const MSP_BATTERY_STATE: u8 = 130;
pub const MSP_MOTOR_CONFIG: u8 = 131;
pub const MSP_GPS_CONFIG: u8 = 132;
pub const MSP_COMPASS_CONFIG: u8 = 133;
pub const MSP_ESC_SENSOR_DATA: u8 = 134;
pub const MSP_GPS_RESCUE: u8 = 135;
pub const MSP_GPS_RESCUE_PIDS: u8 = 136;
pub const MSP_VTXTABLE_BAND: u8 = 137;
pub const MSP_VTXTABLE_POWERLEVEL: u8 = 138;
pub const MSP_MOTOR_TELEMETRY: u8 = 139;
pub const MSP_SIMPLIFIED_TUNING: u8 = 140;
pub const MSP_SET_SIMPLIFIED_TUNING: u8 = 141;
pub const MSP_STATUS_EX: u8 = 150;
pub const MSP_UID: u8 = 160;
pub const MSP_GPSSVINFO: u8 = 164;
pub const MSP_GPSSTATISTICS: u8 = 166;
/// MSP OSD & Display (180-189)
pub const MSP_OSD_VIDEO_CONFIG: u8 = 180;
pub const MSP_SET_OSD_VIDEO_CONFIG: u8 = 181;
pub const MSP_DISPLAYPORT: u8 = 182;
pub const MSP_COPY_PROFILE: u8 = 183;
pub const MSP_BEEPER_CONFIG: u8 = 184;
pub const MSP_SET_BEEPER_CONFIG: u8 = 185;
pub const MSP_SET_TX_INFO: u8 = 186;
pub const MSP_TX_INFO: u8 = 187;
/// MSP Control Commands (200-229)
pub const MSP_SET_RAW_RC: u8 = 200;
pub const MSP_SET_RAW_GPS: u8 = 201;
pub const MSP_SET_PID: u8 = 202;
pub const MSP_SET_RC_TUNING: u8 = 204;
pub const MSP_ACC_CALIBRATION: u8 = 205;
pub const MSP_MAG_CALIBRATION: u8 = 206;
pub const MSP_RESET_CONF: u8 = 208;
pub const MSP_SET_WP: u8 = 209;
pub const MSP_SELECT_SETTING: u8 = 210;
pub const MSP_SET_HEADING: u8 = 211;
pub const MSP_SET_SERVO_CONFIGURATION: u8 = 212;
pub const MSP_SET_MOTOR: u8 = 214;
pub const MSP_SET_NAV_CONFIG: u8 = 215;
pub const MSP_SET_MOTOR_3D_CONFIG: u8 = 217;
pub const MSP_SET_RC_DEADBAND: u8 = 218;
pub const MSP_SET_RESET_CURR_PID: u8 = 219;
pub const MSP_SET_SENSOR_ALIGNMENT: u8 = 220;
pub const MSP_SET_LED_STRIP_MODECOLOR: u8 = 221;
pub const MSP_SET_MOTOR_CONFIG: u8 = 222;
pub const MSP_SET_GPS_CONFIG: u8 = 223;
pub const MSP_SET_COMPASS_CONFIG: u8 = 224;
pub const MSP_SET_GPS_RESCUE: u8 = 225;
pub const MSP_SET_GPS_RESCUE_PIDS: u8 = 226;
pub const MSP_SET_VTXTABLE_BAND: u8 = 227;
pub const MSP_SET_VTXTABLE_POWERLEVEL: u8 = 228;
/// MSP Utility & Debug (230-255)
pub const MSP_MULTIPLE_MSP: u8 = 230;
pub const MSP_MODE_RANGES_EXTRA: u8 = 238;
pub const MSP_SET_ACC_TRIM: u8 = 239;
pub const MSP_ACC_TRIM: u8 = 240;
pub const MSP_SERVO_MIX_RULES: u8 = 241;
pub const MSP_SET_SERVO_MIX_RULE: u8 = 242;
pub const MSP_SET_PASSTHROUGH: u8 = 245;
pub const MSP_SET_RTC: u8 = 246;
pub const MSP_RTC: u8 = 247;
pub const MSP_SET_BOARD_INFO: u8 = 248;
pub const MSP_SET_SIGNATURE: u8 = 249;
pub const MSP_EEPROM_WRITE: u8 = 250;
pub const MSP_DEBUGMSG: u8 = 253;
pub const MSP_DEBUG: u8 = 254;
pub const MSP_V2_FRAME: u8 = 255;
Complete Command Table
Protocol & System Info (0-10)
| Code | Command | Direction | Description |
|---|---|---|---|
| 1 | MSP_API_VERSION | GET | Protocol and API version |
| 2 | MSP_FC_VARIANT | GET | Flight controller identifier (4 chars) |
| 3 | MSP_FC_VERSION | GET | Firmware version (major.minor.patch) |
| 4 | MSP_BOARD_INFO | GET | Board identifier and hardware revision |
| 5 | MSP_BUILD_INFO | GET | Build date, git hash, compiler |
| 10 | MSP_NAME | GET | Craft/pilot name |
| 11 | MSP_SET_NAME | SET | Configure craft/pilot name |
Configuration (32-62)
| Code | Command | Direction | Description |
|---|---|---|---|
| 32 | MSP_BATTERY_CONFIG | GET | Battery parameters |
| 33 | MSP_SET_BATTERY_CONFIG | SET | Configure battery settings |
| 34 | MSP_MODE_RANGES | GET | Flight mode activation ranges |
| 35 | MSP_SET_MODE_RANGE | SET | Set mode activation range |
| 36 | MSP_FEATURE_CONFIG | GET | Feature flags bitmask |
| 37 | MSP_SET_FEATURE_CONFIG | SET | Enable/disable features |
| 38 | MSP_BOARD_ALIGNMENT_CONFIG | GET | Board orientation settings |
| 39 | MSP_SET_BOARD_ALIGNMENT_CONFIG | SET | Set board alignment |
| 40 | MSP_CURRENT_METER_CONFIG | GET | Current sensor config |
| 41 | MSP_SET_CURRENT_METER_CONFIG | SET | Configure current meter |
| 42 | MSP_MIXER_CONFIG | GET | Mixer/frame type settings |
| 43 | MSP_SET_MIXER_CONFIG | SET | Configure mixer |
| 44 | MSP_RX_CONFIG | GET | Receiver configuration |
| 45 | MSP_SET_RX_CONFIG | SET | Configure receiver |
| 46 | MSP_LED_COLORS | GET | LED color palette |
| 47 | MSP_SET_LED_COLORS | SET | Configure LED colors |
| 48 | MSP_LED_STRIP_CONFIG | GET | LED strip configuration |
| 49 | MSP_SET_LED_STRIP_CONFIG | SET | Configure LED strip |
| 50 | MSP_RSSI_CONFIG | GET | RSSI channel/source config |
| 51 | MSP_SET_RSSI_CONFIG | SET | Configure RSSI |
| 52 | MSP_ADJUSTMENT_RANGES | GET | In-flight adjustment ranges |
| 53 | MSP_SET_ADJUSTMENT_RANGE | SET | Set adjustment range |
| 54 | MSP_CF_SERIAL_CONFIG | GET | Serial port configuration |
| 55 | MSP_SET_CF_SERIAL_CONFIG | SET | Configure serial ports |
| 56 | MSP_VOLTAGE_METER_CONFIG | GET | Voltage meter settings |
| 57 | MSP_SET_VOLTAGE_METER_CONFIG | SET | Configure voltage meter |
| 58 | MSP_SONAR_ALTITUDE | GET | Rangefinder/sonar altitude |
| 59 | MSP_PID_CONTROLLER | GET | Current PID controller type |
| 60 | MSP_SET_PID_CONTROLLER | SET | Set PID controller |
| 61 | MSP_ARMING_CONFIG | GET | Arming configuration |
| 62 | MSP_SET_ARMING_CONFIG | SET | Configure arming |
Data & Storage (64-99)
| Code | Command | Direction | Description |
|---|---|---|---|
| 64 | MSP_RX_MAP | GET | RC channel mapping |
| 65 | MSP_SET_RX_MAP | SET | Configure channel mapping |
| 68 | MSP_REBOOT | CMD | Restart flight controller |
| 70 | MSP_DATAFLASH_SUMMARY | GET | Onboard flash status |
| 71 | MSP_DATAFLASH_READ | GET | Read from dataflash |
| 72 | MSP_DATAFLASH_ERASE | CMD | Erase dataflash |
| 75 | MSP_FAILSAFE_CONFIG | GET | Failsafe settings |
| 76 | MSP_SET_FAILSAFE_CONFIG | SET | Configure failsafe |
| 77 | MSP_RXFAIL_CONFIG | GET | Per-channel RX failsafe |
| 78 | MSP_SET_RXFAIL_CONFIG | SET | Set RX failsafe values |
| 79 | MSP_SDCARD_SUMMARY | GET | SD card status |
| 80 | MSP_BLACKBOX_CONFIG | GET | Blackbox/flight log settings |
| 81 | MSP_SET_BLACKBOX_CONFIG | SET | Configure blackbox |
| 82 | MSP_TRANSPONDER_CONFIG | GET | Transponder settings |
| 83 | MSP_SET_TRANSPONDER_CONFIG | SET | Configure transponder |
| 84 | MSP_OSD_CONFIG | GET | OSD configuration |
| 85 | MSP_SET_OSD_CONFIG | SET | Configure OSD |
| 86 | MSP_OSD_CHAR_READ | GET | Read OSD character |
| 87 | MSP_OSD_CHAR_WRITE | SET | Write OSD character |
| 88 | MSP_VTX_CONFIG | GET | Video transmitter settings |
| 89 | MSP_SET_VTX_CONFIG | SET | Configure VTX |
| 90 | MSP_ADVANCED_CONFIG | GET | Advanced settings |
| 91 | MSP_SET_ADVANCED_CONFIG | SET | Configure advanced settings |
| 92 | MSP_FILTER_CONFIG | GET | Gyro/D-term filter settings |
| 93 | MSP_SET_FILTER_CONFIG | SET | Configure filters |
| 94 | MSP_PID_ADVANCED | GET | Advanced PID settings |
| 95 | MSP_SET_PID_ADVANCED | SET | Set advanced PID params |
| 96 | MSP_SENSOR_CONFIG | GET | Sensor configuration |
| 97 | MSP_SET_SENSOR_CONFIG | SET | Configure sensors |
| 98 | MSP_CAMERA_CONTROL | CMD | Camera control command |
| 99 | MSP_SET_ARMING_DISABLED | SET | Disable arming (with reason) |
Telemetry & Status (101-166)
| Code | Command | Direction | Description |
|---|---|---|---|
| 101 | MSP_STATUS | GET | Flight controller status |
| 102 | MSP_RAW_IMU | GET | Raw accelerometer, gyro, magnetometer |
| 103 | MSP_SERVO | GET | Servo PWM outputs |
| 104 | MSP_MOTOR | GET | Motor outputs |
| 105 | MSP_RC | GET | RC channel inputs |
| 106 | MSP_RAW_GPS | GET | Raw GPS coordinates |
| 107 | MSP_COMP_GPS | GET | Computed GPS data |
| 108 | MSP_ATTITUDE | GET | Roll, pitch, yaw angles |
| 109 | MSP_ALTITUDE | GET | Altitude and climb rate |
| 110 | MSP_ANALOG | GET | Battery voltage, current, RSSI |
| 111 | MSP_RC_TUNING | GET | RC rate/expo settings |
| 112 | MSP_PID | GET | PID coefficients |
| 116 | MSP_BOXNAMES | GET | Flight mode names (semicolon-separated) |
| 117 | MSP_PIDNAMES | GET | PID item names |
| 118 | MSP_WP | GET | Waypoint data |
| 119 | MSP_BOXIDS | GET | Flight mode box IDs |
| 120 | MSP_SERVO_CONFIGURATIONS | GET | Servo configurations |
| 121 | MSP_NAV_STATUS | GET | Navigation status |
| 122 | MSP_NAV_CONFIG | GET | Navigation configuration |
| 124 | MSP_MOTOR_3D_CONFIG | GET | 3D/bidirectional motor settings |
| 125 | MSP_RC_DEADBAND | GET | RC deadband settings |
| 126 | MSP_SENSOR_ALIGNMENT | GET | Sensor mounting orientation |
| 127 | MSP_LED_STRIP_MODECOLOR | GET | LED mode and colors |
| 128 | MSP_VOLTAGE_METERS | GET | All voltage meter readings |
| 129 | MSP_CURRENT_METERS | GET | All current meter readings |
| 130 | MSP_BATTERY_STATE | GET | Battery status and health |
| 131 | MSP_MOTOR_CONFIG | GET | Motor configuration |
| 132 | MSP_GPS_CONFIG | GET | GPS settings |
| 133 | MSP_COMPASS_CONFIG | GET | Magnetometer configuration |
| 134 | MSP_ESC_SENSOR_DATA | GET | ESC telemetry (RPM, temp) |
| 135 | MSP_GPS_RESCUE | GET | GPS rescue mode settings |
| 136 | MSP_GPS_RESCUE_PIDS | GET | GPS rescue PID tuning |
| 137 | MSP_VTXTABLE_BAND | GET | VTX frequency table |
| 138 | MSP_VTXTABLE_POWERLEVEL | GET | VTX power levels |
| 139 | MSP_MOTOR_TELEMETRY | GET | Motor telemetry from ESCs |
| 140 | MSP_SIMPLIFIED_TUNING | GET | Simplified tuning settings |
| 141 | MSP_SET_SIMPLIFIED_TUNING | SET | Configure simplified tuning |
| 150 | MSP_STATUS_EX | GET | Extended status |
| 160 | MSP_UID | GET | Unique identifier (MCU serial) |
| 164 | MSP_GPSSVINFO | GET | GPS satellite info |
| 166 | MSP_GPSSTATISTICS | GET | GPS statistics |
OSD & Display (180-189)
| Code | Command | Direction | Description |
|---|---|---|---|
| 180 | MSP_OSD_VIDEO_CONFIG | GET | OSD video output settings |
| 181 | MSP_SET_OSD_VIDEO_CONFIG | SET | Configure OSD video |
| 182 | MSP_DISPLAYPORT | CMD | Display port command |
| 183 | MSP_COPY_PROFILE | CMD | Copy settings between profiles |
| 184 | MSP_BEEPER_CONFIG | GET | Beeper configuration |
| 185 | MSP_SET_BEEPER_CONFIG | SET | Configure beeper |
| 186 | MSP_SET_TX_INFO | SET | Set transmitter info |
| 187 | MSP_TX_INFO | GET | Transmitter information |
Control Commands (200-229)
| Code | Command | Direction | Description |
|---|---|---|---|
| 200 | MSP_SET_RAW_RC | SET | Override RC channels |
| 201 | MSP_SET_RAW_GPS | SET | Inject GPS data |
| 202 | MSP_SET_PID | SET | Write PID coefficients |
| 204 | MSP_SET_RC_TUNING | SET | Write RC tuning |
| 205 | MSP_ACC_CALIBRATION | CMD | Start accelerometer calibration |
| 206 | MSP_MAG_CALIBRATION | CMD | Start magnetometer calibration |
| 208 | MSP_RESET_CONF | CMD | Reset to factory defaults |
| 209 | MSP_SET_WP | SET | Set waypoint |
| 210 | MSP_SELECT_SETTING | SET | Switch profile |
| 211 | MSP_SET_HEADING | SET | Set compass heading |
| 212 | MSP_SET_SERVO_CONFIGURATION | SET | Configure servo |
| 214 | MSP_SET_MOTOR | SET | Set motor PWM directly |
| 215 | MSP_SET_NAV_CONFIG | SET | Configure navigation |
| 217 | MSP_SET_MOTOR_3D_CONFIG | SET | Configure 3D motors |
| 218 | MSP_SET_RC_DEADBAND | SET | Set RC deadband |
| 219 | MSP_SET_RESET_CURR_PID | CMD | Reset current meter |
| 220 | MSP_SET_SENSOR_ALIGNMENT | SET | Set sensor alignment |
| 221 | MSP_SET_LED_STRIP_MODECOLOR | SET | Set LED mode/color |
| 222 | MSP_SET_MOTOR_CONFIG | SET | Configure motors |
| 223 | MSP_SET_GPS_CONFIG | SET | Configure GPS |
| 224 | MSP_SET_COMPASS_CONFIG | SET | Configure compass |
| 225 | MSP_SET_GPS_RESCUE | SET | Configure GPS rescue |
| 226 | MSP_SET_GPS_RESCUE_PIDS | SET | Set GPS rescue PIDs |
| 227 | MSP_SET_VTXTABLE_BAND | SET | Set VTX band table |
| 228 | MSP_SET_VTXTABLE_POWERLEVEL | SET | Set VTX power levels |
Utility & Debug (230-255)
| Code | Command | Direction | Description |
|---|---|---|---|
| 230 | MSP_MULTIPLE_MSP | CMD | Bundle multiple MSP commands |
| 238 | MSP_MODE_RANGES_EXTRA | GET | Additional mode ranges |
| 239 | MSP_SET_ACC_TRIM | SET | Set accelerometer trim |
| 240 | MSP_ACC_TRIM | GET | Read accelerometer trim |
| 241 | MSP_SERVO_MIX_RULES | GET | Servo mixing rules |
| 242 | MSP_SET_SERVO_MIX_RULE | SET | Configure servo mixer |
| 245 | MSP_SET_PASSTHROUGH | CMD | Enable passthrough mode |
| 246 | MSP_SET_RTC | SET | Set real-time clock |
| 247 | MSP_RTC | GET | Read RTC |
| 248 | MSP_SET_BOARD_INFO | SET | Set board info |
| 249 | MSP_SET_SIGNATURE | SET | Set FC signature |
| 250 | MSP_EEPROM_WRITE | CMD | Write settings to EEPROM |
| 253 | MSP_DEBUGMSG | GET | Debug message text |
| 254 | MSP_DEBUG | GET | Debug values (4× int16) |
| 255 | MSP_V2_FRAME | — | MSPv2/JUMBO frame identifier |
Direction Legend
| Symbol | Meaning |
|---|---|
| GET | Read-only query (empty request, data in response) |
| SET | Write command (data in request, ACK response) |
| CMD | Action command (may have payload, triggers action) |
See Also
- System Info Commands - Detailed info on commands 0-10
- Configuration Commands - Detailed info on commands 32-62
- Telemetry Commands - Detailed info on commands 101-166
- Control Commands - Detailed info on commands 200-229
- MSPv2 Extensions - Betaflight-specific MSPv2 commands