opensource FPV wifi discussion on diydrones

1,390 views
Skip to first unread message

Randy Mackay

unread,
May 26, 2015, 2:13:36 AM5/26/15
to drones-...@googlegroups.com, tri...@tridgell.net

 

      In case people missed it (I did until Tridge pointed it out) there’s a discussion on diydrones here about a guy, befinitiv, who has made an open source wifi based FPV system using a couple of RPi2s.

            http://diydrones.com/forum/topics/3-km-hd-fpv-system-using-commodity-hardware

           https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/

 

     People may remember that Philip did something like this a year ago or so but there’s some big improvements in the method that he’s using (described on the wordpress blog post above).  If people are interested in contributing in this area it might be good to try and replicate what he’s done.  Who knows, maybe this could be the basis of a low-cost open source solution.

 

-Randy

 

john...@gmail.com

unread,
May 26, 2015, 5:11:50 AM5/26/15
to drones-...@googlegroups.com, tri...@tridgell.net
I looked at his system and the Wifibroadcast approach definitively has merit. Especially since the one way transmission allow for using a big directional parabolic/patch antenna on the ground for better receiving. Something you normally can't use on a two-way since those antennas don't fit on a copter.

But it will not be as robust as analogue transmission. If you have a monitor with a built in TBC (time-base corrector that will generate a synthetic sync signal for the monitor if the video sync is lost), analog video degrades very gracefully almost all the way down to white noise. Recovery is also instant the moment signal strength increases.
Digital on the other hand does not. Even using something like MPEG-TS (transport stream) with built in error correction you will get a total collapse if you have more then ~20% packet loss. And after a total collapse you need a relatively strong signal and time (you must receive at least a complete mpeg interframe) to recover again. To get closer to analog video behavior you need dynamic bit-rate support in the video encoder, so that the digital link can adapt to changing signal conditions. But this also require some form of two-way communications for the client to be able to transmit status messages back to the encoder.

But even so it is the best approach using off the shelf hardware I have seen so far. But before settling on a certain type of hardware,  I would recommend make sure the solution support dynamic bitrate encoding in the hardware h.264 engine. Something I do not think the RPI does.

- JAB

Roberto Navoni

unread,
May 26, 2015, 5:25:14 AM5/26/15
to drones-discuss, tri...@tridgell.net
Hi Randy , Hi Tridge ,
I'm already develop a ready to use HD FPV system based on RPI 2 , but
in my architecture i prefered use 5.8 ghz for data link and mantain
2.4 ghz free for radio backup.
So i have two channel available for control , telemetry and video streaming .
In one revision of video trasmission system i have video tx and save
video streaming on board. For low latency video no doubt about udp and
h.264 video streaming I'm try to understand how use hardware video
encoder when i don't use RPI camera or Logitech camera.
I think that this is great world for develop cool application :)
Best
Roberto
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discus...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

pritam....@gmail.com

unread,
May 26, 2015, 6:26:21 AM5/26/15
to drones-...@googlegroups.com
Hi Roberto,

Did you have a look at webrtc+h264? Does it perform worse than udp + h.264? I was thinking of a more general solution. I am  in the initial phases of writing small daemon on RPI where anyone can request a new stream, it will create a new pipeline or add another tee to existing pipeline. Kind of camera server. I don't want it to be restricted to wifi. I want it to have autodiscovery on local lan/wifi and discovery though a publicly site for internet access if you put a 3g/4g dongle in there. 

I am just starting up on it and most likely have lot of false assumptions about feasibility. But then I thought its better to take directions from someone who has already traveled the road:-)

Regards,
Pritam


Regards,
Pritam
--
Regards,
pritam

Roberto Navoni

unread,
May 26, 2015, 6:42:29 AM5/26/15
to drones-discuss
Hi Pritam,
i investigate about webrtc , but i found that have a lot of iusse with
different browser so is no so good solution ...there are other option
to evaluate . Actually i'm investigate the potentiality of GStreamer
and try to understand how powerfull it is.
The main iusse is about the Hardware encoder in RPI2 is not simple to
understand how use it eficently an option could be use other kind of
companion pc like IMX6 based board.

best
Roberto Navoni


2015-05-26 12:26 GMT+02:00 pritam....@gmail.com
<pritam....@gmail.com>:

pritam....@gmail.com

