UART telemetry from ardupilot not working


I can’t seem to get the UART telemetry work when I specify it among the ardupilot startup switches. In my /etc/default/arduplane I have

TELEM1="-A udp:"
TELEM2="-C /dev/ttyAMA0"

# Options to pass to ArduPilot

I have made sure that I have SERIAL1_PROTOCOL=2 and SERIAL1_BAUD=57: I have set and checked these via the UDP link which has been working fine.

RTL> param show SERIAL1_*
SERIAL1_BAUD     57.000000

For testing purposes on the receiving end I have an Rpi zero running mavproxy on /dev/ttyS0: --master=/dev/ttyS0 --baudrate=57600

The link remains down however, as if “-C /dev/ttyAMA0” did nothing at all:

Connect /dev/ttyS0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyS0
MAV> link 1 down

However, if I disable TELEM2 and forward the mavlink on the navio using mavproxy to /dev/ttyAMA0, everything seems to work fine, although somewhat laggy. In this case messages show up in the Rpi zero and I can get/set params from there, so the UART link itself should be fine. The UART communication between the two Rpis works ok in other tests as well, so there probably must be something going on with the ardupilot?

Edit: furthermore, I checked that all the stream rate SR1_* params are nonzero. Is there something else I should still check?

Thanks in advance.

I think I solved the problem: the syntax in the default systemd unit environment file /etc/default/arduplane that is provided with the navio2 image is wrong. I think it should be fixed to avoid future confusion.

Apparently you can not do ARDUPILOT_OPTS="$TELEM1 $TELEM2" because the environment file is not a bash script…?

As soon as I directly set ARDUPILOT_OPTS="-A udp: -C /dev/ttyAMA0", the mavproxy on the receiving end came to life.


This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.