APM Planner forgets UDP settings..?

Hey all,

I have a UDP link set up to my APM::Rover, which normally works fine, with the exception of one issue.

If the Pixhawk is sending UDP packets, and I start the APM planner, it will immediately begin receiving packets and showing telemetry data, however it cannot send commands to the Pixhawk, only listen. In order to allow it to send commands, I have to go into the settings for the UDP connection and click “Add IP”. After entering the proper IP and port, it suddenly works.

IF I restart the APM Planner after this, I cannot write to the Pixhawk until I repeat the same procedure.

Any ideas?

Additional question: If this cannot be fixed in the APM planner, can I write a python script to automatically run at startup and reconnect?

It’s an easy fix, just raise it as an issue at github.com/diydrones/apm_planner

But first test with 2.0.16-rc3 as that probably as the fix for MAVLink packet routing that is in you current version 2.48 of rover

You can download it by selecting the beta check box in APM Planner 2.0 Config or go to firmware.diydrones.com

Thanks Bill. I’m pretty sure I am running the beta, but I will recheck and post an issue if I am not.

I have a demo coming up where I have to make this work, and if it’s not fixed, I’m wondering about compiling the source myself and just including a couple of lines to automatically add the connection every time the program is started. I actually see a few lines that do exactly this in the source. I’m hoping I don’t have to do this though. It looks like the Windows APM Planner build guide hasn’t been updated in some time. :confused:

I’ve jus verified and this is not an issue. It works overtime for me as expected with 2.0.16-rc3 and SITL using UDP.

You could try deleting the settings file at ~/.config/com.diydrones/

I’m not sure what OS you are using, but the above is the location on Linux/OSX for windows I can’t remember the exact location but some like $HOME/.config would make sense

PS: can you post more about your system. ie. OS, ArduPilot version, Ardupilot Type, log file from ~/apmplanner2/log.txt file etc…

Hi Bill,

I posted this as an issue, but before I saw your comment. I tested it on .15 and .16 RC3. Both have the issue.

Win 8 (Surface Pro 3)
Brand new Pixhawk, Star tech RS232 to ethernet adapter
I’m using it with APM::Rover FW.

I’ll see about getting logs right now… I’m also on Gitter if you can chat there.

pastebin.com/7j3VCHhR

[quote] INFO 2015-03-02T10:14:08.565 UDPLink::UDP connect QHostAddress( “0.0.0.0” ) : 14550
ERROR 2015-03-02T10:14:08.568 bind failed! QHostAddress( “0.0.0.0” ) : 14550
INFO 2015-03-02T10:14:08.569 UDP Created "UDP Link (port:5557)"
INFO 2015-03-02T10:14:08.578 UDP disconnect [/quote]

Note the above lines. 5557 is my local port, but no mention of the proper host name or remote port!

Interesting, my log has the same issue, but I can control SITL using UDP no problem. I haven’t had time to look at the details. sorry. And I think this is potentially a windows only issue. I’m using OS X 10.10

I suspect you’re right :confused:

I think it’s saving and recalling the settings fine, but having an issue opening the port. I bet it’s a quick fix too.