MultiWii Serial Protocol

MultiWii Serial Protocol (MSP) is a binary communication protocol used by MultiWii and Betaflight flight controller softwares and their derivatives. MSP is used for both control and telemetry. It is utilised by such companies as DJI in their FPV gear (e.g., DJI Goggles).

Protocol details
There are three types of messages in MSP: commands, requests and responses. Command is an incoming message without expected outgoing response, while request typically results in outgoing response message.

There are two versions of the protocol: MSPv1 (messages start with ) and MSPv2 (messages start with  ).

Version 1
MSPv1 message structure with byte size:

    <[data]:N> 

In MSPv1, checksum is a XOR of < data_size >, and all data bytes.

Version 2
MSPv2 message structure with byte size:

     <[data]:N> 

In MSPv2, checksum is a CRC8-DVB-S2 of all the data except for the first three bytes.