Companion computer works over USB, but not serial

Hi,

I’m setting up a Ardupilot Cube Orange with a Jetson Orin NX and the Seeed J401 carrier board. I can communicate well over USB, but for some reason serial communications do not work.

To use USB, I connect a micro USB cable from the Cube to the Jetson, and run mavproxy.py --master=/dev/ttyACM0,115200, and receive the following output:

WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyACM0,115200 source_system=255
Log Directory: 
Telemetry log: mav.tlog
Waiting for heartbeat from /dev//ttyACM0
MAV> Detected vehicle 1:1 on link 0
online system 1
STABILIZE> Mode STABILIZE
Detected vehicle 42:250 on link 0
fence present
Detected vehicle 42:100 on link 0
GPS lock at -15 meters
Detected vehicle 1:0 on link 0
AP: ArduCopter V4.6.2 (1ebd4d99)
AP: ChibiOS: 88b84600
AP: CubeOrange 0028002F 34305108 37373930
AP: IOMCU: 420 1001 411FC231
AP: RCOut: PWM:1-12 ProfiLED:13-14
AP: IMU0: fast sampling enabled 8.0kHz/2.0kHz
AP: IMU1: fast sampling enabled 9.0kHz/2.3kHz
AP: IMU2: fast sampling enabled 9.0kHz/2.3kHz
AP: Frame: QUAD/X
Received 1095 parameters (ftp)
Saved 1095 parameters to mav.parm
Flight battery 100 percent

STABILIZE>

It then continues to print AP: Arm: RC not found, but this is expected. Seems like this works well.

Now, I disconnect the USB and connect from Telem2 to the Jetson’s UART on the 40 pin header. I start Mavproxy with mavproxy.py --master=/dev/ttyTHS1,57600 and receive the following output:

WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyTHS1,57600 source_system=255
Log Directory: 
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyTHS1
MAV> Detected vehicle 1:1 on link 0
online system 1
STABILIZE> Mode STABILIZE

It seems like it can communicate a bit, but not fully. If I run watch heartbeat I can see regular heartbeat messages:

> HEARTBEAT {type : 6, autopilot : 8, base_mode : 0, custom_mode : 0, system_status : 0, mavlink_version : 3}
< HEARTBEAT {type : 2, autopilot : 3, base_mode : 81, custom_mode : 0, system_status : 3, mavlink_version : 3}

but running any other commands (arm throttle, wp list etc.) I receive no response.

I can confirm the telemetry 2 port is set up as follows in QGroundControl:

SERIAL2_BAUD 57600
SERIAL2_PROTOCOL MAVLink2

I have also masked the ModemManager service on the Jetson, so I don’t think that’s the issue.

sudo systemctl mask --now ModemManager.service

Any ideas what the problem could be?

I suspect you have nvgetty using the UART, blocking MAVProxy from sending commands.

Try sudo systemctl disable nvgetty.service and reboot.

Thanks for the suggestion! I tried this, but sadly to no affect.

I think nvgetty wasn’t working anyway. Looking at this service, it seems like it was trying to monitor UART on ttyTHS0, failing to find this interface because it doesn’t exist, then dying.

Do you know of any way to check if any other services or processes are blocking ttyTHS1?

I’ve got this working, so posting the solution here if anyone comes across this in future.

Turns out this is in fact an issue with logic levels. Changing SERIAL2_OPTIONS to enable RX_PullDown fixed this for me.

Source: Jeston Orin nano TX pin not working? - #9 by mohamedaminefaiz82 - Jetson Orin Nano - NVIDIA Developer Forums

1 Like