Servers by jDrones

wait_Ready=True causeing code not run and time out

(Brian Duvall) #1

Hello all,
I have a RPI3 set up in a plane with a original pixhawk on board. So here is what I am doing before I try to run my script.
I take off in manual mode until I reach 100m
I then switch to RTL mode
With the plane circling at 100 meters over the home location I try to run my python code using dronekit.
Here is my problem the wait_ready=true option in the connection string is causing the connection to time out.
I see in the documents for wait ready true that the code will wait for all default attributes to be downloaded.
could it be that it is looking for manual mode or something?

If anyone has any ideas it would be much appreciated.


(Brian Duvall) #2

I think notice in the first image I am getting an error that my link is dead then when I run the exact same code again I do not the that the link is dead but it times out in the wait_ready. I just thought I would add some screen shots.

Also my baud rate is set in my code @115200. In the pixhawk params for telem2 I have also set this to 115200.

The strange this is sometimes the code runs with no connection problems at all.

(peterbarker) #3

You might try updating the dronekit-python on there; more recent versions
can be more verbose in terms of what’s going on when you’ve got wait-ready

(Brian Duvall) #4

So I just figured it out. The gpio port on the pi can’t seem to run 115200 baud. I tried connecting with a serial to usb and that’s works every time!