msp-protocol

Identify MSP protocol commands and packet formats in INAV firmware.

4|2|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/sensei-hacker/inav-claude --skill msp-protocol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: msp-protocol
Source: https://github.com/sensei-hacker/inav-claude/tree/main/.claude/skills/msp-protocol
Command: npx skills add https://github.com/sensei-hacker/inav-claude --skill msp-protocol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the process of understanding and debugging the MultiWii Serial Protocol (MSP) within the INAV firmware, saving developers time when investigating command definitions and implementations.

Core Features & Use Cases

  • Command Lookup: Find definitions and usage of specific MSP commands in the INAV firmware and configurator.
  • Packet Structure: Understand the standard MSP packet format for requests and responses.
  • uNAVlib Integration: Reference the Python uNAVlib library for MSP testing and automation.
  • Debugging Guidance: Provides tips for enabling MSP debug logging and using benchmark tools.
  • Use Case: A developer needs to understand the payload format for the MSP_ATTITUDE command or find where MSP_SET_RAW_RC is handled in the C codebase to implement a new feature.

Quick Start

Find the definition and usage of the 'MSP_SET_RAW_RC' command.

Frequently Asked Questions about msp-protocol

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify and parse MSP protocol commands in INAV firmware?

MSP protocol commands are identified by their command byte and packet structure. Parse MSP packets by reading the header (0x24, 0x4D), direction byte, size, command ID, data payload, and CRC checksum. INAV firmware defines these in msp_protocol.h and msp.c; the configurator provides JavaScript MSP definitions for reference.

What's the difference between MSP v1 and MSP v2 packet formats?

MSP v1 uses a fixed 8-byte header with 1-byte size limit (255 bytes max). MSP v2 extends this with a larger frame format supporting bigger payloads. Both versions follow request/response patterns; choose based on your payload size and INAV version compatibility requirements.

How do I debug MSP communications in INAV-based projects?

Enable MSP debug logging through INAV configurator settings and examine msp_serial.c for low-level frame handling. Use mspapi2 or uNAVlib (Python library) to parse and test MSP packets independently. Benchmark tools help identify communication bottlenecks between device and ground station.

Can I use the MSP protocol with configurators and testing tools outside INAV?

Yes. The MSP protocol is standardized across MultiWii-based systems. The configurator works with any firmware implementing the protocol; uNAVlib and mspapi2 provide portable Python interfaces for automated testing, logging, and packet validation across platforms.

How do I find where specific MSP commands like MSP_SET_RAW_RC are implemented?

Search the INAV firmware source (msp_protocol.h for definitions, msp.c for handlers) for the command name or ID. Cross-reference the payload structure in the configurator's JavaScript MSP definitions. Use debugging tools to trace command execution and verify payload format during firmware analysis.

What do I need to know before implementing a custom MSP command handler?

Understand the MSP packet structure (header, size, command ID, data, CRC), request/response direction flags, and payload byte order. Review existing command implementations in msp.c for patterns. Validate your handler with uNAVlib or mspapi2 to ensure correct packet encoding and decoding.