Problems connecting Pixhawk to Raspberry Pi

Hi there,

I am following the steps to connect pixhawk to raspberry pi 2 
as described here:
http://dev.ardupilot.com/wiki/raspberry-pi-via-mavlink/

I have tried using a SD card that is flashed with the current ardusub raspberry pi filmware and I have tried setting up the SD card from scratch. Both ways have brought up the same error code when I type:
 mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter

I get the following error: 

Connect /dev/ttyAMA0 source_system=255
Failed to load module: No module named terrain. Use 'set moddebug 3' in the MAVProxy console to enable traceback
Failed to load module: No module named adsb. Use 'set moddebug 3' in the MAVProxy console to enable traceback
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2016-10-19/flight1
Telemetry log: MyCopter/logs/2016-10-19/flight1/flight.tlog
MAV> Waiting for heartbeat from /dev/ttyAMA0

Please let me know if you have any suggestions!
Thanks, 
Madi

Hi Madi,

There is a script on the ArduSub Raspberry Pi firmware image that starts mavproxy automatically. It is located at:

~/companion/RPI2/Raspbian/start_mavproxy_telem_splitter.sh

You can modify the command in there and then restart your Pi and it will run that command. Your command is probably conflicting with the one that is already running.

Also, we haven’t tested this with Copter, so you might have to change other things as well. I’m not sure on that.

-Rusty

After changing that command this is the error I get:

mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter
Connect /dev/ttyAMA0 source_system=255
Failed to load module: No module named terrain. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback
Failed to load module: No module named adsb. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2016-10-19/flight2
Telemetry log: MyCopter/logs/2016-10-19/flight2/flight.tlog
MAV> Waiting for heartbeat from /dev/ttyAMA0
online system 1
Mode(0)> Mode Mode(0)
f`f#no link
link 1 down
no link
no link

Madi,

Do you have the Pixhawk connected by USB or through the Telem1 port? The USB port defaults to a baud rate of 115200 so you’ll want to change that if you’re using USB.

-Rusty

Rusty,

I was previously using the Telem2 port. I tried downloading the latest version of the ArduSub software to a new SD card and connecting the Pixhawk to the Raspberry Pi through the USB port as directed. I am still getting that error code. The USB is wired to the GPIO pins on the raspberry Pi correct?

Madi,

Okay. How are you flashing the Pixhawk? Are you sure it is flashed properly? Have you connected it to your computer directly via USB to ensure that it is running properly?

The USB is not wired to GPIO pins on the Raspberry Pi.

Can you provide more details on exactly how things are wired up? A picture would help.

-Rusty

I just flashed the Pixhawk with the latest version of the filmware through QGroundControl by plugging the Pixhwak directly into my laptop via USB.

The Pixhawk is connected to the Raspberry Pi through their USB ports and the raspberry pi is connected directly to my laptop via Ethernet cable. (See attached)

I am currently in the process of trying to test and see if the new filmware upgrade made a difference.

Thanks for all your help so far