I’m currently trying to establish MAVLink communication between a Raspberry Pi 4B (running Raspberry Pi OS) and a Pixhawk 2.4.8 using MAVProxy, but I’ve run into issues. Here’s a detailed breakdown of my setup and problems:
Setup:
Raspberry Pi 4 running Raspberry Pi OS.
Installed MAVProxy in a Python virtual environment
Connected the Pixhawk to the Raspberry Pi UART(TELEM2) (serial port /dev/serial0) and disabled the login shell via raspi-config.
Configured the Pixhawk using Mission Planner:
SERIAL2_PROTOCOL = 2
SERIAL2_BAUD = 921
Confirmed that /dev/serial0 is present on the Raspberry Pi and connected correctly to the Pixhawk.
ISSUE Link 1 Down" in MAVProxy:
When I successfully start MAVProxy (without sudo), I see the following output:
(mavproxy_env1) aryan@raspberrypi:~/mavproxy_env1 $ mavproxy.py --master=/dev/serial0 --baudrate 921600
Connect /dev/serial0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/serial0
MAV> link 1 down
It keeps repeating link 1 down, indicating that no heartbeat is being received from the Pixhawk. ### What could be causing the “link 1 down” issue, and how can I debug it further?
Ras Pi and most flight controllers uses 3.3V signalling. So 1.5V is not right.
EDIT: /dev/ttyS0 usually doesn’t correspond to the GPIO UART on the Pi4. Usually it’s /dev/serial0 or /dev/ttyACMx, depending on the configuration in your /boot/config.txt
Yes sorry scope was set to the wrong prob setting, only 1.5v.
So no /dev/serial0 on this device. When I use minicom for a loop back test /dev/ttyS0 is what works to receive characters on the gpio pins.
/dev/tty/AMA0 exists but it gives the same link down error
When I connect the USB cable I get /dev/ttyACM0 and that works.