The MultiWii Serial Protocol (MSP) is the de-facto standard to interact with a MultiWii flight controller (FC). Its implementation contains a list of the most common operations one would expect from a remote control/telemetry point of view. Developers can add custom functionality if required, being cautious about typos and errors in the information available as the project and the wiki are in constant development.
MSP has been used by the MultiWii configurator (a Processing application) since the beginning with the first draft of the protocol eventually defined in 2012. The MSP wiki page is the main source of information and contains a brief description of the structure of a MSP request
The definition of “request” is quite loose in fact three types of messages can be identified:
- command – is an incoming (into FC) message without implicit outgoing response from the controller
- request – is an incoming message with implicit outgoing response (e.g. a telemetry request sent in by a remote station)
- response – is the outgoing message resulting from an incoming request
The figure shows the different parts constituting a MSP message (see wiki)
Header (preamble and flow)
Header is 3 bytes long. A MSP message can be identified by a 2-byte preamble, the sequence of char “$M”. A 3rd byte containing the message direction completes the header. Data flow toward the MultiWii is identified with “<” while data from the MultiWii with “>” (the incoming flow is composed of commands and requests while the outgoing flow contains responses)
Info (data length and message type)
The 4th byte is the size and contains the length of the payload (number of bytes of the payload field only). Size is zero for a MSP request.
The 5th byte is the type of MSP message. Value 1xx identify requests while 2xx identify commands.
public static final int
MSP_SET_HEAD =211, // Not used
See the wiki for details
The checksum is computed as the XOR of size, type and payload bytes. The checksum of a request (no payload) equals the type.
Arduino MSP TX and RX at https://code.google.com/p/mwii-msp-tx/ and the original thread on the MultiWii forum http://www.multiwii.com/forum/viewtopic.php?f=8&t=3473