For the complete documentation index, see llms.txt. This page is also available as Markdown.

MAVLINK Bridge

Serial Connection

Pixhawk TELEM2 is internally connected to the Jetson module. Let us first check the connection on the Jetson terminal. Consider having a MAV connection to companion computers in advance. Check PX4 Docs for the details. For a sanity check, you could run mavlink shell on /dev/ttyTHS0

Ethernet Connection

Since there is no DHCP server active in this configuration, the IPs have to be set manually: Once the Ethernet cables are plugged in, the eth0 network interface seems to switch from DOWN to UP.

You can check the status using:

ip address show eth0

You can also try to enable it manually:

sudo ip link set dev eth0 up

It then seems to automatically set a link-local address, for me it looks like this:

ip address show eth0

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 169.254.21.183/16 brd 169.254.255.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::yyyy:yyyy:yyyy:yyyy/64 scope link 
       valid_lft forever preferred_lft forever

This means the Jetson’s Ethernet IP is 169.254.21.183.

IP setup on FC

Now connect to the NuttX shell (using a console or the MAVLink shell) and check the status of the link:

For me, it is DOWN at first.

To set it to UP:

Now check the config again:

However, it doesn’t have an IP yet. I’m going to set one similar to the one of Jetson:

And check it:

Now the devices should be able to ping each other.

Note that this configuration is ephemeral and will be lost after a reboot, so we’ll need to find a way to configure it statically.

Ping test

First from the Jetson terminal:

And from the FC in Nuttx Shell:

MAVLink/MAVSDK test

For this, we need to set the mavlink instance to send traffic to the Jetson’s IP:

For an initial test we can do:

This will send MAVLink traffic on UDP to port 14540 (the MAVSDK/MAVROS port) to that IP which means MAVSDK can just listen to any UDP arriving at that default port.

To run a MAVSDK example, install mavsdk via pip, and try out an example from MAVSDK-Python/examples.

For instance:

Last updated

Was this helpful?