unread,
May 26, 2015, 7:31:15 AM5/26/15
to drones-...@googlegroups.com
Roberto,

I am not going to try hardware encoder initially. rpi camera already gives h.264 stream. My server will at most create multiple streams and send out. I will support resolution and bitrate to be set in the query parameters itself so that I can pass on the request to camera application. So it will be simple you, send a http/webrtc/websocket(not decided yet on this part. still reading) request and you get a stream. If multiple people are asking for streams, the highest common denominator is asked from the camera and tee that to that many clients. The server will stop entertaining new requests once CPU load reaches 70%, gracefully giving out a json message with informative error. 

Regards,
Pritam

Daniel Frenzel

unread,
May 26, 2015, 7:33:57 AM5/26/15
to drones-...@googlegroups.com, tri...@tridgell.net
Well I also have a WiFi based firmware which is working more or less based on JSON formatted commands for controlling the copter over WiFi.
Additionally, I use socat together with ArduCopter for broadcasting through the network for some copters.
However, so far ArduCopter does not support WiFi input :D So I cannot cotrol it with my PS4 controller over laptop. 
However there are some problems with WiFi connections. 
Most or ?all? cheap modules have periodic lags, which just become obvious if you write your own network response protocoller. 
E.g. I got WiFi modules which cause every few houndred microseconds a 100 ms connection break. 
Alfa modules work fine, but require external powering, which is only suitable for big copters!
Message has been deleted

Roberto Navoni

unread,
May 26, 2015, 8:00:45 AM5/26/15
to drones-discuss, tri...@tridgell.net
In my design i already control the drone by wifi network this is my first test :
https://www.youtube.com/watch?v=lFflmy4lRog


2015-05-26 13:54 GMT+02:00 Daniel Frenzel <dgda...@googlemail.com>:
> Regarding:
> https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/
> I cannot see any benefit of this project in comparison to hostapd, which is
> more or less also setting the WiFi module into a broadcasting mode.

Roberto Navoni

unread,
May 26, 2015, 8:02:34 AM5/26/15
to drones-discuss, tri...@tridgell.net
Test the latency during a indoor fpv racing ... only for understand if
digital video is better and with low latency respcet of analog
transmission :
https://www.youtube.com/watch?v=PMRCC1eyYuA

Roberto Navoni

unread,
May 26, 2015, 8:03:57 AM5/26/15
to drones-discuss, tri...@tridgell.net
And tested integration with Our VR Pad Station with trasmission of
streaming by 3G connection. We are working on test with 4G for full
control of the drone.
https://www.youtube.com/watch?v=ssfB8hdFdmk
best
Roberto

Daniel Frenzel

unread,
May 26, 2015, 8:45:46 AM5/26/15
to drones-...@googlegroups.com, tri...@tridgell.net
Is the throughput of a WiFi dongle higher in comparison to a normal 2.4 Ghz radio?

pritam....@gmail.com

unread,
May 26, 2015, 8:55:25 AM5/26/15
to drones-...@googlegroups.com
Do you mean 2.4 Ghz analog video tx radio.

On Tue, May 26, 2015 at 6:15 PM, Daniel Frenzel <dgda...@googlemail.com> wrote:
Is the throughput of a WiFi dongle higher in comparison to a normal 2.4 Ghz radio?

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
pritam

john...@gmail.com

unread,
May 26, 2015, 9:43:04 AM5/26/15
to drones-...@googlegroups.com
Raw analog composite video is about 4.2 - 5.5Mhz for NTSC / PAL video. This would be roughly the same as a 40Mbit digital video stream. But as mentioned even if composite has higher bandwidth requirements, it also degrades much better (there is always some level of varying signal degradation when using the analog 2.4ghz video links) compared to h.264 compressed digital video.

James Harrison

unread,
May 26, 2015, 10:19:48 AM5/26/15
to drones-...@googlegroups.com
On 26/05/15 13:55, pritam....@gmail.com wrote:
> Do you mean 2.4 Ghz analog video tx radio.

If so it depends on the modulation, but broadly speaking yes you'll
move more bits/sec and more data over the air when working within the
theoretical maxima of the band.

On the other hand, there are more efficient ways still to encapsulate
video streams digitally for RF distribution. See also DVB-T/T2 etc.
But this does start to require more complex hardware (SDRs or
purpose-built modulators).

--
Cheers,
James

Daniel Frenzel

