MAVProxy newbie questions

2,648 views
Skip to first unread message

Trieste Devlin

unread,
Aug 7, 2015, 3:33:01 PM8/7/15
to MAVLink
I'm trying to get MAVProxy running on Mac OSX with Pixhawk, with a USB connection for now. I installed as described in the following link, checked my /dev/tty* connection, and tried running both with auto-recognition and specifying the port: http://erlerobotics.gitbooks.io/erle-robotics-mav-tools-free/content/en/installing_mavproxy.html.

Yesterday, the only commands that would give output were 'help' and 'alt'. Today I'm getting no response from any command. If I kill (ctrl-c) and try again, I get "Failed to connect to 0.0.0.0:14550 : [Errno 48] Address already in use" unless I quit and reopen Terminal, but get the same exact 'Log Directory/Telemetry log: mav.tlog" and MAV> prompt for failed connections and supposedly successful ones.

Any advice on how to properly connect to MAVProxy? Am I just misunderstanding how to interact with the GCS, or is there another problem going on?

../MAVProxy/MAVProxy$ mavproxy.py
          OR

../MAVProxy/MAVProxy$ mavproxy.py --master=/dev/tty.usbmodem1

Connect /dev/tty.usbmodem1 source_system=255

Log Directory: 

Telemetry log: mav.tlog

MAV> help

MAV> alt

MAV> module load console

MAV> module console

MAV> module list

MAV> ...



Note: I also installed onto PC (because read somewhere that MAVProxy doesn't always work well on Mac), and am similarly unable to get any output in response to commands, though at least it confirms a connection to PX4:

Auto-detected serial ports are:
COM4 : PX4 FMU (COM4) : USB VID:PID=26AC:0011 SNR=0
Connecting to COM4 : PX4 FMU : USB VID:PIX=26AC:0011 SNR=0
Connect COM4 source-system=255
Running script C:\Users\Fizzy Devlin\AppData\Local\MAVProxy\mavinit.scr
-> set moddebug 2
-> module load graph
Loaded module graph
-> module load console
Loaded module console
Log Directory:
Telemetry log: mav.tlog
MAV> help
MAV > alt
MAV > console
..


Andrew Tridgell

unread,
Aug 7, 2015, 6:24:24 PM8/7/15
to Trieste Devlin, MAVLink
Hi Trieste,

> Any advice on how to properly connect to MAVProxy? Am I just
> misunderstanding how to interact with the GCS, or is there another problem
> going on?

It is probably waiting for a MAVLink HEARTBEAT message. By default
MAVProxy waits for a heartbeat from the master before continuing. I know
this can be frustrating, so I've now pushed a change to add a "Waiting
for heartbeat from XXX" message so you at least know what it is doing.

You can tell it to not wait for a HEARTBEAT by using the --nowait
command line option.

So now the question is why it is not getting the HEARTBEAT. To help
diagnose it I'd recommend you start mavproxy in "setup" mode. In that
case it is just a dumb terminal, and doesn't try to process MAVLink at
all. That may tell you if you are getting non-MAVLink messages. Run
mavproxy with the --setup flag to try this.

It could be baudrate, or just that the board you are connecting to is
not talking correctly. Perhaps using --setup will help you diagnose it.

Note that if you do get MAVLink messages in --setup mode they will
appear as binary garbage on the screen. To exit setup mode enter "." by
itself on a line.

Cheers, Tridge

Alex Elkman

unread,
Aug 23, 2015, 9:45:45 PM8/23/15
to MAVLink, tde...@transition-robotics.com, and...@tridgell.net
Hey Trieste,

I am having a similar issue with MAVlink and I had it working for a few days, and all of a sudden now I cannot get past the code you have written, it doesn't recognize my APM anymore and I cannot send it commands which it will recognize.

Did you resolve your issue? If so, what did you do?

Thanks,
Alex

Trieste Devlin

unread,
Aug 24, 2015, 2:02:19 PM8/24/15
to MAVLink, tde...@transition-robotics.com, and...@tridgell.net
Hi Alex,

Were you trying to run MAVLink or MAVProxy? In this post I was asking for help with MAVProxy, the command-line based GCS. I did get a few commands running (alt, graph -- but didn't know the correct data names to use), but didn't end up putting much time into it after having trouble finding documentation that made learning the commands worthwhile for me. This ebook helped me get started: http://erlerobotics.gitbooks.io/erle-robotics-mav-tools-free/content/en/installing_mavproxy.html.

Luck,
   Trieste

Alex Elkman

unread,
Aug 24, 2015, 2:56:36 PM8/24/15
to mav...@googlegroups.com
Oh Yeah it was MAVProxy, but it turned out it was a power issue with my APM and the communicating device (Odroid), the issue has been resolved.

THanks for your reply,
ALex

--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von diesem Thema abmelden möchten, rufen Sie https://groups.google.com/d/topic/mavlink/taKTypzeRNw/unsubscribe auf.
Wenn Sie sich von dieser Gruppe und allen Themen dieser Gruppe abmelden möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.

Travis Taylor

unread,
Jun 14, 2016, 1:10:57 PM6/14/16
to MAVLink
Hey, I know it's been a while since you all were discussing this issue, but I have recently started working with MAVProxy and am running into the same issue as Trieste, it seems.

I am attempting to connect a Jetson TX1 (companion computer) via Serial port to Telem 2 on the Pixhawk, with just the TX, RX, and GND pins connected - the pixhawk is powered through a USB connection to a separate computer running Mission Planner. Following the bare-bones directions provided in the github documentation (https://dronecode.github.io/MAVProxy/html/getting_started/quickstart.html etc.), I receive the "Waiting for heartbeat from /dev/ttyTHS2" message that Tridge implemented. From this point, no MAVLink commands elicit any response from the prompt.

 If I use the --nowait option, it continues forward, but after the heartbeat wait times out (i.e. about a second), the command displays "link 1 down" and no further commands elicit a response (essentially the same as without the --nowait). 

Am I missing something here, in trying to connect a companion computer to the Pixhawk before I've really set up the baseline system? Did you find a resolution to your problem, Trieste?

Thanks for any guidance,
Travis

dees...@gmail.com

unread,
Aug 5, 2016, 1:03:57 PM8/5/16
to MAVLink
Hello Travis!

I am working on a similar setup (Jetson TX1 and Pixhawk).. Did you by any chance overcome this error and tried sending mavlink messages? Kindly let me know! It's great to come across someone who is working with TX1.

Regards,
Dee

Travis Taylor

unread,
Aug 8, 2016, 3:13:50 PM8/8/16
to MAVLink
Dee,

I actually did not. I ended up moving to another part of my project, which implemented the Dronekit API over a radio comlink and didn't necessarily require the use of a TX1. So, I haven't gotten back around to integrating the TX1 with the Pixhawk.

I'll be sure to let you know if I do get back to this issue, though.
Travis

Yang Dongshan

unread,
Sep 26, 2016, 11:01:22 AM9/26/16
to MAVLink
Hi, all
      I met this problem too. I used to connect pixhawk with USB cable to Computer USB port, the connection was failed. then I power the pixhawk with external power, but not the computer USB port, it works. 
    I hope my experience will help you too.


在 2016年8月9日星期二 UTC+8上午3:13:50,Travis Taylor写道:

Fatina Shahzad

unread,
Jun 6, 2020, 8:33:15 PM6/6/20
to MAVLink
Hi, I'm working on APM 2.6 connected to an Rpi. And when I use the command 'sudo mavproxy.py', after waiting for a heartbeat it gives me a 'MAV> link 1 down' instead of an online connection to my drone. Can you help me with that?

Hamish Willee

unread,
Jun 8, 2020, 7:39:33 PM6/8/20
to MAVLink
Adding to a 4 year old post is pretty bad necrobumping. Suggest you ask on https://discuss.ardupilot.org/c/ground-control-software/mavproxy/73
Reply all
Reply to author
Forward
0 new messages