My method to connect RPi3 with Pixhawk

Hello every friends!
I success to connect RPi3 with Pixhawk !
And I think I need to share my method to you.
If somewhere is wrong, please tell me, thank you!

By the way, I’m Taiwanese.
So if my grammar has any mistakes, please forgive me.
I am still practicing it now.

Step one
I followed this page
http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

Connect RPI3 with Pixhawk by this picture.


Step two

Download the image file from this page
I chose the NOOBS (not the NOOBS LITE)
Raspberry Pi OS – Raspberry Pi

And set the parameters in pixhawk like the picture.

SERIAL2_PROTOCOL = 1
SERIAL2_BAUD = 921
LOG_BACKEND_TYPE = 3

But if I set “SERIAL2_BAUD = 921”, it’s will fail.
So I changed it to “SERIAL2_BAUD = 57”, and then it’s successful.

Step three

Connect the WIFI, and confirm that it’s can surf the internet.
Download these packages.

By the way, if you have mistakes in the period of downloading “pymavlink”.
Maybe you can try to download the package “future” first. (sudo pip install future)
And then try to download “pymavlink” again, maybe it will work.

when you finish the packages, please update again (sudo apt-get update)


Use the command “sudo raspi-config”
And set the serial is enable.

Step four

Just like this picture

Use the command “sudo -s”
It will show “root@raspberrypi:/home/pi#”

and then use the command “mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter”
It will show some information , but it will stop at the row of red line, just like
MAV>
And use the command “sudo screen -r mavproxy”
It will show "MAV> " again.
Press “Ctrl+C”, back to “root@raspberrypi:/home/pi#”

Use the command “mavproxy.py --master=/dev/ttyS0 --baudrate 57600 --aircraft MyCopter”
And it will connect each other successfully !


The only different way from before is using the command “sudo screen -r mavproxy”
I used this method on two pixhawks and two RPIs, both of their connection are successful…
But…I don’t know why…I’m so confused…

If anyone know the reason, please discuss with me, thank you!


Wish every friends can solve this problem successfully !
Cheers!

DS Wang