unread,
May 26, 2015, 10:24:28 AM5/26/15
to drones-...@googlegroups.com
Yes, 
because I don't really understand the advantage of using WiFi dongles if one decides to avoid the magic of the 802.11 standard :P
I mean I like to use hostapd broadcasting an AP and connect devices. If I want to use a analog connection, why not to use a standard radio?

Best, Daniel

Andrew Zaborowski

unread,
May 26, 2015, 12:47:44 PM5/26/15
to drones-...@googlegroups.com
Which standard radio do you refer to, what specific hardware? Wifi is
great because a good radio adapter can be had for $8, apparently one
good enough for 3km range. Additionally it is digital, making it
flexible (freedly adjust FPS vs. image resolution) and easy to process
on the copter side, for OSD and such.

Cheers

James Harrison

unread,
May 26, 2015, 4:19:23 PM5/26/15
to drones-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/05/2015 17:47, Andrew Zaborowski wrote:
> Which standard radio do you refer to, what specific hardware? Wifi
> is great because a good radio adapter can be had for $8, apparently
> one good enough for 3km range. Additionally it is digital, making
> it flexible (freedly adjust FPS vs. image resolution) and easy to
> process on the copter side, for OSD and such.

That's 3km with a directional antenna. Analogue modulation can do just
as well.

Res/FPS is the big win, though latency is still a huge issue,
particularly for 250-sized/racing applications. For just downlinking
video from a camera for camera monitoring, sure it'll work great, but
over the relevant ranges, especially with a directional antenna, so
will 802.11 and UDP/RTP streamed encoded video.

Also worth noting that on the legal side, it's quite possible you
won't be operating the dongles legally; 2.4/5GHz is not a free for all
in most jurisdictions, it's strictly limited in terms of radiated
power, duty cycle, and what you're using it for - notably in most
jurisdictions it's specifically licensed for 802.11 networks.

For instance in the UK, Interface Requirement document 2030
http://stakeholders.ofcom.org.uk/binaries/spectrum/spectrum-policy-area/
spectrum-management/research-guidelines-tech-info/interface-requirements
/IR_2030.pdf
limits anything operating at 2.4GHz to 100mW EIRP or 100mW/kHz EIRP
when FHSS is used, or 10mW/MHz EIRP where using other types of
modulation; all of this requires a degree of smarts in the radio with
regards to not causing interference, mitigating inteference, etc; or
10mW EIRP when operating as a video camera in a fairly dumb mode.

Given you can do 25mW at 5.8GHz using analogue video, well, you're
going to do better in terms of range - just (5.8G has worse LOS
propogation characteristics due to increased attenuation in free
space, of course) but it'll be a damn close thing.
- --
Cheers,
James Harrison
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQIcBAEBAgAGBQJVZNVDAAoJENTyYHL8dmp9IZ4QAJl0iYs4qwp3HKR3WpqKqtiQ
XuDtcdT9PtskEwCz1yvXV35r4lXdv8BwKPvLvijCIo19pD/vi6u1MsZFN1d12BHr
g2OR9DbYGves/szQKDCVHL7Z57RlwMfqYCf1GKip11mYia78eeR0rkIXOsM5oJIm
NRKoJWSuZlNYnvnOsEqUufZvdpdVm4gl5LrC5T3RIPmeUremC+/jYfz/nspudOac
wrLrmhwX2oE2lsmEelSA906NGGoYlhcF4gQahcU4cJVGxdRq9quQJISvu71YDaab
VayUrNHz3E+slhz3/j4kDwwGBrd1mqx15rxTc9mhPnbscrYkoA0Zerx5zGXQqyfA
bta3c06kTjtAE1c+7ZpfSsOTHCxlhgGdR/mOMzDzevJMzGNVUhknss02wDRt51To
zJjW3NgsMLQ1I6pGLn7jSskESk9yUpXr9JXq0iHdnjgaeWYYKT7Az9BP2FbP8DQx
z48lCvJMZu9i4KGUtIC3+DOyn9DKPX62sO3ZK/B817/okQhRovNhrBp5C1vTjUU9
3LAVdX9GngupCB54f1R794wXsxj5im+P3BYnOVBSpjnDDKCG2R/MhpktorH5fcBf
Oe/wf+Q/rHQ51lo6Iwqv3NGV2jNr6RNzV2FEmy+7Xm/XxJpeJAGnR1v+mNnoe1ve
XGgyK2qXke1O6FAYNQa7
=akJa
-----END PGP SIGNATURE-----

