Emlid

Community Forum

How to create a 2.3Ghz AP from Navio and use it both for telemetry and wifibroadcast?


#1

Hello there!

I have a Navio2+RPi3 quad now working very well, with a lot of stuff implemented on it
I only am now struggling on how to make my video link more robust.

I am using a 5 GHz Alfa AWUS051NH v2 wifi card to create an wifi AP from my quad, used both for video streaming through gstreamer and telemetry. Both data are received and interpretated in QGroundControl application from an Android device.
The major inconvenient of this setup is to offer limited range performance as I get no signal above 650m and gets a lot of lag in video stream. By the way the range is as well very sensitive to the quality of the antenna embedded in the Android device.

I have the “dream” that one way to improve would be that emlid provides a “ready-to-use” disk image with wifibroadcast working out of the box, with the Rpi creating 2 wifi AP : one for wifibroadcast and one for telemetry, if possible both of them on 2.3Ghz (possible under condition of modifying linux kernel http://www.mypidrone.com/menu-us/mypidrone-design/rpi2-kernel-preempt-building-with-atheros-hambands-2-3ghz-patch)

Both networks would be connected to a RPi Zero (again kernel modified to work on 2.3 Ghz frequency)
The Rpi Zero would as well create a 5 Ghz local AP network to stream back the video signal to my Android device as well as the telemetry data.

Do you guys think this set-up would be feasible/relevant? If yes, can please someone help me to set it up as I am just crap in terms of linux skills :slight_smile:

Here is a rough scheme of my thoughts:

Unless you guys have better suggestions?

Greetings
Guillaume


(Yannis) #2

This is a similar setup to what I’m trying to build. I think that we should wait for the v3 beta image form EMLID. From what is mentioned on that thread, it is supposed to allow for both wifiboradcast and normal wifi to work together, using two separate wifi adapters.

Once this is running then the only thing remaining is to set up forwarding of the wbcrx output to UDP on the wifibroadcast receiving end, and properly setting up a receiver on the same WiFi network (I’m using QGroundControl on iOS, fo rinstance, it works beautifully with gstreamer video).

Wifibroadcast does not create an AP. In fact, it does not associate the clients at all. Think of it more like radio, if you tune in to the correct channel, it just captures whetever packets it sees there. Ok this is simplified quite a bit, but the big picture is there.
As a result, you don;t need two APs. You’ll just need one, which your clients will connect to, and which will receive the wifibroadcast video stream.

Re. telemetry; I believe that if you can separate the telemetry on the AP/wifibroadcast receiver, you can then forward it using UDP again to the ground station, on another port. Sending telemetry commands though is another issue. The folks over at EZ-Wifibroadcast have implemented sending telemetry as well as RC input, apparently, so it may be worth taking a look.


(Marcello) #3

I have been assisting you on your other post in the forum with your setup. However, in any case for those that may be reading this. This is not a great idea for one very simple reason. According to Benefitiv himself who made Wifibroadcast when he attempted the 2.3ghz mod on a TLWN722 he found the performance significantly decreased.
There are some wifi adapters, namely pcie, that claim they can operate in a region of the 2.3ghz band though it remains to be seen what the performance might be. In any case this is unfit for standard wifi adapters.


#4

Thanks Marcello and Yannis for your clarifications!

I will think twice before going to wifibroadcast as I am not sure to be ready to sacrifice a whole Wifi device consuming a lot of electrical power and heat only for video streaming. And the implementation on the GCS side is quite heavy with a dedicated RPi.
By the way I made the following test for wifibroadcast:

  • Tx side
    RPi 2 + Rpi CAM v2 + Wifi Alfa card (high gain antenna) on channel 13 + Wifi realtek dongle on channel 1
  • RX side
    RPi 3 + CSL300 wifi card on channel 13 + internal Wifi chipset on channel 1
  • GCS
    PC connected to wifi on channel 1 running mission planner and gstreamer

I used gstreamer on RX side to stream the video pipe received from wifibroadcast to the GCS

Conclusion:

  • Video quality was poor depiste std bit rates parameters in wifibroadcast (probably some workaround to be done around that as I have seen youtube video with excellent quality)
  • Lag was horrible around 20 to 30sec
  • my TX wifi card was notably hot after 20mn streaming
    So probably some more tests to be done e.g. with RPi3 on TX side and try different wifibroadcast parameters…
    As well to be noticed : telemetry link was not possible if wifibroadcast and “normal” wifi are on close channels (did not even see the SSID with Channel 11 for Wifi against 13 for Wifibroadcast)

So temporary conclusion is for me wifibroadcast is only truly attractive when the RX Rpi can as well operate as a GCS (to limit lag and number of equipments to bring in the field…)

Marcello, I did not took time yet yo answer your nice insights, I will implement and let you know if ever this is improving the range


(Yannis) #5

I just found out that the latest EZ-Wifibroadcast image (1.4) has support for WiFi forwarding out of the box.

I am wondering if you use this image on the Rx side, whether latency issues will be improved.

I’ll try myself when I get some time and report.


(Movlab) #6

Hi All, I just wanted to mention I don’t have any latency issues at all using the EZ-Wifibroadcast image 1.4…
I use 2337 at transmitter and receiver pi3 receives it nicely. Then I have a hotspot on the ground pi3. That’s on channel 11 (2462). I connect to a windows tablet running Mission Planner… I’m wondering what version is on this navio2 image.
I want to get this navio2 but can’t find enough information on this. I have no lag and don’t want to give that image up …

MovLab


(Marcello) #7

Yes, the problem of running on 2.3Ghz is the fact that this is usually entirely out of spec for most wireless adapters or at an unoptimized band range at best. The problem will not be one of latency as the frequency in this case is not going to affect the bottleneck of the video feed.

The problem is as I said the fact that it is usually entirely out of spec or unoptimized on most wireless adapters. This will mean a lower sensitivity on the receiver and lower wireless power on the transmitter. You will still should be able to say set the max at 20dB if the max power of your wireless adapter was 20dB. What I am saying is that if you actually use a spectrum analyzer or something of the sort to check the actual radio power is you will more than likely find that there is much more power loss between the 20dB being fed and the dB actually coming out of the antenna.


(Western Mark) #8

Does anyone know how to find what frequency Navio2 uses for the wif-broadcasting?

I’m trying to rule out problems. No help from the helpers here so I thought I’d ask you guys.

I can have both Pi’s using EZ-wifibroadcast to send video. Connect Navio2 back up and I get nothing. Didn’t think it was this difficult to get something to work. But it is. Hey, walking around inside a dark cave is also difficult. Hard to find your way in the dark without any guidance, hey?


(Marc Lebret) #9

Navio2 use nothing but Raspi. Navio2 is an autopilot interface card. Wifi broadcasting is a Raspberry thing.

Marc


(Western Mark) #10

Why do they mention it on the DOCS? And the setting for EZ-Wifibroadcast. I thought it was included in the Image file you download and install in the raspi. So to get HD video I will need three raspberry Pi. Two for the Kwadcopter, one for Navio2 and one for Pi camera and EZ-wifibroadcast and then another Raspberry Pi for the Rx? Super awesome. spend all this money and I could have just waited and gotten the EDGE - that does everything I want.


(Western Mark) #11

https://docs.emlid.com/navio2/common/dev/wbc/

From this you’d think wifi-braodcasting worked. Right?


(Western Mark) #12

Wi-Fi broadcast support. Taken from the following page:

https://docs.emlid.com/navio2/common/dev/changelogs/


(Western Mark) #13

Wi-Fi broadcast support


(Marc Lebret) #14

It is… but is is not a Navio2 (Ardu…thing), it is a Raspi thing. Video is processed by the RaspBerry, as well as Navio2 Autopilot orders are processed by the same RaspBerry. No need to have two RaspBerry units on board.

Marc


(Western Mark) #15

What channel does the Emlid Image use for it’s EZ-wifibroadcasting? And how can we change it?


(Western Mark) #16

Ardu, as in Arducopter?

But hasn’t Emlid gotten this works? They make out like it works. It doesn’t work. Why would they say you can do it if you actually can’t?


(Western Mark) #17

I’d just love to see a step-by-step account of how to get this to work and then do that and actually see it working. As of right now I can get two raspberry pi’s to stream video using ez-wifibroadcast but can’t get the Navio2 to do it. I don’t believe this actually works. I would not recommend Navio2, at least not if you’re wanting to use EZ-wifibraodcasting with it.


(David Posea) #18

I’m pretty sure you can change the frequency or channel in the wbctx and wbcrx scripts. There will be an iw command setting the interface to monitor mode, and one setting the channel. That command can also use frequency. If you can’t find it I’ll research more and post examples. You should be able to read /etc/systemd/system/wbctx.service to find the script location. Ezwifibroadcast is not available on the emlid image. The original wifibroadcast is. You can specify a port -p 0 or -p 1 in the TX command, allowing multiple streams to be sent, like video and telemetry. Sending data back to the drone has issue with collisions right now. Some kind of timing mechanism is probably needed.


(cartoocm) #19

I’m testing the same, using two USB 3.0 Alpha cards AWUS036ACH,

I intend to transmit telemetry and video, but directly to Qgroundcontrol.
THE NIC AWUS036ACH can be put in AP mode from its own application in windows.
I have made several connections from my Android device to my PC and it works.

I keep working on it …


(Elpidoforos Anastasiou) #20

Hello everyone i have a distortion in the picture can anyone help please , what should i check ?