Using Dronekit with CubePilot Orange/ADS-B Carrier board - Exception message handler error


I’ll be using this thread to document this error and hopefully my methods to solving it. If anybody has any ideas towards solving it i’d appreciate it

I’m trying to get Dronekit working with my new CubePilot Orange & the ADS-B Carrier board. Whenever I run a dronekit script that ran fine on my old pixhawk 1 board I get an error:

Exception in message handler for HEARTBEAT
mode 0 not available on mavlink definition

The problem is occasionally the program still executes fine. Other times doesnt.

Here it is running off my computer first, and then Pi0:

It failed on the Pi0 but it occasionally works. That’s the error i get when it fails.

I have reasons to believe that this is related to the Serial 5, and 6 parameters.

This thread from 2016 noted the “exception in message handler” error to be related to cross talk with ground systems and etc.

My first “solution” came when I loaded my old parameters from my old Pixhawk 1 that worked. I ran the Hello World code fine on the Pi0 and my ubuntu computer.

I noticed the error appearing when I connected my usb connection with mission planner, and disappearing when I disconnected missionplanner. This lead me to believe the problem was the usb connection. Upon loading my backup parameters for the CubePilot Orange, the “exception in message handler” problem reappeared regardless if i had missionplanner connected or not.

My next point of attack was to see what the different parameters was between my cubepilot orange params and the old Pixhawk 1 params. I specifically loaded only the different SR1_x SR2_x and the Serial5_PROTOCOL Serial5_Baud Rate Serial6_PROTOCOL commands. This lead to the “Exception in Message Handler” problem disappearing. From what I remember, Serial 5 and 6 runs the ADSB commands.

My thinking was the Serial 5 and 6 functions were interfering in cross talk similar to how usb does. I put those params back to what the cubepilot orange initially had, and the error came back.

This is currently where i’m at. I’ll be attempting to find where between serial 5 &6 this problem is coming from, and see if it’s possible to work around this. From what i remember, Serial 5&6 run comms with ADS-B and it’d be desirable to keep that.

If there’s any glaring errors with my methodology, or if there’s anything else I can try, please let me know.

okay, i’ve narrowed it down to Serial5_PROTOCOL

initially my cubepilot Orange had serial5_protocol at 1. Setting it to -1 solves my “Exception in message handler” problem. If i set this back to 1 and play with Serial6 instead, the problem reappears.

Sadly, serial 5 apparently runs ADS-B information to the ground station, which I’d rather have.

This problem might have been the fact that it tried to send ADS-B messages over dronekit, which dronekit I don’t believe is equipped to handle? Or maybe it’s the same interference issue.

I’ll attempt to fix this problem/make them work together later.

I believe this bit might be the solution:

the CubePilot might be attempting to send it over the serial port that the Pi is connected to.

Note to self: Backup 2 + original params/Serial5_protocol = -1.