Servers by jDrones

Raspberry Pi 3 connecting to Pixhawk

I am following the manual from here to the letter:

http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

And after running the script I end up waiting for the heartbeat and they do not connect.

I know to change the starting parameter since the RPi3 has changed the ttyAMA0 for ttyS0 and I checked the baud rate and have set both the pixhawk to 115200 on serial 1 and 2.

My starting line is as follows:

mavproxy.py –master=/dev/ttyS0 –baudrate 115200 –aircraft MyCopter

Any ideas whats wrong?

Nobody has any ideas? Am I the only one trying to connect a Pi3 to Pixhawk?

How about attaching a picture of your wiring?
I have not tried with rpi3 but i see no reason why this should not work.

Thanks for replying. I set it up identical to this:

Hi markvanhaze,

Have you ever solved this problem? I’m still under this trouble for days…

Hi, have a look at my reply here:
http://discuss.ardupilot.org/t/connecting-raspberry-pi-to-pixhawk/9784

am having the same issue here, it so bad that no one is helping out

Check the serial settings on the rpi. There is a post somewhere that explains dev/tyyAMA0, or similar… I am no pro, but it was renamed.

Edit this may get you on the right track.
https://frillip.com/raspberry-pi-3-uart-baud-rate-workaround/
https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=138223

From my link above:

Also make sure to disable (0) BRD_SER1_RTSCTS or BRD_SER2_RTSCTS depending on the telemetry port you’re using.

Hi,

be shore that the versions of Arducopter , pymavlink and MAVproxy are from almost same dates of release.
i have APM2.6 with Arduplane 3.4 and doesn’t work with the last versions of MAVproxy and pymavlink.

Best,
E.T.

Hi…!!

I had the same problem with my Raspberry pi3 and Pixhawk. I followed the instructions exactly as it says and didn’t work. Then realized that the problem is that you must connect your GPS (I am using 3DR ublox) properly to the pixhawk. You must get a GPS lock for that to happen. This is what I experienced. Don’t know what your problem is. But thought this might help.

Wish you all the best with your project.

DMB_A

Has anyone been able to resolve this issue? I’ve been also trying to connect a RPi 3 and have been following the ArduPilot Wiki without luck. I also found a YouTube video that follows the steps with some slight variations but without any luck. See link to video tutorial. Anyone had an y luck here?

That’s a good video, all the tricky info is between 10:00 - 11:30, this is explaining the enabling of the serial port and setting the right port and getting control over this port using root privilege (sudo -s).

There are many variation but basically, you need to check the devices using ls /dev/tty* and select an active port. Sometime it might be simpler to connect a usb-serial FTDI converter on the RPI because it is generally mapping as ttyUSB0 and it is pretty easy to see looking at the /dev you can see appear and dieappears as you connect and disconnect the USB converter.

Another simple test you can do is to read on the serial port using screen
sudo screen “port_name” 57600
You should see funny characters appears, thtas because MavLink send binary messages.
To exit GNU screen, type Control-A k.

Once you can confirm you read datat on the port, MavProxy should start on the port assigned.

There is no magic, just simple tools and logic…good luck :wink:

Thank you for your quick response. I’ll look into it further.

With the Pi3 you need to make sure that you’ve disabled bluetooth and are using the real ttyAMA0 device - the docs on the ardupilot wiki need updating. Make sure you have ‘dtoverlay=pi3-disable-bt’ set in /boot/config.txt and reboot.

@fnoop can you explain a little bit about why we would enable/disable RTS/CTS? I’m running some Pi3’s and having some mission syncing issues. I’m thinking disabling that would fix the issue?

@Kevin_K raspberry doesn’t have flow control pins, so you only connect gnd,rx,tx to the telemetry port. Ardupilot should detect if flow control is present or not, but it often gets it wrong so better to turn it off explicitly in the parameters. If you don’t, it’s known to cause problems.
If you’re using ttyS0 instead of ttyAMA0 then you may see intermittent data issues depending on the current clock/core speed of the cpu.

1 Like

@fnoop Thank you as well for chiming in. I still seem to be having issues on making the serial work. Is there a recent and step by step source that gears more for the RPI3? Also, how were you able to accomplish the wiring from telemetry 2 to your RPI3? I basically am using a similar telemetry cable that I’m also using with my RFD telemetry radio. I’m only connecting the rx, tx and gnd. See attached img. I’m hoping my issues is not related to how I’m wiring to the Pi3. I’ve decided to do a fresh install of Pi since I’ve done so many tweaks. Lastly, is there a specific Pi OS I need to be using? I’m on the most recent. How about Ardupilot firmware? Plane, copter?

BTW here is a pretty god blog explaining how BlueTooth has "stolen’’ the ttyAMA0 and methods for getting it back on GPIO

P.S. I dont recommend getting the latest Raspian Stretch https://www.raspberrypi.org/blog/raspbian-stretch/
I has implemented the new debian 9 method for naming interfaces… https://www.debian.org/releases/stable/amd64/release-notes/ch-whats-new.en.html#new-interface-names
@fnoop , I think that will be the next big support issue :wink:

which distro release should I be using?

Servers by jDrones