Raspberry 2 + Wifi telemetry/video | USB power

Dear Navio community,

I am trying to simplify the design of my drone by using Wifi communication as unique link for telemetry and video … and control.
I am getting pretty good performances with Alpha USB wifi cards that can transmit Wifi signal up to 2000mW coupled with extreme high gain antenna type yagi/helical for Ground Station and Cloverleaf for drone with same transmission power.
Theoritically in a perfect world, the range would be higher than battery capacity and practically lots of factor and problems should be by passed.
To get a solid and reliable Wifi signal, I need to raise the USB max power of the raspberry pi.
I need to add the following parameter into the /boot/config.txt :smile:
max_usb_current=1

Is this parameter compatible with the RT kernel ?

Thank you guys.

1 Like

I can’t answer your question but please publish pics about your setup. I think the “Wifi replaces FPV, RC and telemetry radio” theme is a hot topic and we need to see (better document) more examples.

Some of the boot config values are nothing to do with the OS, for example the screen detection is also shared with Windows IoT (needed to fix display on my FPV monitor with that). I guess that is the main question, this firmware parameter “max_usb_current” is it something which the RT kernel loader has implemented too.

As the RT kernel is a patch rather than a totally different OS I guess it’s likely, somebody from Emlid can maybe comment (know the source). I wonder too if any of these parameters are used by the boot loader, independent of OS.

I found this documentation, which looks official (or at least “wiki” official/common knowledge):

http://elinux.org/RPiconfig#USB_Power

Interesting that the GPU is actually responsible for reading boot.config! Really used like a co-processor then :smiley:

Reading that it seems like the USB power is independent of OS.

Hi,
Thank you for your answer, I just ended up trying this parameter and the USB power max limit has been raised from 600mA (default) to 1200mA. This change was enough to solve the instabilities of the high power USB Wifi adapter.

For more details about my setup, I will create a webpage with details of my config with pics to share with the community.

The goal is to have a centralized communication system that will provide long range, high speed and low latency link between Ground station and Drone as well as internet access (via 4G to Wifi bridge) for the flying Drone and Ground Station.
This will lead to be able to Control the drone, to get FPV and Telemetry and share Video to Internet in real-time.

Cheers

2 Likes

I’m also working on something similar but was going to use a separate powered hub. I I have a Alfa AWUS036AC card that doesn’t seem to get recognized by the RT kernel. DId you have to compile your own Alfa drivers?

hi, i m using max_usb_current parameter for one month now , i have noticed no problem
but i don’t use a 2000 mW WiFi transmitter , just a 3G and WiFi dongle

i think this can be a problem if you exceed 1.2 Amps

Hi,

Thank you for your feedback, I was a little scared to boost the current of usb.
I guess the Raspberry has been designed to fit just with USB 2.0 specs but can do much more.
Since the max current is stronger the Wifi is perfectly stable.
Which 3G dongle are you using ?

Hi,

I am using the AWUS936NH 2.4ghz b/g/n 2000mW.
The Alpha AWUS036NH is using a old Ralink chipset so the modules are inside the kernel already and the firmwares are in the deb package #apt-get install firmware-ralink.
Your brand new Alpha is using the last AC Wifi technology, that means the chipset is very recent, therefore you need to build yourself the kernel module and insert firmwares manually.
Still fun anyway :wink:

Because I already did what U plan to do, need to tell you that unfortunately high-speed wifi link is only a dream, there is no possibility to do this.

My setup was :sunny:
GCS - Airlive n.power (30dBm), Yagi antenna 18 dBi.
PLANE: RPi with Alfa 036 -unblocked, 33 dBm with 5 dBi omni antenna. The power for wifi card was taken from separate BEC,
Link /: telemetry and video simultaneously.
My attempts

And another one:

we discovered, that with real conditions max wifi range was about 5km, mainly because of other wifi jamming on the same channels.

on these movies we were flying about 700-1000 meters and during turns we had problem with video.

1 Like

Thank you so much for your feedback.
Your setup is extremely interesting and will help me a lot on my researches.
You setup is close to the one I want to reach.

My future setup :smiley:
GCS - Home made router based on PI with Alpha 036 33dBm with Helical 18dBi (someone need to target the drone).
Plane : RPi with Alpha 036 33dBm with 2.4Ghz 3.5 dBi Cloverleaf.
I’ll do a right polarization with Helical and Cloverleaf as well to reduce parasites and interference with same channels WiFi. I will also change the behavior of the bit rate scaling to adapt it to Drone use. There is so many parameters in Alpha firmwares (and others) that we can change to adapt the Wifi system to Drone use such as WMM (traffic type priority / burst frame) and HT capabilities (Modulations, etc…).

