Bad CRC - custom mavlink message

Hello everyone,

I am trying to send custom messages from PX4 to Qgroundcontrol. I am able to send these messages but when I receive them from QGC I get Bad CRC from this function call:

uint8_t msg_received = mavlink_frame_char(chan, c, r_message, r_mavlink_status);


msg_received = 2

I am using the same custom mavlink v2 library in both side, generated with mavgenerate (ardupilotmega.xml), after add my custom message in common.xml. Then I’ve rebuilt QGC with the docker provided, without any errors. I have also checked all CRCs in common.h, and they match.

This problem come out just with my custom message, I still see standard messages in MAVLink Inspector. Maybe I miss some step?

Thank you

Please take this response with a grain of salt as I’m also relatively new to PX4. I have also encountered this problem. In my case, I had two mavlink packages. One under the ROS workspace folder and one inside Autopilot as a submodule (i.e. Autopilot/src/modules/mavlink/mavlink). The problem is resolved after I made sure both versions have the same message definitions.