Increase power for drone's controller using Openwrt

Hello, I recently bought a drone, and after analysing it, turns out the controller (and the drone itself) uses Linux.

Controller software specs:
Openwrt Reboot (17.01-SNAPSHOT, 1.2.0)

I have access to LuCI interface, but there is almost nothing I can change, manufacturers removed everything unecessary. However I have full root access to SSH.

The drone transmits rtsp video feed and other telemetry to the controller, then to the phone which is connected via Wi-Fi to the controller.

So I wonder, how can I increase the transmit/receive power for the controller? I think there should be a file to change dbm or something like that.

Right now when I type iwconfig:

wifi0     no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"Ground-1ea44f"
          Mode:Master  Frequency:2.437 GHz  Access Point: 38:01:46:91:27:AE
          Bit Rate:72.2 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ath0      IEEE 802.11a  ESSID:"Drone-1ea44f"
          Mode:Managed  Frequency:5.18 GHz  Access Point: Not-Associated
          Bit Rate:0 kb/s   Tx-Power:27 dBm
          RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

br-lan    no wireless extensions.

ro

The drone has 27dBm, can I increase it somehow?

Is there a wireless config file in /etc/config/wireless? There could be a power setting there.

Yes, there is, I tried adding option txpower (number),but I can't set it higher than 27 dBm on rep0, I can only lower it.

config wifi-device 'radio0'
        option type 'qcawifi'
        option phy 'wifi0'
        option channel '36'
        option hwmode '11na'
        option htmode 'HT20'
        option country 'US'
        option burst '1'
        option ani_enable '0'
        option acktimeout '120'
        option quick_setup '60'
        option macaddr '1c:40:e8:17:17:21'
        option qca_chanbw '10'

config wifi-iface 'rep0'
        option device 'radio0'
        option ifname 'ath0'
        option network 'lan'
        option mode 'sta'
        option extap '1'
        option vap_ind '1'
        option set11NRates '0x80808080'
        option encryption 'none'
        option disabled '0'
        option ssid 'Drone-1ea44f'

The TX power could also be physically limited by chipset... or its firmware is hardcoded so it can only run max 27dbm, usually maximum power you can obtain is 30dbm

Also even if you successfully increase the power of the controller you still have the limit of the drone which sending its stream back to you... imo it's better to try and get a more directional antenna to increase both TX and RX capability rather than trying to increase on only 1 side

1 Like

I installed better antennas on the controller, but they didn't really do much better than the stock ones. It would be great to also try and increase the power of the drone too, but I don't have SSH access to the drone (I get connection refused error). I can only connect to the FTP server. Is there a way to somehow enable SSH in FTP by editing a specific file? I looked at the system directories and didn't find any ssh configuration file at all. Maybe the manufacturers removed this feature completely?

This is the drone's linux version:
Linux version 3.4.39-rt143 (sentton@ubuntu14server) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #49 Wed Jun 24 10:45:40 CST 2020

I have no idea who sentton is :smiley:

The controller seems to be running some sort of custom sdk (probably QSDK if it's Qualcomm based) based on openwrt but heavily modified so I don't think you'll be able to increase the power.

Keep in mind that there are regulatory limits to the power allowed on wifi. This will vary by country/region, but it is important to understand the limits allowed in your location. Pushing your device to a higher power than permitted is illegal (which is why many devices have a hard-coded limit), and this can also cause interference with neighboring communications systems. Please make sure you are always in compliance.

Regarding the rest of your questions...

  1. I agree that a high gain directional antenna will give you the best performance. Consider that the drone's power will also be limited (as noted by @minhng99 ), so a good antenna will help the stationary AP "hear" the drone better.
  2. Since your controller is not actually running official OpenWrt, you should ask questions on forums related to the controller and/or reach out to the manufacturer. Because of the customization that often happens with these types of devices, you will get much better information from the people who know the ins-and-outs of those specific systems with the modified OpenWrt versions.
2 Likes

These are the specs:

root@LEDE:~# cat /proc/cpuinfo
system type             : Atheros AR9342 rev 3
machine                 : LEDE C0 board
processor               : 0
cpu model               : MIPS 74Kc V4.12
BogoMIPS                : 278.93
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp dsp2
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Maybe if I change it to other country, it would let me set a higher dbm? How can I do that?

It is technically illegal to go beyond your country's limits

this is the line with the country settings in the wifi file. It is currently set to US aka United States

you can try with BZ (belize), GY, (guyana) or NZ (New Zeland). Countries taken from this article (note that this article is not working with OpenWrt so all methods they use cannot be done in OpenWrt)

note that just pumping wifi power like that is more likely to overheat and cause instability in wifi radio (or whole drone if it is controlled by the same CPU as the access point) than to actually improve signal.

If you want to increase range it's better to do an hardware mod to add antennas on the drone.

27 dBm is quite a lot of power for a wifi device. There must be amplifier chips after the AR9342-- identify those chips and check their rating. It is likely operating at the hardware limit already.

I managed to change it to 30 dBm:

But the iw reg set command didn't work, so I just edited the /etc/config/wireless file, and changed country code for radio0 from US to GY, then added this option:
option txpower 30

Turns out, after changing the region to GY, the controller doesn't want to connect to the drone, but on the other regions like GY, NZ the drone connects to the controller, but only at 27dBm.

Since the drone is running as a client ("Managed" or STA), when connected the AP advises the country regulations to use (the presumption is that APs are less mobile than STAs) and can dictate a maximum power to the STA.

1 Like

Hi, would you mind sharing the model of this drone controller?
Thanks.

Eachine EX4 Pro

Thanks for the information.
Did it work?

No, sadly it didn't. I don't have the drone either. But it's possible to attach a raspberry pi to the drone using mavproxy and connect a usb from the drone to rpi, since the drone is using pixhawk firmware. Then on raspberry pi add a 4g modem and using a VPN you would basically be able to control the drone from anywhere using Mission planner/QGRoundControl.

The place to ask your question about the dji drones is on the dji forum. Not here

1 Like

To add a note to this thread:

HINT (having worked with DJI Tello): You can connect all devices to the same AP; but I'm not sure if the drone will connect to the controller if it's not the DHCP server that issued the IP to it.

Since it's illegal for civilians to fly a drone out of sight in the US - I've never had to play with that.

As @psherman noted, the DJI forum would be best for inquires on the drone itself.