Servers by jDrones

Garbage comming out when Raspberry Pi connecting to Pixhawk over SSH and VNC

(Brian Duvall) #1

Hello All,
I have a vary strange problem, I have made a .py script with dronekit and it has been working for the last four days running and connecting via an RPI. All of a sudden now when I run the script I am getting was looks like garbage characters. See the picture of my terminal.

I get this same response for other examples in the dronekit lib too. The only hint I have was one time I got an error that “/dev/ttyS0 is dead”

Has anyone seen this before this has just happened to me out of the blue. I ran the code yesterday and everything was working then today I am getting this error. I am running arduplane 3.9

(Kenny Trussell) #2

It’s not something as simple as a baud rate issue is it? Not sure how it would have changed on you, but you would get that kind of garbage.

(Sebastian Schürmann) #3

You are trying to connect to /dev/tty and that is not a valid device. The pixhawk should be something like ttyACM0 and if you want to avoid trouble you use /dev/serial/by-id/ and then the ID of the pixhawk that is listed there. This ID stays the same while the ttyACMx enumeration can change.

(Brian Duvall) #4

Thanks for the reply, I feel like a real idiot. This touaght me never to assume when you press the up arrow key the string is right!

Also is see others useing ttyAMA0 but this doesn’t work for me. I have to use ttyS0. I am using an original pixhawk as found in the connecting a RPI to a pixhawk. Is there really a big difference ?

(Sebastian Schürmann) #5

Ah, sorry. My reply was not quite right. The pixhawk will only be ttyACM0, if connected through USB, of course. The RPi3 has an integrated bluetooth, that is connected to ttyAMA0, the other UART is at ttyS0.
Here it is explained in detail:

(Corrado Steri) #6

I have had all kind of probs using ttyS0, what i usually do is disable bluetooth and use ttyAMA0 instead.

have to disable bluetooth, there is a post of mine somewhere in the forum with the exact procedure, please look for it.

(Brian Duvall) #7

I’ll give this a shot. I know how to disable the bt as I have already diable the built in wifi. Thanks for the help!