Help with Sending Custom Messages from STM32 to QGroundControl using MAVLink2 on ROV with Navigator and Raspberry Pi 4

Hello everyone,
I’m working on a project involving an underwater ROV based on a Raspberry Pi 4 connected to a Navio2. My goal is to send custom messages from an STM32 Nucleo to the QGroundControl interface, specifically to the alert screen, using MAVLink2.

Current Setup:

  1. Hardware:
  • Raspberry Pi 4 with Navio2.
  • STM32 Nucleo connected to the PC via COM3 for testing and UART communication with the Raspberry Pi.
  • Navio2 configured with three UART ports for:
    • Ports 0-1-2: MAVLink2.
    • Ports 3-4: GPS.
  1. Software:
  • Modifications to the ArduPilot code (Sub-4.1 branch) to include custom messages.
  • STM32 sends data to the Navio2 via UART.
  • The custom messages are expected to be interpreted by MAVLink2 and displayed in QGroundControl.

What I’ve Tried:

  1. Configured Navio2 UART ports for the desired communication (Telemetry, GPS, etc.).
  2. Modified the ArduPilot code to include support for custom MAVLink messages.
  3. Tested the connection between STM32 and Raspberry Pi via UART to ensure data transfer works.
  4. Attempted to send MAVLink2-compliant messages from the STM32, but I haven’t been able to display them in the QGroundControl interface yet.

Questions and Issues:

  1. How should the messages be structured on the STM32 to be correctly interpreted by MAVLink2 and QGroundControl?
  2. Are there additional configurations needed in ArduPilot or QGroundControl to enable the reception of custom messages?
  3. If anyone has worked on a similar project, could you share examples or guidance to achieve this integration?

I’d greatly appreciate any advice or experiences you can share. Thank you in advance!

Hi @Tabby2109, welcome to the forum :slight_smile:

Are you using a library to do this, or forming the messages manually?

Note that the source system ID needs to match the target system, or they may not be able to communicate.

QGroundControl can be quite painful to send custom messages to (because you need to recompile it so it understands them). You mentioned

in which case you may just want STATUSTEXT messages (which are already supported), but if you want to use custom telemetry messages and the like then things might be more complicated, and you may wish to consider using Cockpit instead.

This sensor integration project may be a useful reference :slight_smile:

Note that if you’re using BlueOS (or have other sources of MAVLink heartbeats), there may be some extra filtering to do.