Send NMEA messages from Jetson Nano to Pixhawk 4

Hello everyone, I was recently given a task to send GPS messages in NMEA format from a Jetson Nano to a Pixhawk 4 that is connected to it. Basically I need to replace the Pixhawk GPS module with the Nano, and I cannot use mavlink messages. The NMEA string is ‘$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,*47’.
What I tried so far is:

  1. Connecting the pixhawk to the nano with a USB cable and write the string to /dev/ttyS0 using PySerial (I read here Reading GPS Data from PX4 Autopilot - MATLAB & Simulink Example that you can communicate with the GPS through ttyS0, but maybe I understood it wrong)

  2. Connecting the nano to the pixhawk’s GPS module port and sending the string to /dev/ttyTHS1, again using PySerial. The pins I connected on the nano are: RT/TX, SCL, SDA, and GND. I couldn’t figure out how to connect the other 5, if I even need to.

On both tries I hoped to see either a GPS lock on QGC or some LED indicator on the pixhawk but I got nothing. I also set the satellite count for the GPS to 0, still didn’t help.

If anyone has an idea how to proceed I would really appreciate it. Thanks in advance!

1 Like