Hi
Over the last couple of months I have been working on a project that might be of interest to you: https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/
Basically it is a digital transmission of video data that mimics the (advantageous) properties of an analog link. Although I use cheap WIFI dongles this is not one of the many "I took a raspberry and transmitted my video over WIFI"-projects.
The difference is that I use the cards in injection mode. This allows to send and receive arbitrary WIFI packets. What advantages does this give?
- No association: A receiver always receives data as long as he is in range
- Unidirectional data flow: Normal WIFI uses acknowledgement frames and thus requires a two-way communication channel. Using my project gives the possibility to have an asymmetrical link (->different antenna types for RX and TX)
- Error tolerant: Normal WIFI throws away erroneous frames although they could have contained usable data. My project uses every data it gets.
For FPV usage this means:
- No stalling image feeds as with the other WIFI FPV projects
- No risk of disassociation (which equals to blindness)
- Graceful degradation of camera image instead of stalling (or worse: disassociation) when you are getting out of range
The project is still beta but already usable. On the TX and RX side you can use any linux machine you like. I use on both sides Raspberrys which works just fine. I also ported the whole stack to Android. If I have bystanders I just give them my tablet for joining the FPV fun :)
Using this system I was able to archive a range of 3km without any antenna tracking stuff. At that distance there was still enough power for some more km. But my line of sight was limited to 3km...
In the end, what does it cost? Not much. You just need:
2x Raspberry A+
2x 8€ wifi dongles
1x Raspberry camera
1x Some kind of cheap display
Happy to hear your thoughts/rebuild reports :)
See you,
befinitiv.
Replies
I see you updated the script on your Wifibroadcast page :)
The first time I executed it, it did not give any message, and after that I get message
ifplugd: no process found
For line: "sudo iw dev wlan0 set monitor otherbss fcsfail" I get message
command failed: No such device (-19)
And for the last line, I get the same error as before: "sudo ./rx -b 8 wlan0 | /opt/vc/src/hello_pi/hello_video/hello_video.bin" I get error:
!!! uknown encapsulation on wlan0 !
I wanted to use your method to send video with low delay from one RPi2 to another RPi2 through WiFi and without broadcast, but it seems it's not possible with the WN822. I thought that because the cards are 300 Mbps it would work without broadcast, because I wanted to have 2 way communication.
I think I will return the WN822 cards, and get the same ones you are using and just do broadcast with the WN722.
I had the same problem. Try to combine the two commands like this:
sudo ifconfig wlan0 down && sudo iw dev wlan0 set monitor otherbss fcsfail
Ordered three 722n adaptors, sma/rp adaptors, pigtail leads and spiral antennas, they all arrived today, tried to install, discovered they don't work on a mac :( Gutted.
So for anyone else looking to use this on a mac, it works perfectly in a linux vm under Parallels. Virtualization has really improved! I seem to get full rate video with no drops or stutters under parallels on a macbook pro mid-2014 retina.
I did however wonder why I was only getting a few meters range, spent the day trying different settings, only to eventually work out I was using 5.8ghz spiral antennas on a 2.4ghz adaptor. Doh.
I just started with RPi, and Linux (Raspbian), so I am having a hard time to figure it out by myself...
Can some please tell me how to send the video WITHOUT doing broadcast? using the regular 2 way communication?
on campi:
add the line "deb http://vontaene.de/raspbian-updates/ . main" to /etc/apt/sources
then:
sudo apt-get install gstreamer1.0-tools gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
on receiver (if linux as above, if windows install gstreamer from here http://gstreamer.freedesktop.org/data/pkg/windows/1.2.4.1/gstreamer...)
to start a stream:
execute this on the receiver (first):
C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0 -e -v udpsrc port=9000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false
then type this on the cam pi (you could put this into an ssh command):
raspivid -n -w 1280 -h 720 -b 1000000 -fps 30 -t 0 -pf high -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay ! udpsink host=192.168.1.74 port=9000
host is the IP address of the receiving PC/laptop.
-b is the bitrate. Try a few different settings. This high setting was just me testing at home. For less good link quality I think something like 4000000 is better.
Thanks Tobias,
I installed gstreamer on the campi (the Raspberry Pi 2 with the camera), but what do I do on the second Raspbery Pi 2 to display the video? (the receiver, connected to the display)?
you could do the same as above. The pi is too slow to display the video stream via gstreamer. Befinitv has made a modified hello_video to use the pi's GPU. I haven't tried this yet. I am still using my laptop at the moment.
GStreamer should be plenty fast enough for displaying if you use the OMX (omxh264dec) hardware accelerated decoder.
see:
http://www.swat-drones.de/index.php/hd-fpv
http://fpv-community.de/showthread.php?46646-Low-Cost-HD-Video-%C3%...
http://diydrones.com/profiles/blogs/fpv-setup-with-raspberry-pi
http://diydrones.com/profiles/blogs/part-2-how-to-build-a-high-defi...
have fun