Randy Mackay

unread,
May 26, 2015, 11:38:32 PM5/26/15
to drones-...@googlegroups.com
Well I've gone ahead and order the RPi boards, camera and recommended antenna adapters described on that thread to try and reproduce what befinitiv has done.
http://diydrones.com/forum/topics/3-km-hd-fpv-system-using-commodity-hardware

Re the question of "why not just stick with Analog?". I think if it's legal in your jurisdiction then it's probably hard to beat analog. For me in Japan, the analog video legal limits are so low I could probably send a video stream about 10m max.

JAB's pretty much covered why befinitiv's broadcast method is better than just the regular Wifi protocol and/or hostapd but befinitiv's blog post explains why in detail in case you didn' see it. I'm pretty convinced he's onto something. https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/

For those on this thread who are already playing with wifi video on their own (Roberto, Pritam) it would be really great if you could share what you've done to the level of detail that benefitiv has (he's provided code and very specific set-up instructions). This is an open source dev team right? In my view, the problem is too hard for any one person to come up with a solution that can compete with the DJI LightBridge. Together we have a chance though.

-Randy

Philip Rowse

unread,
May 26, 2015, 11:41:29 PM5/26/15
to drones-...@googlegroups.com
This is awesome!

Great to see!

Phil

Jaime Machuca

unread,
May 27, 2015, 12:40:31 AM5/27/15
to drones-...@googlegroups.com
+1, I am also going to try this out.

Sent from my iPhone

Josh Welsh

unread,
May 27, 2015, 2:39:06 AM5/27/15
to drones-...@googlegroups.com
Same here. Would be interesting to see if it's possible to overlay mavlink info, OSD style, prior to transmission..

James Harrison

unread,
May 27, 2015, 4:18:34 AM5/27/15
to drones-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/05/2015 04:38, 'Randy Mackay' via drones-discuss wrote:
> Re the question of "why not just stick with Analog?". I think if
> it's legal in your jurisdiction then it's probably hard to beat
> analog. For me in Japan, the analog video legal limits are so low
> I could probably send a video stream about 10m max.

In Japan your legal power limits for 2.4GHz are also 10mW/MHz. Also
bear in mind that as I said in my previous email that's licensed for a
radio which performs inteference mitigation. That's an integral part
of wifi's design (CTS/RTS, hidden terminal avoidance, listen before
send, etc). It's part of what makes it fallible in normal operation.

By bypassing the normal operation of wifi you're generating continuous
inteference (to the perspective of other users of that frequency -
it's a shared medium) with no opportunity for other users to make any
use of that spectrum, as opposed to following the usual 802.11
protocols around transmission collision avoidance, monitoring, etc.

My understanding is that a 2.4GHz radio being told to continously emit
RF without any interference avoidance built into the protocol does
_not_ get to use that spectrum legally as it's no longer a conformant
device, so use of the radios in this fashion *would be absolutely
illegal*.

Also bear in mind that most countries have shared definitions for
these things in 2.4G because of the interoperability demands -
there'll be an ITU doc out there if anyone wants to figure out what
the minimum international regs are.

Use of proper 5GHz wifi plus hostapd, GStreamer multicasting RTP/h264
and a directional antenna will work just fine and avoid pissing off
every other spectrum user (and regulator) around you. :-)

- --
Cheers,
James Harrison
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQIcBAEBAgAGBQJVZX3RAAoJENTyYHL8dmp9rTYP/1Naegxy34hL698MjE3w0+DP
tspmTUrVIVNgU/ICdIlIOnIXqBE6h9hV4zJq6lgWVo9Y63BbGz9XlQX9+A2IwKfV
6EFdC66EKbpMWQ7S1AL7Ijxm8YaTSXGzrvTSrHUexH4KYJBgYbWdjHC1Q7S8OwHi
qszso4kYruuVeiyb/SVtNSAUYCcdMSoF3GZQMvicxWpTTmGWBpdJba0Sdvtu4E8b
aAqFrJkmEVacFNanlcVoUCIDoP50JjG2n4CedKPAHKXUo3Gv8Fzq41hX2Iw0RIaL
kSWLxLxnKR/9hGhV9XOqtjXK54Dq8Jagwi+H0+1oP4V+jghxbtJS+i2lTmJ2Anwc
Eqs682mXqhjCaIjFDtvkyI6QS4s575zD8ZN+WNPjAkUQdOeV0TcOmoGx8aOi4LSE
b8f0IkSmRx2jwWuED/21sIPstqSn0lgpJ7KnhO4wE5tWFkylcogrtDm0podkRZiP
cXbdHcPWGDOBLXDeSCGd+gvTp8nm1I/WlWWWpSlF/aWkaab/uQK/l+FuezHHwXQd
3rXCEbyAZyHhs3tCAn0aUFvqEm1kE50A6RVRnBEW2ckWtimYCIDoOqcMkdpU9hP1
8WY8bM+Cg6O/SyTYK7tqtfpJxj+J3BKvybSXxC3/Y5aK1H5z5GU8yYb02IGZHAij
Ve9hyclB5/HOqqJLXxtR
=VC2q
-----END PGP SIGNATURE-----

