DIY Rasberry PI HD FPV & wifi telemetry Pix hawk

Home  >>  Uncategorized  >>  DIY Rasberry PI HD FPV & wifi telemetry Pix hawk

DIY Rasberry PI HD FPV & wifi telemetry Pix hawk


My DIY HD FPV project just doing some testing now using wifi

what trying to accomplish stream real time HD video from a small drone, as well as connect to GCS on the same wifi network. I attempted this last year gave up on the Raspberry PI move to a much faster board, after the release of PI 2 I decided to try one more time;  for an fordable price and lots of man hours in work ;).

Parts used: 

1. raspberry PI 2

1. pi camera

1. camera mount or

1. project box

1. wifi adapter

1. 4 gb SD card

1. double sided Velcro tape

1. USB to RC BEC adapter/iphone charger

1. copter Pixhawk ESC MOTORS from

suggest smaller Wifi adapter you must supply 5V 2A to the adapter. both adapters have the same chip set but smaller one works better.

wifi install

camera install

Set up Raspberry PI to connect to Pix Hawk, do not auto start services from /etc/init.d/ skip that part .

there are some more cavorts to this seal to comport communication need to be set up .

prepare com port of Pix Hawk:

sudo apt-get update 
sudo apt-get upgrade

sudo apt-get install python-dev

sudo usermod -a -G tty pi
sudo usermod -a -G dialout pi

sleep infinity >/dev/ttyAMA0 &

sudo apt-get install ser2net

sudo nano /etc/ser2net.conf

add to the bottom of file so you can connect to Pixhawk/APM over wifi on TCP port 2000

2000:raw:600:/dev/ttyAMA0:57600 8DATABITS NONE 1STOPBIT banner

sudo /etc/init.d/ser2net restart

sudo apt-get install apache2 -y

Check to see if the camera is working ” you can add video embedded code to html page here can be viewed here ” http://PI.IP.ADDRESS.

raspistill -v  Test the camera is up and running all streaming apps are installed, using raspistill module and VLC to display video on port 8554. Also 8081 8080 should work, recording can be done from the client end VLC. Http server is also running on PI you can access video there if IP changes edit ip on page.

Run Video command: (disable motion from starting at boot id you ar not using this module for FPV)

sudo apt-get install vlc

sudo apt-get install motion

sudo apt-get install libv4l-0

sudo apt-get install uvccapture

dmesg | tail, you should see you camera attached in the output message, if it is connected to your HW

edit /etc/default/motion and set “start_motion_daemon” to no( you do not want to auto start )

edit /etc/motion/motion.conf edit the settings

set “daemon off”

Start video stream run the following commands: choose with script works for you run it at start up.

raspivid -o – -t 0 -n -w 720 -h 480 -fps 25 | cvlc -vvv stream:///dev/stdin –sout ‘#rtp{sdp=rtsp://:8554/}’ :demux=h264

rtsp://${RASPBEERRY_PI_IP:8554/  works in VLC or Quick time

“Motion –n”  “motion”

watch the video stream

raspivid -w 1080 -h 720 -fps 20 -b 10000000 -t 0 -o | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264payconfig-interval=10 pt=96 ! udpsink host= port=9000

360 -fps 25 | cvlc -vvv stream:///dev/video0 –sout ‘#rtp{sdp=rtsp://:8554}’ :demux=h264

raspivid -o – -t 0 -n -w 1080 -h 720 -fps 25 | cvlc -vvv stream:///stdin/video0 –sout ‘#rtp{sdp=rtsp://:8554/}’ :demux=h264

raspivid -n -o – -t 9999999 -rot 180 -w 720 -h 480 -b 1000000 -fps 25|tee /home/pi/video-`date +%Y%h%d-%H%M`|nc -l 443

This command to a script by using the following

sudo nano sudo nano

sudo chmod +x

start the stream automatically:

If you want to start the stream automatically you have to add the script to crontab. To make this work you need to make another script run by cron . try to edit  /etc/rc.local file remove your script there or create an /etc/init.d/ scrip with proper run level to enable at boot run sudo update-rc.d SERVICE-TO-START-AT-BOOT enable . You may need to remove any services you installed from start at boot  (VLC can’t be run as sudo so make sure you’re in the right cron so not use sudo crontab -e ). You may need to add “nice” at the binning of the command so camera do not crash at start up. for mavproxy use (sudo crontab -e ) because runs as root.

sudo nano




sudo chmod +x

crontab -e

add to crontab file this will run the script file at boot

@reboot /home/pi/

Or python script

@reboot python /home/pi/ &

watch the video stream

To watch the video stream, open VLC on a computer on the same network as the raspberry pi you are using for streaming. Press Media -> Open Network stream and paste the following in the field:





Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>