Everything has been set up, upon executing the mavproxy.py script, I am able to receive information from the Pixhawk but not send information to it.
According to this video: https://www.youtube.com/watch?v=DGAB34fJQFc. I followed all the steps however I’m not able to send commands via MAVLink from the Raspberry Pi to the Pixhawk. I am able to receive the commands in the Terminal when I manually arm/disarm the motors using my controller.
However, when I try executing any command, nothing changes. It just shows STABILIZE> even when I type “mode RTL” and hit Enter, nothing happens and “STABILIZE>” appears again. No message, nothing.
The baud rate has been set correctly, but does anyone have any idea of what the problem may be?
Also: I don’t quite understand why we have to disable the serial port then enable it by setting enable_uart = 1. It’s basically turning it off and back on with nothing happening in between, according to the first linked article. Could anyone explain the rationale behind this?
Hi,
could you check that your wiring is good : tx , rx and GND, on both side !
About disabling stuff, it is because the OS use the serial port as output, if let is at it (don’t have rpi3 but it like that on all other cards) you will see linux kernel message on the serial. So it need to be shutdown.
Hi, yes the wiring is correct. I even flipped the Tx and Rx around for extra measure but it just said no link in the Terminal, which is understandable.
When you disable it, you are actually telling the kernel and operating system not to send messages on the serial connection. Source.
The enable_uart=1 in /boot/config.txt is required in RPi3 to actually activate the serial port, see here for further information.
To your actual problem I can’t help you that much. I just went through the setup yesterday and it works fine. Have you connected the RPi through the vcc provided by the Pixhawk or through the micro USB port? (Don’t use both, the UB port is recommended)
However, in 2023 I’m using APM and I’m getting the following error
mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter --mav10 WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk Connect /dev/ttyAMA0 source_system=255 waypoint module not available; use old compat modules Traceback (most recent call last):
File “/usr/local/bin/mavproxy.py”, line 1449, in *
mpstate.load_module(m, quiet=True)*
File “/usr/local/bin/mavproxy.py”, line 374, in load_module*
module = m.init(mpstate, *kwargs)
File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/mavproxy_wp.py”, line 579, in init*
return WPModule(mpstate)*
File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/mavproxy_wp.py”, line 19, in init*
File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/lib/mission_item_protocol.py”, line 35, in init*
self.completions())*
File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/lib/mission_item_protocol.py”, line 103, in completions*
cs = self.commands()*
File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/mavproxy_wp.py”, line 162, in commands*
ret.update({* AttributeError: ‘NoneType’ object has no attribute ‘update’
I have heartbeat with the APM when connected with R pi zero 2W with the following command:
mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk Connect /dev/ttyAMA0 source_system=255 no script MyCopter/mavinit.scr Log Directory: MyCopter/logs/2023-09-12/flight15 Telemetry log: MyCopter/logs/2023-09-12/flight15/flight.tlog Waiting for heartbeat from /dev/ttyAMA0 MAV> Detected vehicle 1:1 on link 0 online system 1 STABILIZE> Mode STABILIZE
Were you able to solve this issue, i am having the same issue and although i removed modemmanager it persists. when i enter --mav20 program runs but again ignores commands