Well i finally got it working.
I have a pi3 so ive remapped the correct pins to the serial uarts and disabled the console.
To summarise the ports on a Raspberry Pi 3 have changed so all diagrams for wiring are wrong for the pi3 and pixhawk
/dev/ttyAMA0 -> Bluetooth
/dev/ttyS0 -> GPIO serial port.
Enable Uart On pi3
$ sudo nano /boot/config.txt
and add the line (at the bottom):
enable_uart=1
Disable Console
sudo systemctl stop serial-getty@ttyS0.service
sudo systemctl disable serial-getty@ttyS0.service
sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service
remove the console from the cmdline.txt.
$ sudo nano /boot/cmdline.txt
you will see
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2
rootfstype=ext4 elevator=deadline fsck.repair=yes root wait
remove the line:
console=serial0,115200 and save
Swapping the Serial Ports on Raspberry Pi 3
$ sudo nano /boot/config.txt
and add:
dtoverlay=pi3-miniuart-bt
reboot for changes to take effect.
Login to raspberry pi Download Ser2net
https://sourceforge.net/projects/ser2net/files/latest/download
Extract is ant then install by running
./configure
make
make install
enable it by typing
ser2net -C udp,14550:raw:600:/dev/ttyAMA0:57600
Use mission planner to connect using UDPCI using the IP of the PI and port 14550
Now to configure UAVCast with this!