pritam....@gmail.com

unread,
May 27, 2015, 5:29:20 AM5/27/15
to drones-...@googlegroups.com
Hi Randy, 

I am still testing waters. I just received my RPi2 only this week. I was able ssh into it and stream data to my computer using gstreamer. I will code up my idea over this weekend which is "eliminating the need to ssh into the pi". I will run a daemon that will create the pipeline for you once it receives a request. Till now I was just going to do a http server for control just like you can ask a gopro for a stream, but I need to look into this broadcast stuff to figure out whether we can send the control commands. I want to leave it to the client about the resolution and bitrate that he wants. 

The idea is to degrade the resolution/bitrate either automatically or upon user request. I think it will be better to recieve 100% of 320p than loose 70% of 1080p stream. If it gets very lossy, it may be worthwhile to switch to stream jpegs either adhering to mjpeg standard or just plain jpegs. A video pipeline can easily stall if there is too much bad/missing data. But images are different case. Still, all still reading up and researching, I don't have code to show yet. Sorry :-(

Regards,
Pritam

-----END PGP SIGNATURE-----

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
pritam

Randy Mackay

unread,
May 27, 2015, 7:13:33 AM5/27/15
to drones-...@googlegroups.com

Pritam,

     Thanks for sharing, that sounds good.

 

James,

     Ok, I see what you’re saying about the potential illegality of the wifi broadcast method.  Something we should look into!

 

By the way, here is the wifibroadcast code base on “Bitbucket”.

      https://bitbucket.org/befi

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of pritam....@gmail.com
Sent: 27-May-15 6:29 PM
To: drones-...@googlegroups.com
Subject: Re: [drones-discuss] Re: opensource FPV wifi discussion on diydrones

 

Hi Randy, 

Nick X.

unread,
May 27, 2015, 9:06:42 AM5/27/15
to drones-...@googlegroups.com
This looks very interesting and finally "the right solution". All other solutions I have seen so far suffered from Wifi ACK/Retransmits and the other things mentioned on befinitiv's blog.

There is just one thing missing: A proper FEC and interleaving implementation. That would improve the robustness of the video stream by far.

I'm already doing some testing with udpcast async mode (which offers a full-blown FEC/interleaving implementation), hopefully this could later be implemented in wifibroadcast.



On Tuesday, May 26, 2015 at 8:13:36 AM UTC+2, Randy Mackay wrote:

Glenn Gregory

unread,
May 27, 2015, 10:58:44 AM5/27/15
to drones-...@googlegroups.com
I'm getting onboard once I'm back! Very interesting topic!!

befinitiv

unread,
May 27, 2015, 4:41:47 PM5/27/15
to drones-...@googlegroups.com, tri...@tridgell.net
Hi


Happy to see some new potential wifibroadcasters :) To answer to the legal issues I'll past a section from my FAQ:

"What about interferece with other networks? The ATHEROS AR9172 still obeys to the standard wifi CSMA/CA (collision avoidance). This means that using wifibroadcast will use free slots in the channel and does not disrupt other users (at least not more than someone transferring the same amount of data using normal wifi). As said above it is up to the user to check the regulatories of his country."


Best regards,
befinitiv.

Graham Abell

unread,
May 27, 2015, 4:41:54 PM5/27/15
to drones-...@googlegroups.com
I've been following befinitiv's progress for a while now and have already purchased the recommended parts, I've done testing on the ground and have found even with standard antennas the reception etc has been very good. My next steps are to mount it on a quad and see how I get on. The fact that telemetry can be streamed on a separate port using the same link could also be handy from an overlay perspective. 

