Not receiving custom mavlink message

I have connected an ODROID to a Pixhawk Mini via it’s TELEM port (FTDI cable). I followed this c_uart_interface_example and verified that it did indeed work with my connection.

On the ODROID’s end
Now I am trying to send my custom mavlink message. I added my message to the common.xml file and regenerated it (note that I would get an error as described here, unless I unchecked ‘Validate’, which I did).

I edited the c_uart_interface_example to send my message, which it seems to be doing.

On the Pixhawk Mini’s end
I updated mavlink/v2.0 to include my custom message header.

I created a uORB topic (there shouldn’t be any source of error here because I have tested subscribing/publishing using it within the PX4 firmware without issue).

I followed all the steps here on receiving custom mavlink messages.

Where I subsribe to the uORB topic, in a custom controller module, nothing is being read (unlike when I was using the uORB topic within the PX4 firwmare, i.e. without mavlink or the ODROID). It seems my message is not being received, but I have no idea why not.

Have I missed any steps? Is there anything special that needs to be done on the ODROID’s end that wouldn’t have been covered in that
C/C++ example?

I don’t think you missed any high level steps, but it’s hard to say for sure without seeing your code.

Did you check if the subscription succeeded (file descriptor != -1)? What happens when you try to orb_copy? Are you sure your new message is publishing consistently? On the console you can check with the listener command.


pxh> listener vehicle_status

TOPIC: vehicle_status instance 0 #1
timestamp: 3029410
nav_state: 0
arming_state: 1
hil_state: 0
failsafe: False
system_type: 2
system_id: 1
component_id: 1
is_rotary_wing: True
is_vtol: False
vtol_fw_permanent_stab: False
in_transition_mode: False
in_transition_to_fw: False
rc_signal_lost: True
rc_input_mode: 1
data_link_lost: True
data_link_lost_counter: 0
engine_failure: False
engine_failure_cmd: False
mission_failure: False
onboard_control_sensors_present: 0
onboard_control_sensors_enabled: 0
onboard_control_sensors_health: 0

Thanks for the reply!

I swapped over to my Pixhawk 1 so I could do some debugging through the system console, and found out that my issue was a stack overflow in the mavlink module, so I just upped the stack size and now everything is working :slight_smile:

There’s no way to access the system console on the Pixhawk Mini, right? No way I can printf or PX4_INFO?

No, I don’t believe it’s accessible without soldering. Right now console messages go to /dev/console, which is not the same as the mavlink shell, although it might be fixable.