Connecting to Dronekit with Navio2

I’m trying to run Dronekit Python on the same RasPi that I’ve got Navio2 on. How do I connect the thread running my Dronekit Python script to the thread running ArduRover?

I’ve tried launching example with these command line command but I’m getting no-heartbeat timeouts:

python --connect udpin:


python --connect udpin:

1 Like

Hello and welcome!

I just followed the instructions obtained from this tutorial and it worked fine. The only adjustment I needed to make was setting address supplied to the to After that I launched ArduPlane like this ArduPlane -A udp: and got feedback from the Dronekit script.

I hope it’s going to help you!


I used it in this way:

1.- Open a terminal to the RPi2 (ssh): # ArduRover -A udp:
2.- Open a new terminal and in the examples directory: # python ./ --connect udp:

I have had a issue with the “home location” the first time … but now is running well.

On the other hand, I have tried to connect remotely from my laptop, with a wifi dongle or wired LAN, like this: # python ./ --connect, where is the RPi IP … but I haven’t had luck.


I managed to run the connection remotely.

1.- Launch ArduPilot (in my case arucopter) like this: # sudo ArduCopter-quad -A tcp:

where is just the IP of the RPi2 (not localhost, not IP of GCS o laptop).

2.- In the remote machine: # python ./ --connect tcp:

Then now we have an open door to write programs that can interact remotely with the RPi2.

Bye …


You have to use the IP of your GCS computer with udp.

Oscar: That worked! Many thanks. I assume home location will populate once I have GPS lock.

Yes. It works. You can change the tcp:IP_of_the_remote:14550 in the ardupilot command by tcp: Or use the udp if you wish.

About the GPS lock … I have the same problem now … I think that if you are indoor (in home) the GPS is not capable of obtain a location. This is that the example: outs:

Connecting to vehicle on: tcp:

APM:Copter V3.4-rc1 (dfa90d29)
Frame: QUAD

Get all vehicle attribute values:
Autopilot Firmware version: APM:Copter-3.4.0-rc0
Major version number: 3
Minor version number: 4
Patch version number: 0
Release type: rc
Release version: 0
Stable release?: False
Autopilot capabilities
Supports MISSION_FLOAT message type: True
Supports PARAM_FLOAT message type: True
Supports MISSION_INT message type: True
Supports COMMAND_INT message type: False
Supports PARAM_UNION message type: False
Supports ftp for file transfers: False
Supports commanding attitude offboard: True
Supports commanding position and velocity targets in local NED frame: True
Supports set position + velocity targets in global scaled integers: True
Supports terrain protocol / data handling: True
Supports direct actuator control: False
Supports the flight termination command: True
Supports mission_float message type: True
Supports onboard compass calibration: False
Global Location: LocationGlobal:lat=40.7042118,lon=0.5780497,alt=None
Global Location (relative altitude): LocationGlobalRelative:lat=40.7042118,lon=0.5780497,alt=0.0
Local Location: LocationLocal:north=None,east=None,down=None
Attitude: Attitude:pitch=0.00105991587043,yaw=3.07117295265,roll=-0.00470507051796
Velocity: [0.0, 0.0, 0.27]
GPS: GPSInfo:fix=3,num_sat=4
Gimbal status: Gimbal: pitch=None, roll=None, yaw=None
Battery: Battery:voltage=14.016,current=24.81,level=97
EKF OK?: False
Last Heartbeat: 0.357726497
Rangefinder: Rangefinder: distance=None, voltage=None
Rangefinder distance: None
Rangefinder voltage: None
Heading: 175
Is Armable?: False
System status: STANDBY
Groundspeed: 0.290172368288
Airspeed: 0.290172368288
Armed: False
Waiting for home location …
Waiting for home location …
Waiting for home location …
Waiting for home location …
Waiting for home location …
Waiting for home location …
Waiting for home location …
Waiting for home location …
Waiting for home location …

The GPS says: GPS: GPSInfo:fix=3,num_sat=4

Uhmmm …


Finally, I have resolved the “Waiting for home location …” putting the drone outdoor.

I have executed the second example of the dronekit ( remotely from my laptop, without RC or Joystick, and the engines have rotated. I have made the test without propellers.

Now, I am going to write a small pyGtk UI, with dronekit support, to control “in real time” the drone remotely from my laptop. First, I am going to make it with wifi … but in the future I will use 4G modems.


Guys, I guess the issue has been resolved, so I’m closing this thread. Please, feel free to open a new one if you have any questions whatsoever.