Robert Lefebvre

unread,
May 27, 2015, 6:43:50 PM5/27/15
to drones-discuss
And then all we need to be able to do is send up some low-bandwidth low-latency command and control signals...

Philip Rowse

unread,
May 27, 2015, 7:30:12 PM5/27/15
to drones-...@googlegroups.com
Purchased all the needed parts last night :) looking forward to trying this!


Andreas

unread,
May 28, 2015, 1:15:30 AM5/28/15
to drones-...@googlegroups.com
me too lets put this thing on my regular QAV400 quad and remove the old 2.4Ghz video link :)

john...@gmail.com

unread,
May 28, 2015, 6:46:18 AM5/28/15
to drones-...@googlegroups.com
I ordered some of the supported wifi dongles also and will start experimenting when they arrive. Nice to have an excuse to actually do something with the RPi''s I have had lying around for a good while. I will start on the ground using a rover to get a more controlled environment for testing.

First order will be to use gstreamer to add some error correction robustness to the video transmission. Also the moment I think the RPI camera will become a weak link when we move forward. Anyone know of any project/hardware so that you can connect HDMI to the RPi camera bus interface?

pritam....@gmail.com

unread,
May 28, 2015, 8:07:25 AM5/28/15
to drones-...@googlegroups.com

Why do you think raspberry pi cam is bad. I find it good enough. If you want slightly more flexible option, arducam.com has pi compatible c-mount capable camera modules with a lot of different lenses to choose from. Infact I ordered the arducam module for their choice of fish eye lenses. The sensor is same so raspberry pi camera software works just like the official module.

On 28 May 2015 16:16, <john...@gmail.com> wrote:
I ordered some of the supported wifi dongles also and will start experimenting when they arrive. Nice to have an excuse to actually do something with the RPi''s I have had lying around for a good while. I will start on the ground using a rover to get a more controlled environment for testing.

First order will be to use gstreamer to add some error correction robustness to the video transmission. Also the moment I think the RPI camera will become a weak link when we move forward. Anyone know of any project/hardware so that you can connect HDMI to the RPi camera bus interface?

john...@gmail.com

unread,
May 28, 2015, 8:44:22 AM5/28/15
to drones-...@googlegroups.com
There are some limits having a small 1/4 cmos sensor, but for sure a C-mount option helps a lot.

David Pawlak

unread,
May 28, 2015, 10:25:16 AM5/28/15
to drones-...@googlegroups.com, tri...@tridgell.net
I could use my BBBs right?

pritam....@gmail.com

unread,
May 28, 2015, 11:02:29 AM5/28/15
to drones-...@googlegroups.com, tri...@tridgell.net

BBB has a camera cape but I think the setup comes out expensive and I don't know how good is the camera support. Best thing about pi is "it has such matured Linux stack and everything just works most of the time"

--

Jaime Machuca

unread,
May 30, 2015, 5:14:41 PM5/30/15
to drones-...@googlegroups.com, tri...@tridgell.net
Has anyone tried doing this with a different camera? I'm trying to do it using a C920. But I can't figure out what to use instead of raspivid command. I tried with FFMPEG but wasn't successful.

Sent from my iPhone

Philip Rowse

unread,
May 30, 2015, 7:07:24 PM5/30/15
to drones-...@googlegroups.com
The advantage of using the onboard camera, is the hardware encoding.  If you use the C920 you won't have that advantage.


Jonathan Challinger

unread,
May 30, 2015, 7:13:56 PM5/30/15
to drones-...@googlegroups.com

C920 has an h.264 encoder built in. Not sure if that would work for this project.

Jaime Machuca

unread,
May 30, 2015, 7:20:01 PM5/30/15
to drones-...@googlegroups.com
Yes, the C920 has a built in h264 encoder, that's the advantage of that. I just need to figure a command to pipe the output to the streamer.

Sent from my iPhone

Jaime Machuca

unread,
May 30, 2015, 7:21:04 PM5/30/15
to drones-...@googlegroups.com
The other feed I want to try is the Flir lepton. And that one has to be encoded. But then other reason I want or use the C920 is that I am tying this with an odroid.

Sent from my iPhone

On May 30, 2015, at 6:13 PM, Jonathan Challinger <mr.cha...@gmail.com> wrote:

