Mission Planner claims UDP socket already bound

When I try to start listening on a UDP port, sometimes MP refuses, saying the port is already in use. netstat shows nothing for UDP. Restarting MP has no effect. Even restarting Windows doesn’t always solve the problem. This seems to happen with port 14550 specifically.

There’s got to be something very simple I’m missing.

It appears that as soon as MP starts, it opens a number of ports, including 14550 and 14551. I wonder if there is some bit of persistent data that tells it to open these specific ports (I’ve used both previously), and then it tries to open them again. Using 1.3.74 (build 1.3.7563.27684)

$ netstat -anbp UDP | grep -A2 MissionPlanner
 [MissionPlanner.exe]
  UDP    0.0.0.0:5050           *:*                    
  CDPSvc
--
 [MissionPlanner.exe]
  UDP    0.0.0.0:5353           *:*                    
  Dnscache
--
 [MissionPlanner.exe]
  UDP    0.0.0.0:5601           *:*                    
 [MissionPlanner.exe]
  UDP    0.0.0.0:14550          *:*                    
 [MissionPlanner.exe]
  UDP    0.0.0.0:14551          *:*                    
 [MissionPlanner.exe]
  UDP    0.0.0.0:50948          *:* 
$

these are part of the autoconnect. so you need to have your remote end broadcasting already

Thank you, @Michael_Oborne. I’m not sure how this is supposed to work. I have Ardupilot running on a Linux board, sending UDP packets to gcs:14550. MP comes up, it shows the connection icon as disconnected. I click “connect,” it asks me about the port, I say 14550, then it says it can’t because the socket is already bound. What should i be doing instead?

what it the bound port you are sending from on the linux side? is it 14550? or random asignment?

you can turn off the autoconnect, but currently you need to manualy edit the config file
goto your home dir > mission planner > config.xml

and edit
[
{
“Label”: “Mavlink default port”,
“Enabled”: true,
“Port”: 14550,
“Protocol”: 1,
“Format”: 0,
“Direction”: 0,
“ConfigString”: “”
},

change the enabled to false.

Random, I assume. But I haven’t seen the code.

Just FYI, if someone sees this on Windows systems, I had a problem with Mission Planner not auto detecting the ESP8266mod wireless, and all params looked correct. I turned on the help → show console window, and MP said that another program was listening on 14550. I pulled up the task manager, and turns out a zombie windows MP had been running, probably since yesterday. I ended it, restarted MP and it detected the wireless module no problem. Hope this helps if you run into the same issue.