Problem setting up MAVLink UART

Hi,
I’m new and newbie about ardupilot framework.
I have a Navio2 and Raspberry PI4 connected toghether.
I already configured SSH, wifi on the raspberry and I can log in without any issue.
I can start the ardupilot service with the “sudo emlidtool ardupilot” command without any issue.

Now I want to establish UART communication, in particular with MAVlink protocol.
I followed this guide and I also enabled serial port.
I installed the MAVProxy files following this guide
But when I try to launch the command to test the mavproxy communication I get the errors in the picture attached.

Also I’m not understanding which command should I send: in the wiki says “python3 mavproxy.py --master=/dev/serial0 --baudrate 921600 --aircraft MyCopter” but in the picture says a different command “mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter”.
I’m not understanding what is the right command. Could some one explain?
Thanks,
Marco.

1 Like

What do you get when you run the command

echo $PYTHONPATH

Hi,

thanks for the reply. With the command I get this answer (picture below)
Thanks,
Cattura

Marco.

@marc095 I think I have reproduced the problem

You may or may not have to do this, I am not sure, but it worked for me after the following (I’m running slackware linux, not a pi4). Someone with more knowledge about this particular system may want to chime in

pip3 install PyYAML mavproxy --user
export PATH=$PATH:$HOME/.local/bin

First you should read the navio2 docs over at emlid.com. Reading generic information will not help you here.
For your problem, start with this page:
https://docs.emlid.com/navio2/ardupilot/installation-and-running/

Since ardupilot is running as a exectable on the Raspberry Pi and the Raspberry Pi is the companion computer at the same time, connecting through a UART connection will not work.
If you want to connect mavproxy to the arducopter executable, you need to set telemetry option -A to udp:127.0.0.1:14550 and start mavproxy with --master=udp:127.0.0.1:14550

Hi Derek,
unfortunatly the command does not help

Hi count74,
I followed the docs and I configured /etc/default/arducopter with:
TELEM1="-A udp::14550

for the moment the other parts are commented out

then when issuing command
mavproxy.py --master 127.0.0.1:14550 --out :14500

it says link1 down.
Trying to ping from external pc to the raspberry PI it’s all ok. But cannot ping viceversa. I don’t believe it’s normal behaviour. Trying to ping google from PI it’s all ok
Any suggest?
Thanks

If you entered everything as you wrote in your post, it is no wonder it does not work.
There is a " in the telemetry option line and no IP address. The IP address should be 127.0.0.1 (localhost).
The --out with just a port number also makes no sense and there is no --out required to test the connection between mavproxy and ardupilot.
There is a equal = missing after --master and also the protocol specification udp:.
–master=udp:127.0.0.1:14550

Here is my file

Cattura

and here is the command

The link is still down but at least the connection with missionPlanner of windows is working

You are not sending any data to 127.0.0.1:14550, so mavproxy can not pick up any mavlink stream.
One purpose of mavproxy is to send telemetry streams to different endpoints. So if your GCS PC has the IP 192.168.1.25 you can setup your telemetry -A option with 127.0.0.1:14550
and mavproxy with
–master=udp:127.0.0.1:14550
–out=udp:192.168.1.25:14550
or
–out=udpbcast:192.168.1.255:14550
to send telemetry to all devices on your network.

Ah ok thanks. Now it’s a bit more clear