pritam....@gmail.com

unread,
May 31, 2015, 4:30:54 AM5/31/15
to drones-...@googlegroups.com
I think you can v4l tools directly with gstreamer just like raspvid is being used.
Regards,
pritam

Daniel Nugent

unread,
Jun 21, 2015, 4:08:39 PM6/21/15
to drones-...@googlegroups.com, tri...@tridgell.net
Randy, Philip, and others,

Any updates? What were your experiences like? Have your results matched befinitiv's? Any tips or suggestions?

Daniel

Randy Mackay

unread,
Jun 21, 2015, 9:29:31 PM6/21/15
to drones-...@googlegroups.com, tri...@tridgell.net

 

     I’ve done some flight tests  few weeks ago on my NAVIO+ IRIS and it worked on a ground test out to 160m and a flight test out to about 250m using just a single receiver and transmitter and using the stock 5db antennas.  I live in a heavily wooded area so it likely works further than that.  There are a number of things that I can do to improve the range including:

1.       Increasing the TX’s output to 30db

2.       Use better antennas

3.       Attach another receiver to use “diversity”.

     I’m pretty much ready to do all the above but mostly recently I’ve been trying to reproduce Jaime’s work to use a webcam instead of the RPi camera.  This is useful because the RPi camera produces a lot of interference on the GPS (although wrapping the camera and the ribbon cable in copper tape seems to help).

 

     Latency has been measured as jumping between 115ms and 170ms but befinitiv may have found the cause just yesterday so we will likely see it get lower by 20ms and hopefully more consistent.

 

-Randy

--

john...@gmail.com

unread,
Jun 22, 2015, 3:47:12 AM6/22/15
to drones-...@googlegroups.com, tri...@tridgell.net
Hi Randy,

What transport system are you using? Just streaming the h.264 raw video, or something like mpegTS or RTP? The reason I ask is that just streaming the h264 will be very sensitive to data loss. A container with built in error correction like for example mpeg TS (Transport Stream) would add robustness to the stream and should then result in better range. The cost is about 20% increase in bandwidth for error recovery packets, but this should not be a problem.

Daniel Frenzel

unread,
Jun 22, 2015, 5:03:54 AM6/22/15
to drones-...@googlegroups.com, tri...@tridgell.net
1) I think the latency spikes are a chip or driver problem. 
I noticed them on several, but not all chips. 
The rt2800usb driver also throws some exceptions messages after some time if the link is stressed.
Alfa was also the only company without severe latency drops.  

2) I lost two Wifi dongles when I manually set the tx power to 30 dbm. I think they became too hot after some time.

3) Do you have a range comparison with the same dongle and tx power in normal mode?

Randy Mackay

unread,
Jun 22, 2015, 8:17:50 AM6/22/15
to drones-...@googlegroups.com, tri...@tridgell.net

John,

 

     This is just streaming h.264 but it doesn’t have to be.  It can broadcast anything and even allows multiple pipes for different types of data at the same time.  You just need to create encoders/decoder to send/receive from each pipe and then do something with the data.

 

     befinitiv’s site for those who haven’ seen it:  https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/

 

-Randy

Randy Mackay

unread,
Jun 22, 2015, 8:29:45 AM6/22/15
to drones-...@googlegroups.com

Daniel,

 

     Thanks for the info.  I haven’t tried too swapping around the dongles yet but maybe I will now.  So far I’ve been using the Alfa’s for both tx and rx.

 

     I haven’t set the power to 30db yet.  Do you have a pre-built binary for the driver to do that?  Doing the build myself is a bit daunting.

 

     I have only done two range tests so far (one ground, one air) so I haven’t tested increasing the power.  BTW, Tridge suggested getting an attenuator to allow doing some of this testing from the bench but I haven’t done that yet.

 

     Maybe you’re “Fnoop Dog” so you’ve probably already read this but I seems like befinitiv found a few software issues causing latency (but maybe not all the latency):

1.       raspivid was buffering part of the last frame so that was delaying the image by one sample.

2.       Converting the stream into NALU units required waiting for the start of the next frame’s start header which would also delay everything by one frame.

 

     Discussion here: http://diydrones.com/forum/topics/3-km-hd-fpv-system-using-commodity-hardware?id=705844%3ATopic%3A1988351&page=26#comments

 

-Randy

Daniel Frenzel

