Skip to main content

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)​

CodeCommandDirectionDescription
1MSP_API_VERSIONGETProtocol and API version
2MSP_FC_VARIANTGETFlight controller identifier (4 chars)
3MSP_FC_VERSIONGETFirmware version (major.minor.patch)
4MSP_BOARD_INFOGETBoard identifier and hardware revision
5MSP_BUILD_INFOGETBuild date, git hash, compiler
10MSP_NAMEGETCraft/pilot name
11MSP_SET_NAMESETConfigure craft/pilot name

Configuration (32-62)​

CodeCommandDirectionDescription
32MSP_BATTERY_CONFIGGETBattery parameters
33MSP_SET_BATTERY_CONFIGSETConfigure battery settings
34MSP_MODE_RANGESGETFlight mode activation ranges
35MSP_SET_MODE_RANGESETSet mode activation range
36MSP_FEATURE_CONFIGGETFeature flags bitmask
37MSP_SET_FEATURE_CONFIGSETEnable/disable features
38MSP_BOARD_ALIGNMENT_CONFIGGETBoard orientation settings
39MSP_SET_BOARD_ALIGNMENT_CONFIGSETSet board alignment
40MSP_CURRENT_METER_CONFIGGETCurrent sensor config
41MSP_SET_CURRENT_METER_CONFIGSETConfigure current meter
42MSP_MIXER_CONFIGGETMixer/frame type settings
43MSP_SET_MIXER_CONFIGSETConfigure mixer
44MSP_RX_CONFIGGETReceiver configuration
45MSP_SET_RX_CONFIGSETConfigure receiver
46MSP_LED_COLORSGETLED color palette
47MSP_SET_LED_COLORSSETConfigure LED colors
48MSP_LED_STRIP_CONFIGGETLED strip configuration
49MSP_SET_LED_STRIP_CONFIGSETConfigure LED strip
50MSP_RSSI_CONFIGGETRSSI channel/source config
51MSP_SET_RSSI_CONFIGSETConfigure RSSI
52MSP_ADJUSTMENT_RANGESGETIn-flight adjustment ranges
53MSP_SET_ADJUSTMENT_RANGESETSet adjustment range
54MSP_CF_SERIAL_CONFIGGETSerial port configuration
55MSP_SET_CF_SERIAL_CONFIGSETConfigure serial ports
56MSP_VOLTAGE_METER_CONFIGGETVoltage meter settings
57MSP_SET_VOLTAGE_METER_CONFIGSETConfigure voltage meter
58MSP_SONAR_ALTITUDEGETRangefinder/sonar altitude
59MSP_PID_CONTROLLERGETCurrent PID controller type
60MSP_SET_PID_CONTROLLERSETSet PID controller
61MSP_ARMING_CONFIGGETArming configuration
62MSP_SET_ARMING_CONFIGSETConfigure arming

Data & Storage (64-99)​

CodeCommandDirectionDescription
64MSP_RX_MAPGETRC channel mapping
65MSP_SET_RX_MAPSETConfigure channel mapping
68MSP_REBOOTCMDRestart flight controller
70MSP_DATAFLASH_SUMMARYGETOnboard flash status
71MSP_DATAFLASH_READGETRead from dataflash
72MSP_DATAFLASH_ERASECMDErase dataflash
75MSP_FAILSAFE_CONFIGGETFailsafe settings
76MSP_SET_FAILSAFE_CONFIGSETConfigure failsafe
77MSP_RXFAIL_CONFIGGETPer-channel RX failsafe
78MSP_SET_RXFAIL_CONFIGSETSet RX failsafe values
79MSP_SDCARD_SUMMARYGETSD card status
80MSP_BLACKBOX_CONFIGGETBlackbox/flight log settings
81MSP_SET_BLACKBOX_CONFIGSETConfigure blackbox
82MSP_TRANSPONDER_CONFIGGETTransponder settings
83MSP_SET_TRANSPONDER_CONFIGSETConfigure transponder
84MSP_OSD_CONFIGGETOSD configuration
85MSP_SET_OSD_CONFIGSETConfigure OSD
86MSP_OSD_CHAR_READGETRead OSD character
87MSP_OSD_CHAR_WRITESETWrite OSD character
88MSP_VTX_CONFIGGETVideo transmitter settings
89MSP_SET_VTX_CONFIGSETConfigure VTX
90MSP_ADVANCED_CONFIGGETAdvanced settings
91MSP_SET_ADVANCED_CONFIGSETConfigure advanced settings
92MSP_FILTER_CONFIGGETGyro/D-term filter settings
93MSP_SET_FILTER_CONFIGSETConfigure filters
94MSP_PID_ADVANCEDGETAdvanced PID settings
95MSP_SET_PID_ADVANCEDSETSet advanced PID params
96MSP_SENSOR_CONFIGGETSensor configuration
97MSP_SET_SENSOR_CONFIGSETConfigure sensors
98MSP_CAMERA_CONTROLCMDCamera control command
99MSP_SET_ARMING_DISABLEDSETDisable arming (with reason)

Telemetry & Status (101-166)​

