Mavlink messages not parsing with Cube-Orange and RPi 3B+

I recently got a Pixhawk Cube-Orange with Here2 GPS and I loaded the apj firmware for Arducopter using Mission Planner (version 1.3.70) and it connects just fine.

Now I’ve connected the cube to a Raspberry Pi 3B+ and I wanted to test the mavlink interface using this example:

I’ve cloned that repository onto the Pi which is running Ubuntu Core 18.04 and when I run the script it detects System and Component ID but then doesn’t detect the Cube’s initial position. I’ve done some debugging and can see that this function:

mavlink_parse_char(MAVLINK_COMM_1, cp, &message, &status); //Line 133, serial_port.cpp

always returns zero and so the program just stays in a loop waiting for messages to be parsed. The screenshot shows the output of the program and it just stays like that until I press Ctrl-c to exit.

I’m not sure how to proceed from here or why the messages aren’t being parsed, would anyone be able to offer some advice?


I’ve just tested that example with my Pixhawk running the latest stable. I’ve found I can recreate your issue if there is no GPS lock. The mavlink_control is waiting for a valid GPS lock (and packet) first.

Thanks for getting back to me. So when I connect the autopilot to the Pi, the GPS does flash green which means it has a valid GPS lock, correct me if I’m wrong? But I still get the issue I described above.

To isolate the problem, we suggest connecting the mission planner and Cube and checking the GPS reception status on the mission planner.

Hey @johannejvv, were you able to debug the issue? I am facing the same issue with cube orange connected with here3 gps in can port connected with Raspberry pi 3b+ using FTDI Chip USB-to-serial adapter board.

@stephendade , @mickey-miki Please check if you can help me out with it.