Raspberry Pi not sending information to Pixhawk

Hi,

I have a Pixhawk connected to a Raspberry Pi 3 as per this article: http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html via the Telem2 port.

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?

Any help is appreciated.

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)

Thanks for the explanation about the serial ports.

I’m powering the RPi through the micro USB port. I leave the Pixhawk’s VCC hanging free, unconnected.

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.

Try appending “–mav10” to your MAVProxy command-line.

Peter

Thanks a lot Peter :slight_smile: that worked!
Can u explain why is --mav10 required though?

1 Like

http://ardupilot.github.io/MAVProxy/html/getting_started/starting.html#mav10