Did you try cloverleaf antenna instead of omni antenna ?
The cloverleaf might be better since its gain pattern is almost a sphere compared to the omni which is a cylinder (polarization), it is the reason I think you had problem when you were turning.

I’ll let you know after my attempt, for me it is not impossible and this challenge worth it.

Cheers

Cloverleaf helped during turns, for sure.

Of course there is a plenty of things that can be done to improve wifi range and stability.
We planned to make a system in plane that would be able to point the antenna in GCS direction, its a plan 4 future.

The main problem with wifi link is the fact, that other people` wifi channels are working exactly on the same frequency as mine.I mean that there is a lot of interference, but the fact is, that HD quality live is reachable.

1 Like

RPi has a protection for overcurrent\undervoltage where it reduces the processor frequency, but that can be disabled in the device tree (don’t remember the parameter, sorry).
I would recommend using powered USB hubs for power demanding devices, just in case.

Fully agree here.
I look forward for your future tests.

thx

Hi,

This is a very good comment, indeed reducing the power of the PI could bring instabilities, good point.
I’ll follow your recommendation.

Thx

I’m mostly interested in FPV racing so this is already good news! :sunny:

In a controlled (race track) environment we could install multiple antennas at the perimeters. Either some kind of multi-channel repeater (for flexibility/isolation) or just one extremely fast WiFi network so all racers have enough bandwidth on the same “network”.

For long range, I’m wondering if somebody could build a tiny antenna tracker for the drone, same as the military use on large drones. Like the reverse of a gimbal, except it tries to point “home” and when a signal is lost it scans until it finds it again (or goes into failsafe after a set period of time). That way both the drone and ground station have directional antennas so cross-interference should be avoided/reduced (I guess, I’m no radio expert).

1 Like

Hi,

I’m trying to integrate a long range Wifi Adapter to the Navio2 with Rpi3 and have encountered a lot of instability. By looking at the kernel log, the device looks like is being disconnected/reconnected a lot:

Dec 14 11:14:59 navio kernel: [  584.092959] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
Dec 14 11:15:00 navio kernel: [  584.193265] usb 1-1.2: New USB device found, idVendor=0bda, idProduct=8812
Dec 14 11:15:00 navio kernel: [  584.193279] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 14 11:15:00 navio kernel: [  584.193286] usb 1-1.2: Product: 802.11n NIC
Dec 14 11:15:00 navio kernel: [  584.193293] usb 1-1.2: Manufacturer: Realtek
Dec 14 11:15:00 navio kernel: [  584.193299] usb 1-1.2: SerialNumber: 123456

and further in the log

Dec 14 11:15:00 navio kernel: [  584.403715] usb 1-1.2: USB disconnect, device number 5
Dec 14 11:15:00 navio kernel: [  584.852903] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
Dec 14 11:15:00 navio kernel: [  584.953260] usb 1-1.2: New USB device found, idVendor=0bda, idProduct=8812
Dec 14 11:15:00 navio kernel: [  584.953274] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 14 11:15:00 navio kernel: [  584.953281] usb 1-1.2: Product: 802.11n NIC
Dec 14 11:15:00 navio kernel: [  584.953288] usb 1-1.2: Manufacturer: Realtek
Dec 14 11:15:00 navio kernel: [  584.953294] usb 1-1.2: SerialNumber: 123456

and so on…

According to what has been posted here I suspect power issues, do you have any advice on some low weight USB hub that could power this wifi adapter (I’m using the ALFA AWUS036ACH).

Thanks for your help.
Cheers,

Nacho.

Check compatible wifi adapters because yours was not as of yesterday. No 80211ac was. I’m testing new driver code now

Interesting stuff!
I am having an Alfa-AWUS051NH-v2 running on 5Ghz and get up to 650m coverage with telemetry and video streaming running
I would be interested to know the results you get when yours is working

One way to solve the issue would be to use this wifi key to set the AP on the GCS (easier compatibility for drivers since I assume you are not using a linux based GCS), with the Alfa AWUS051NHv2 on the drone in RX mode.
You can easy use directional antennas on the GCS to improve performance

Let us know how far you come :slight_smile: