PX4 on Raspberry Pi 2. Problem with mavlink connection

Greetings. I have cross-compiled PX4 for the Raspberry Pi 2. The problem is that I cannot get Mavlink output on the serial device.

The Rpi 2’s UART0 (/dev/ttyAMA0) is connected to a PL2303 USB TTL adapter (/dev/ttyUSB0) which is connected to a machine running Ubuntu 15.10.

I am a complete beginner with PX4 and do not own any Pixhawk hardware. My understanding is that after creating a Mavlink stream in PX4 on the UART that I should see junk data on the other side. Instead there is no output. Additionally, ‘mavlink status’ doesn’t indicate that any data is being sent.

pi@navio-rpi ~ $ uname -a
Linux navio-rpi 3.18.9-rt5-v7+ #1 SMP PREEMPT RT Thu Mar 26 10:31:34 UTC 2015 armv7l GNU/Linux

Configuration of /dev/ttyAMA0

pi@navio-rpi ~ $ stty -F /dev/ttyAMA0
speed 57600 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost
-isig -icanon

Test of /dev/ttyAMA0

Ubuntu Machine

user@ubuntu ~ $ cat < /dev/ttyUSB0

Raspberry Pi 2

pi@navio-rpi ~ $ echo "hi there this is a test" > /dev/ttyAMA0

Ubuntu machine

hi there this is a test

PX4 mainapp running

pi@navio-rpi ~ $ ./mainapp 
[init] shell id: 1995
812864
[init] task name: mainapp

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

Ready to fly.

pxh>

PX4 starting mavlink

pxh> mavlink start -d /dev/ttyAMA0
WARN  mode: 0, data rate: 2880 B/s on /dev/ttyAMA0 @ 57600B
WARN  offboard mission init: ERROR
pxh> WARN  Disabling hardware flow control

PX4 create HEARTBEAT stream

pxh> mavlink stream -d /dev/ttyAMA0 -s HEARTBEAT -r 1
WARN  stream HEARTBEAT on device /dev/ttyAMA0 enabled with rate 1.0 Hz

Ubuntu machine output

user@ubuntu:~$ cat < /dev/ttyUSB0

No output on the serial device.

PX4 mavlink status

pxh> mavlink status

instance #0:
    mavlink chan: #0
    no telem status.
    rates:
    tx: 0.000 kB/s
    txerr: 0.017 kB/s
    rx: 0.000 kB/s
    rate mult: 0.050        
pxh>

This is the interesting part - the system is telling you that it can’t actually transmit anything via the port. If you contact me on Gitter I can handhold you a bit during the debugging to figure out why nothing could be sent through the serial port.

Hi!

I am having the same problems, did you manage to get it working?

Nacho