CodeCommandDirectionDescription
101MSP_STATUSGETFlight controller status
102MSP_RAW_IMUGETRaw accelerometer, gyro, magnetometer
103MSP_SERVOGETServo PWM outputs
104MSP_MOTORGETMotor outputs
105MSP_RCGETRC channel inputs
106MSP_RAW_GPSGETRaw GPS coordinates
107MSP_COMP_GPSGETComputed GPS data
108MSP_ATTITUDEGETRoll, pitch, yaw angles
109MSP_ALTITUDEGETAltitude and climb rate
110MSP_ANALOGGETBattery voltage, current, RSSI
111MSP_RC_TUNINGGETRC rate/expo settings
112MSP_PIDGETPID coefficients
116MSP_BOXNAMESGETFlight mode names (semicolon-separated)
117MSP_PIDNAMESGETPID item names
118MSP_WPGETWaypoint data
119MSP_BOXIDSGETFlight mode box IDs
120MSP_SERVO_CONFIGURATIONSGETServo configurations
121MSP_NAV_STATUSGETNavigation status
122MSP_NAV_CONFIGGETNavigation configuration
124MSP_MOTOR_3D_CONFIGGET3D/bidirectional motor settings
125MSP_RC_DEADBANDGETRC deadband settings
126MSP_SENSOR_ALIGNMENTGETSensor mounting orientation
127MSP_LED_STRIP_MODECOLORGETLED mode and colors
128MSP_VOLTAGE_METERSGETAll voltage meter readings
129MSP_CURRENT_METERSGETAll current meter readings
130MSP_BATTERY_STATEGETBattery status and health
131MSP_MOTOR_CONFIGGETMotor configuration
132MSP_GPS_CONFIGGETGPS settings
133MSP_COMPASS_CONFIGGETMagnetometer configuration
134MSP_ESC_SENSOR_DATAGETESC telemetry (RPM, temp)
135MSP_GPS_RESCUEGETGPS rescue mode settings
136MSP_GPS_RESCUE_PIDSGETGPS rescue PID tuning
137MSP_VTXTABLE_BANDGETVTX frequency table
138MSP_VTXTABLE_POWERLEVELGETVTX power levels
139MSP_MOTOR_TELEMETRYGETMotor telemetry from ESCs
140MSP_SIMPLIFIED_TUNINGGETSimplified tuning settings
141MSP_SET_SIMPLIFIED_TUNINGSETConfigure simplified tuning
150MSP_STATUS_EXGETExtended status
160MSP_UIDGETUnique identifier (MCU serial)
164MSP_GPSSVINFOGETGPS satellite info
166MSP_GPSSTATISTICSGETGPS statistics

OSD & Display (180-189)​

CodeCommandDirectionDescription
180MSP_OSD_VIDEO_CONFIGGETOSD video output settings
181MSP_SET_OSD_VIDEO_CONFIGSETConfigure OSD video
182MSP_DISPLAYPORTCMDDisplay port command
183MSP_COPY_PROFILECMDCopy settings between profiles
184MSP_BEEPER_CONFIGGETBeeper configuration
185MSP_SET_BEEPER_CONFIGSETConfigure beeper
186MSP_SET_TX_INFOSETSet transmitter info
187MSP_TX_INFOGETTransmitter information

Control Commands (200-229)​

CodeCommandDirectionDescription
200MSP_SET_RAW_RCSETOverride RC channels
201MSP_SET_RAW_GPSSETInject GPS data
202MSP_SET_PIDSETWrite PID coefficients
204MSP_SET_RC_TUNINGSETWrite RC tuning
205MSP_ACC_CALIBRATIONCMDStart accelerometer calibration
206MSP_MAG_CALIBRATIONCMDStart magnetometer calibration
208MSP_RESET_CONFCMDReset to factory defaults
209MSP_SET_WPSETSet waypoint
210MSP_SELECT_SETTINGSETSwitch profile
211MSP_SET_HEADINGSETSet compass heading
212MSP_SET_SERVO_CONFIGURATIONSETConfigure servo
214MSP_SET_MOTORSETSet motor PWM directly
215MSP_SET_NAV_CONFIGSETConfigure navigation
217MSP_SET_MOTOR_3D_CONFIGSETConfigure 3D motors
218MSP_SET_RC_DEADBANDSETSet RC deadband
219MSP_SET_RESET_CURR_PIDCMDReset current meter
220MSP_SET_SENSOR_ALIGNMENTSETSet sensor alignment
221MSP_SET_LED_STRIP_MODECOLORSETSet LED mode/color
222MSP_SET_MOTOR_CONFIGSETConfigure motors
223MSP_SET_GPS_CONFIGSETConfigure GPS
224MSP_SET_COMPASS_CONFIGSETConfigure compass
225MSP_SET_GPS_RESCUESETConfigure GPS rescue
226MSP_SET_GPS_RESCUE_PIDSSETSet GPS rescue PIDs
227MSP_SET_VTXTABLE_BANDSETSet VTX band table
228MSP_SET_VTXTABLE_POWERLEVELSETSet VTX power levels

Utility & Debug (230-255)​

CodeCommandDirectionDescription
230MSP_MULTIPLE_MSPCMDBundle multiple MSP commands
238MSP_MODE_RANGES_EXTRAGETAdditional mode ranges
239MSP_SET_ACC_TRIMSETSet accelerometer trim
240MSP_ACC_TRIMGETRead accelerometer trim
241MSP_SERVO_MIX_RULESGETServo mixing rules
242MSP_SET_SERVO_MIX_RULESETConfigure servo mixer
245MSP_SET_PASSTHROUGHCMDEnable passthrough mode
246MSP_SET_RTCSETSet real-time clock
247MSP_RTCGETRead RTC
248MSP_SET_BOARD_INFOSETSet board info
249MSP_SET_SIGNATURESETSet FC signature
250MSP_EEPROM_WRITECMDWrite settings to EEPROM
253MSP_DEBUGMSGGETDebug message text
254MSP_DEBUGGETDebug values (4× int16)
255MSP_V2_FRAME—MSPv2/JUMBO frame identifier

Direction Legend​

SymbolMeaning
GETRead-only query (empty request, data in response)
SETWrite command (data in request, ACK response)
CMDAction command (may have payload, triggers action)

See Also​