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 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
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
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...
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.
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.
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.
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.
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.
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.