Dronekit stuck connecting

I have been sucessfuly running programs using dronekit, and particularly this script. But, a day, i take off the RX and TX wiring and connect them all back again. But, this time it seems like it doesn’t pass the vehicle connecting command. I put a print() on before and after that command, and as what i guessed, the program only getting to the “before” print(), and then stuck at the:

“vehicle = connect(‘/dev/ttyAMA0’, baud=921600, wait_ready=True)”

and also, i tried to test the “mavproxy.py” command, but it doesn’t show the data from the vehicle fully (only some parts of it, like the flight mode) and i can’t send any command, like:

mode GUIDED
arm throttle

all of them are kind of being ignored.

Does anyone know what are actually the cause? Thank you very much

Have you connected TX to TX, RX to RX?
Or does the account have the rw access for /dev/ttyAMA0?
Have you tried debugging your connection, is it healthy with a PC terminal program? example code.

1 Like

Are you sure that your using the correct baud rate of 921600? I use baud=57600 and it always connects.

1 Like

I am not sure anything to do with this. anyway, you have to take note. you can verify likely not, because your MAVproxy also not working.

1 Like

Yes, i have. Turns out when i replaced the Raspberry Pi, the problem’s gone. Does it have anything to do with the RX and TX of the previous Raspberry Pi?

Sure do, i have set it correctly

You can try to verify the previous RPi using a modified this demo python code with a terminal program that accept keyboard input via something like USB serial dongle.

This demo code will loop back the keyboard input to verify both RX and TX connectivity.

1 Like