Just receive Navio2 and trying to get it working with Mission Planner

I have my new Navio2 hooked up to my new Raspberry PI3 and have the wireless working, can connect with Putty to shell.

I don’t have any telemetry hardware installed yet, as I am just trying to play on my bench with the Pi/Navio2.

I did get the recommended image from the DOCS installed on SD card, ran the update per the documentation, copy and pasting the commands. I think this is find as I can connect to the Pi over my WiFi.

I also did the sudo apt-get update && sudo apt-get dist-upgrade and this completed and rebooted fine.

I load the APM per the docs using the commands sudo apt-get update && sudo apt-get install apm-navio2

I am able to load APM on the Pi using the command sudo ArduCopter-hexa -A udp:192.168.0.15:14550
My bird is a Tarot 680 pro hexacopter and it’s ip address is 192.168.0.11. My GCS is Mission planner running on Windows 10 at ip address 192.168.0.15.

I have also tried to use ArduCopter-quad thinking maybe the ArduCopter-hexa was not working.

When I load APM on the Pi using the command above I get the response Raspberry Pi 2 with BCM2709, from what I read in other posts this is fine.

Back in Mission Planner I select UDP port 14450 and try to connect, but it just sits there waiting for UDP.

I guess my question would be do I need a telemetry module to get APM to talk to Mission Planner, I thought this would be a Pi process and would run with/without the telemetry module. I have a cheap HKPilot one on order but not hear yet.

Also is there anything I am doing or omitted from above that is wrong?

Thanks for checking,

Hank

Did you try connecting by udp on port 14550?

Yes, I set Mission Planner to UDP and port 14450 per documentation. Sorry I didn’t make that clear.

Everything you did seems to be correct. Try to disable the Windows or any other firewall on your PC. If it works without the firewall, add a rule allowing missionplanner to communicate via UDP and TCP.
A telemetry module is not mandatory to get APM to run on the RPi, but it might have more range than wifi.

Sebastian,

Thank for the reply. Shortly after my last post I though of that, I did allow Mission Planner, apmplanner2.exe, and arducopter through the firewall by making sure they were added to the list of apps allowed through Windows Firewall. Unfortunately that did not fix the issue either.

I may uninstall and reinstall Mission Planner as I enabled the beta updates, maybe that is messing with the communications?

Hank

I reloaded Mission Planner and tried again, no luck.

I then tried to start ArduCopter-hexa -A tcp:192.168.0.15:5678

and then connect via TCP in Mission Planner to 192.168.0.21 (ethernet port on Pi) using port 5678.

I get a message in Mission Planner saying No connection could be made because the target machine actively refused it at 192.168.0.21:5678 at System.Net.Sockets.TcpClient…ctor(String hostname, Int32 port) at MissingPlanner.Comms.TcpSerial.Open() in C:\Users\michael]\Source\Repos\MissionPlanner\Extlibs\Coms\ComsTCPSerial.cs.line128… and it goes on

I can rebuild my SD card for the PI but I am not sure that is the problem.

Hank

With TCP you need to start Arducopter with the IP of the RPi. Arducopter then listens for incoming connections.
You can also start Arducopter with
-A tcp:0.0.0.0:5678
this way APM will listen on all network devices for an incoming connection.
In Missionplanner you still have to enter the actual IP of the RPi, not 0.0.0.0.

Sebastian,

Thank you for catching my mistake, I tried -A tcp:0.0.0.0:5678 but unfortunately that still does not work.

I am curious, if I check the running services on the Pi using sudo service --status-all, I do not see Arducopter as a service running. Also if I use the command sudo netstat -lptn I don’t see Arducopter listening, only sshd which is giving me my putty terminal session.

Am I wrong to expect Arducopter listening on the port or running as a service in the background on the Pi?

Hank

Hello there!

Add :wait after port. This should help.

George,

Hello, OK, I put the :wait on the end of the Arducopter command, and I get a message waiting for connection on 0.0.0.0…

Then I go back to Mission Planner and click on connect with TCP selected. I put the IP address of the Pi and the same port that I used for the Arducopter command 5678. I get a connected message on the Pi, then returns to the $ prompt. In Mission Planner it starts a timeout count down from 30 seconds, then errors out when it hits zero. Also Mission Planner goes to disconnected.

It is as though the listener service with Arducopter is exiting prematurely. Not sure why. Maybe I will burn a new Pi image and start from scratch.

Hank

Yea, after rebuilding the image, when running ArduCopter now it does not automatically exit and Mission Planner connects as it should. Thanks for the help.

Hank