Servers by jDrones

Mavproxy.py stuck on MAV

Hello,

I am trying to connect my APM 2.8 with my Raspberry Pi 3 using the mavproxy.py command line.

sudo -s
mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter

But the terminal gets stuck on “MAV>”. After this “Waiting for heartbeat from /dev/ttyAMA0” should come but it doesn’t.
I thought the connections to the telemetry port of the APM were the fault because I had to solder a few wires together so I started from the very beginning.
I tried:

  • Connecting APM and my laptop directly through USB
  • Connecting APM with Pi directly thorugh USB (Port /dev/ttyACM0)
  • Using a TTL USB to UART TTL to connect APM and laptop
  • Using the same converter to connect APM and Pi.

and all these worked as expected.

But when I connect the APM with the GPIO UART pins of the Raspberry Pi, it just gets stuck on “MAV>”. If it showed garbage values then it would be a baudrate issue but it just shows nothing and reversing the UART pins also gives the same result, where it should just say cannot connect or something.

Kindly help me figure out what the problem is. I would really appreciate it.

Thanks

1 Like

It sounds like the /dev/ttyAMA0 is not configured properly.

Take a look at https://www.raspberrypi.org/documentation/configuration/uart.md, as you may need to disable the Bluetooth module to access that port.

1 Like

Thank you Stephen. Its works perfectly now. Thank you very much.

A bit off topic, can the APM 2.8 not be connected through 2 different ports at the same time?
I worked on a Pixhawk 2.1 before and used the Telem connection with a Raspberry Pi 3 (AMA0) for running the mavproxy.py script to show the status of the vehicle on my ground station and simultaneously used a USB connection (ACM0) to run a script on Pi which gave commands to the Pixhawk.

When I try to do the same with the APM, the Telem connections breaks, saying “no link, link 1 down” and reconnects as soon as I remove the USB.

Can I not use 2 connections with my APM or is there some work around for this?

Thank you.

I think the APM2 boards can only use one connection at a time. I vaguely recall those ports being shared between a single TELEM, as part of the hardware design.

Using the Pixhawk would be much easier :slight_smile:

Thank you very much Stephen. I have a Pixhawk 2.1 on order. I guess I’ll start this again once that arrives.

Servers by jDrones