Dronekit doesn't connect

Hello , when i try to run the python script i get the following error :

this is my setup :

and this is the test code :
Screenshot from 2020-03-28 01-37-59

I checked the version of pymavlink which may be the problem :

I tried finding a solution on the github dronekit issues https://github.com/dronekit/dronekit-python/issues
but the problems others encountered should not be the same with using navio2 as it comes with preinstalled dronekit and mavproxy … so i didn’t have to install anything on the navio2 emlid raspbian release . I also tried reinstalling the image and updating and upgrading before trying to run dronekit but it didn’t work too .
Everything worked fine and i was able to connect i run my scripts when working with SITL but when trying to connect to the real drone it doesn’t work

UPDATE : I tried to work around the problem until emlid fixes this issue with dronekit by using mavproxy in the following method :
1>set gcs in navio2 to which is the ip of my laptop
2>next run mavproxy on my laptop (GCS) and specify master to be the local host and forwared the mavlink messages to (which is the ip of the raspberry pi that navio2 is on ) using --out
3>finally i run the python script on my laptop specifying the local host as the connect argument in this way : python2 myscript --connect

And again another problem that has been there for about a year with no solution :
GPIO_Sysfs: Unable to get value file descriptor for pin 4.
GPIO_Sysfs: Unable to write pin 16 value.
repeating infinitely
I saw this problem has been posted in the community forums here Arducopter spams GPIO related mavlink messages
which states to work around this problem by typing : set shownoise False
but it didn’t solve the problem .
Please Emlid team try fixing the problem , because these specs are what distinguish navio2 from other flight controllers , so what’s the point if they can’t run .

Hi Moe,

Thanks for the update!

We’re currently looking into the issue with the GPIO_Sysfs error. Sorry it takes longer than expected.


Hi @polina.buriak any updates on this? I’m running into same error i.e. connection timeout/ no heartbeat in 30 seconds.

I’ve spent the last 2 days trying to fix this one and have gotten nowhere. Any help here would be highly appreciated. Thanks in advance

Hi @curiosityrover,

We’re working on fixing this issue. I’ll be in touch immediately once there’s any update.

Meanwhile, may I ask you if you have tried the workaround described in this community forum thread?


Thanks for the reply.
running ‘set shownoise False’ only suppresses the messages. It doesn’t help dronekit.
One thing I’ve tried that has made dronekit work is by rebuilding the ardupilot source and pointing ardupilot.service to the new build rather than arducopter.service but this then diconnects mission planner from the drone.

Hi @curiosityrover,

Thanks for the update! We’re looking into fixing this.

Hey everyone,

We’ve updated the packages so that the GPIO_sysfs error should be eliminated. Now you can get the correct 3.6.11 version of ArduCopter by running the following commands:

sudo apt update
sudo apt upgrade

It’d be great to hear if this update solves the issue for you.

1 Like

You can check out the new Navio2 image that solves the ‘GPIO_Sysfs’ error. The details are in this thread: