Connect Navio2 Rpi4 to Mission Planner using Wlan

Hello all, I am currently trying to connect my navio2 to the mission planner. I followed the documentation here

I found that while connecting to mission planner the planner threw an exception:

Only one usage of each socket address (protocol/network address/port) is normally permitted
at endPoint Snapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at MissionPlanner.Comms.UdpSerial.Open()
at MissionPlanner.MAVLinkInterface.OpenBg(IprogressReporterDialogue PR sneder, Boolean getparams)
at MissionPlanner.Controls.ProgressReporterDialogue.RunBackgroundOperation(Object o)

I do not know exactly what is the problem. I am not using a telem module. Is there a way to solve this? I am using my IPv4 address as my IP

I followed some thread back in 2016 having a similar issue but could not follow them with all the software updates and being a newbie at this. I can provide more details if required.

What I understood is my Navio2Rpi4 is trying to use the same address to communicate as the mission planner or?

unfortunately you have not mentioned any specifics. I.e. what version Windows are you using ? Using any anit-virus software ? Firewall? What version Mission Planner? …
Just as an alternative try using QGroundControl and see what happens there.
What type of connection are you using ? - UDP or TCP?
Remember, when using UDP you need to enter IP address of your ground-station. (computer). But when using TCP you have to use the IP address of your drone.
I assume you know how check those ?

Windows Version: Windows 10,
Antivirus: Wiindows in build.
Firewall: Windows in build
Mission Planner Version: 1.3.72
In Qgroundcontrol it just says waiting for connection and nothing happens.
I am using UDP in TELEM 1 with the -A flag, I specify my laptops IP address. While connecting with mission planner by selecting UDP I get the above mentioned error.

I am also using the latest image found on navio documentation which was releseased in november 2019

I was able to successfully able to connected with the dronekit though by building ardupilot from source. I was able to get the stats successfully but while arming it did not work as it was uncalibrated.
To calibrate I need to use one of the three solution and I have seen mission planner is a good option. But here I am stuck trying to connect. One more thing I removed the original local host IP TELEM1="-A udp:" to TELEM1="-A IPv4:14550" the rest are all commented our or kept as original.

Recent versions of MissionPlanner report this error when I try to use port 14550. Try a different port, like 14551 etc. and see if it works.

Okay I usually work at nights so I will try it after I get back. And was it that simple just changing the port… ahhh I feel stupid now. How do I connect to Qground control though? It seems to give an automatic reply waiting for a connection in red on the top right corner and I could not find any connect button like in mission planner.
Thanks a lot hopefully this will. I will try it ou and close the thread if that works

I would still use the correct IP address and not just IPv4.
The other option is to use TCP but you’ll need to enter the correct IP address of your drone in the ground-station. Also the line in Rpi has to be changed to: TELEM1="-A TCP:" so that Rpi listens on any address but on relevant port.
For some reason I had problems with UDP but TCP works fine.
Changing the port is certainly helpful if another software is using the port already. Sometimes good idea to check which ports are in use before selecting a port.

  • QGC …has settings menu when you click on the “Q” in the top left corner. Then select " Comm Links" After that just click on “Add” at the bottom to create a new connection. The advantage in that regards is to have predefined settings for various setups and you need only to click on the relevant one at a time. ( I have one setting for local WiFi connection and a different one when flying drone via LTS / 4G ).

Yes, I have both the IPv4 and the IP its the same with just 100 and 1 respectively at the end. I tried with both but did not change the port number. However, I was trying to change the port number on the mission planner when the error message pops up it gives an option to change the port on it. That’s why I felt stupid when Sebastian pointed it out.

I did not try with TCP as I thought it would make it slow (read it somewhere I suppose).
I have to read about QGC I am not that familiar with it.

I am actually trying to make it autonomous. If there were some option to calibrate the navio2 without using these it would have been great. As I got the dronekit to communicate with the navio2 rpi4 setup. Just while arming it said none of the sensors are calibrated and thus was stuck in the loop. I tried to fiddle around with the dronekit source code to not make the checks and messed it up and had to reinstall it.

UDP is a connectionless protocol. It is better suited for wireless telemetry purposes, because connectionless means, the UDP sender does not care if anyone listens, it just sends the data and does not wait for a confirmation. If the wireless links drops and reconnects, the data just starts coming through again. TCP requires every send package to be acknowledged by the receiving end. If, for some reason, there is no acknowlegdment, the sender tries to resends the package a number of times and drops the connection after that. This also causes more overhead and latency on the telemetry link.
You do not actually calibrate the Navio2. Every setup, sensor, enviroment is different, so ardupilot has to know the offsets it has to apply to the raw sensor values. There is no way around calibration to get a working vehicle.
Calibration works well over a wireless link, despite Qgroundcontrol suggesting a (USB) cable connection.

I see. Yes I read about the TCP and UDP somewhere over the internet but did not knew about the telemetry link effect. This is some very good information.

I figured there was no way around. When I received one error after another when I was playing around with the dronekit library. But I did not switch the udp port in the TELEM1 option. I was switching it on the mission planner side. Hopefully that works now. Very excited to get back and try it out after finishing my work.

Ahh so you require one of the software to calibrate the sensors it but what I am wondering is, can we not do it on the pi itself with the local port? But I suppose we have to write our piece of software then.

If you do not plan to use ardupilot/px4, then your software will have to handle the sensor calibration. Otherwise it is a onetime process through the GCS of your choice for all sensors except the gyros, which get calibrated on each power up (red/blue blinking).

What I meant was instead of using the GCS why not use a software on board of the raspberry for calibration (It can be ardupilot version). In that way for autonomous flying development one has not to worry about the GCS at all. All development can take place on board.

Unfortunatly the calibration requires the vehicle to be moved by the user and also feedback for the user by the GCS. It is not possible for the vehicle to do it all on its own.

I did not understand this

So the feedback okay thanks a lot hopefully I will get it working soon. Thanks a lot

I changed the port to 14553 did not work for me, unfortunately. I am trying to connect with QGround control now

Solved the problem. I had to just sudo apt-get update and upgrade the pi. Misison planner connected like putting butter on bread. Closing the thread. Thanks a lot to all for their help.


This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.