unread,
Jun 25, 2015, 2:28:18 PM6/25/15
to drones-...@googlegroups.com
Since my network seems to get reset sometimes at boot time, 
I wrote a _not_ very nice script, setting the output power to 30 dbi.

#!/bin/sh

CURR_TX=$(iwconfig wlan0 | head -1 | awk '{print $5}' | cut -d '=' -f 2)

while [ 1 ]
do
  if [ "$CURR_TX" = "30" ]; then
    echo "Do not change Tx power"
  else
    echo "Change Tx power to 30 dbi"
    /sbin/iw reg set BO
    sleep 0.5
    /sbin/iwconfig wlan0 txpower 30
  fi
  sleep 60
done 

I start this script at boot time and check the process with monit. 

#! /bin/sh
# /etc/init.d/CheckTxPower
#

WORK_DIR="/var/lib/CheckTxPower"
DAEMON="/bin/sh"
ARGS="/usr/local/bin/check_tx_power.sh"
PIDFILE="/var/run/CheckTxPower.pid"
USER="root"

. /lib/lsb/init-functions

do_start() {
  log_daemon_msg "Starting system $DAEMON $ARGS daemon"
  mkdir -p "$WORK_DIR"
  /sbin/start-stop-daemon --start --pidfile $PIDFILE \
    --user $USER --group $USER \
    -b --make-pidfile \
    --chuid $USER \
    --exec $DAEMON $ARGS
  log_end_msg $?
}

do_stop() {
  log_daemon_msg "Stopping system $DAEMON $ARGS daemon"
  /sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose
  log_end_msg $?
}

# Carry out specific functions when asked to by the system
case "$1" in
  start)
   do_start
    ;;
  stop)
   do_stop
    ;;
  restart|reload|force-reload)
    do_stop
    do_start
    ;;
  status)
    status_of_proc "$DAEMON $ARGS" "$DAEMON $ARGS" && exit 0 || exit $?
    ;;
  *)
    echo "Usage: /etc/init.d/CheckTxPower {start|stop}"
    exit 1
    ;;
esac

exit 0


I know it is hacky, but setting up the interfaces file failed for me sometimes.
Maybe you can check at 30 dbi. With ALfa it is fine, smaller dongles get fried over longer times.

Best, Daniel

john...@gmail.com

unread,
Jun 26, 2015, 6:27:55 AM6/26/15
to drones-...@googlegroups.com
Nice, 30dbi in the transmitter, 6dbi long whip in the copter and a nice 24dbi'ish patch/parabolic/yagi on the ground should open up for some nice long range stuff.

Daniel Frenzel

unread,
Jun 27, 2015, 9:05:10 AM6/27/15
to drones-...@googlegroups.com
What is the driver doing, if a air plane radar is approaching.
I heard, WiFi modules will switch the channel, thus a delay will arise.
At the moment I am also not very fine with the way the output power is regulated, because it is bound to regions.
The mode switching is also really awful.
Maybe one could think about writing a custom driver, for UAVs.. 

Richard Evans

unread,
Jul 28, 2015, 8:06:33 PM7/28/15
to drones-discuss, tri...@tridgell.net, rmac...@yahoo.com
I saw this early last week, and by the end of the week, I had all the parts I needed to get a transmitter/ receiver pair working..  As a package, it is a little large to fit on my quad but I will make room and I will have to do something to be able to fully benefit from the hi definition imagery.  I am now shopping for goggles to see what will give me 720P or better.

 I am having a hard time shutting down the broadcast, once it starts, the video streams and there seems to be no stopping it other that an improper shutdown. pull the power plug!
  
perhaps there is a interrupt key combo or something. I am starting up both rx and tx by ssh ing into the PI's and running a script as per (befinitv's  code for starting the streaming) 
maybe I will have to hookup a keyboard and monitor to operate it, but I doubt it.  perhaps the touch sensitive screen is what is needed.

I will do some more experimenting tonight and see what I can figure out.. maybe there is an typo in the bash script.

Anyway, the video looks very clean and clear.. I definitely want to get this into the air..
Richard Evans

john...@gmail.com

unread,
Jul 29, 2015, 6:24:47 AM7/29/15
to drones-discuss, tri...@tridgell.net, rmac...@yahoo.com, freedi...@gmail.com
Ctrl+C
Reply all
Reply to author
Forward
0 new messages