Permanently increasing the FPV + RE Wifi TX Power

Joined
May 20, 2014
Messages
94
Reaction score
15
UPDATED: 26-Oct-2014
From my learning it appears the Range Extender is adaptive and finally I settled on *not* hard setting the TX Power in the Range Extender, but hard setting the TX Power at 15 in the bird only. I've had video up to 1KM away (flying down the Chao Phraya river in Bangkok with other radio and wifi signals in the viscinity).
**********************************************************************************

Here's sharing my steps to permanently increasing the FPV + RE Wifi TX Power.

The root password and some of the commands are based on other's work particularly very green and his post here http://www.phantompilots.com/viewtopic.php?f=24&t=15771 and isopro and his post here http://www.phantompilots.com/viewtopic.php?f=7&t=20710 in this forum. Thanks to urgno also on this forum for pointing out the commands should be added to the startup script. I did more research and have updated this original post.

SSH Access:
DJI PV2+ SSH 192.168.1.1 root / 19881209
SJI Range Extender SSH 192.168.1.2 root / 19881209



CPU Info:


root@Phantom:~# less /proc/cpuinfo

system type : Atheros AR9342 rev 2
machine : DJI TL-PHANTOM v2
processor : 0
cpu model : MIPS 74Kc V4.12
BogoMIPS : 266.64
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0918, 0x0268, 0x0138]
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available


It's Open-Wrt and use Trunk ar71xx for install packages. Installed wireless-tools from here as follows:
http://downloads.openwrt.org/snapshots/ ... ages/base/

Used SCP to copy to created /tmp1 folder:

Installed as follows:
root@Phantom:~# opkg install /tmp1/wireless-tools_29-5_ar71xx.ipk
Installing wireless-tools (29-5) to root...
Configuring wireless-tools.


Check TX Power:
root@Phantom:~# iwconfig
wlan0.sta1 IEEE 802.11bgn Mode:Secondary Tx-Power=3 dBm
RTS thr:eek:ff Fragment thr:eek:ff
Power Management:eek:n

lo no wireless extensions.

wlan0 IEEE 802.11bgn Mode:Master Tx-Power=3 dBm
RTS thr:eek:ff Fragment thr:eek:ff
Power Management:eek:n

eth0 no wireless extensions.

br-lan no wireless extensions.



Default TX Power = 3dB

On the PV2+, to set Default TX Power to 15dB:

View the original file, before we change it:
cat /etc/rc.local

For first time to add the additional line to the file that runs after the drone starts:
sed -i 's/sh \/etc\/watchdog_wireless.sh/iw phy phy0 set txpower fixed 1500'\\n'sh \/etc\/watchdog_wireless.sh/g' /etc/rc.local

Replace 1500 with preferred transmit power (xx00)

Check line is added correctly:
cat /etc/rc.local

If changing after the line has already been added:
sed -i 's/iw phy phy0 set txpower fixed [0-9]*/iw phy phy0 set txpower fixed 1500/g' /etc/rc.local

Reboot:
root@Phantom:~# reboot

After re-join the DJI Wireless LAN and SSH in to the PV2+ again.

Check:
root@Phantom:~# iwconfig wlan0
wlan0 IEEE 802.11bgn Mode:Master Tx-Power=15 dBm
RTS thr:eek:ff Fragment thr:eek:ff
Power Management:eek:n


Done!


On the RE, to set Default TX Power to 15dB:

View the original file, before we change it:
cat /etc/config/wireless

Check format in the file of the line for 'option txpower'. Make a note:
1) If there is one or two spaces between the word txpower and the number.
2) If there is an apostrophe (') around the number of not:

In my case on the RE I had one space before the number and then an apostrophe (') so used this command to change the TX power:

sed -i 's/option txpower '\''[0-9]*/option txpower '\''15/g' /etc/config/wireless

Check line is added correctly:
cat /etc/rc.local

You can use the same command to adjust the TX power, changing 15 to a different value:
sed -i 's/option txpower '\''[0-9]*/option txpower '\''15/g' /etc/config/wireless

Reboot:
root@Phantom:~# reboot

After re-join the DJI Wireless LAN and SSH in to the PV2+ again.

Check with:
root@Phantom:~# iwconfig wlan0

Done!

I have not experimented above 15 [1500].
Use at your own peril! I cannot be responsible in case of any problem/failure.



---

Interesting contents of ser2net.conf for defined ports:

2001:raw:6:/dev/ttyS0:115200 NONE 1STOPBIT 8DATABITS -XONXOFF LOCAL -RTSCTS
#2002:raw:600:/dev/ttyS1:9600 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS
2003:raw:5:/dev/ttyS2:9600
2004:raw:5:/dev/ttyS3:115200
2005:raw:5:/dev/ttyS4:9600
2006:raw:5:/dev/ttyS5:9600
2007:raw:5:/dev/ttyS6:9600 tw=tw1 tr=tr1
3001:telnet:0:/dev/ttyS0:19200 remctl banner1
3011:telnet:3:/dev/ttyS0:19200 banner2
#3002:telnet:0:/dev/ttyS1:9600
3003:telnet:0:/dev/ttyS2:9600 banner3
3004:telnet:0:/dev/ttyS3:115200
3005:telnet:0:/dev/ttyS4:9600
3006:telnet:0:/dev/ttyS5:9600
3007:telnet:0:/dev/ttyS6:9600
5001:rawlp:10:/dev/lp0


Disk Space on PV2+:

root@Phantom:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 4096 1072 3024 26% /
/dev/root 3072 3072 0 100% /rom
tmpfs 14564 76 14488 1% /tmp
tmpfs 512 0 512 0% /dev
/dev/mtdblock3 4096 1072 3024 26% /overlay
overlayfs:/overlay 4096 1072 3024 26% /



Can anyone advise for the output format of the flight telemetry if accessing the ser2net defined ports? If i can figure it out i could engage a developer to create flight telemetry logging (stored on the PV2+ and then downloadable after flying or possibly save to the camera memory card).


Regards,

Richard (Serpent)
 
Serpent said:
Can anyone advise for the output format of the flight telemetry if accessing the ser2net defined ports? If i can figure it out i could engage a developer to create flight telemetry logging (stored on the PV2+ and then downloadable after flying or possibly save to the camera memory card).


Regards,

Richard (Serpent)

Already been done by RC Taco in the Vision Plus Utility app... logs the file to your phone or tablet so don't have to download...
Maybe give him a Holla? (Forum user name "ocatcr")

Also ... The repeater comes from the factory with the specs showing output at 20dB... (100mW)
Isn't your steps above showing the power going the wrong way... decreasing output?
 
Hi Serpent,

Firtst of all tks very much for all this usefull info.
I did the procedure and got iwinfo showing Tx-Power=15 dBm on both devices ... till cycling power.
Original Tx-Power came back on both devices. I.E it did not saved the changes.

What coud be wrong, please.

TKS : Juan
 
Sorry the above setting doesn't retain after reboot. As urgno points out the setting may need to be added to the startup script (/etc/rc.local i understand).
I'm going to test this later today and report back.
 
I've edited my original post. This should now work to successfully hard set the TX power on the PV2+ and RE. I've tested it with rebooting.
 
After some tinkering today, I may have found an alternate way of permanently changing this value:
If changes to /etc/config/wireless get clobbered during a reset, I think it's due to the 'overlay' directory copying itself to the standard root files, basically becoming a fresh instance each boot (Speculation, someone smack me if not).

When I modified /overlay/etc/config/wireless, the changes survived a reboot.
Obviously I wouldn't suggest using this as your go-to for every change, as that could prevent a reboot from fixing any mistakes... but this is a benign enough change that it could be a worthy alternative.
 
Great work Morgan.
Continuing the exploration i've found my RE was at 20dB TX power without hard setting the value. I'm fairly sure it's adaptive and wondering if it's necessary to hard set set the TX power on the RE in attempt to increase the FPV range. Hard setting the TX on the PV2+ i think has more effect.
 
DBS said:
Serpent said:
Can anyone advise for the output format of the flight telemetry if accessing the ser2net defined ports? If i can figure it out i could engage a developer to create flight telemetry logging (stored on the PV2+ and then downloadable after flying or possibly save to the camera memory card).


Regards,

Richard (Serpent)

Already been done by RC Taco in the Vision Plus Utility app... logs the file to your phone or tablet so don't have to download...
Maybe give him a Holla? (Forum user name "ocatcr")

Also ... The repeater comes from the factory with the specs showing output at 20dB... (100mW)
Isn't your steps above showing the power going the wrong way... decreasing output?

Yes the repeater gives 20db ( depends on what antenna you use ) but the bird gives max 3.5db out. Even the app of RC Taco states it would give 20db but it isn't. If you change the output in his app you will see a difference in DB but it maxes out on 3.5db. I have tested that yesterday and seen on the meter.
 

Members online

Forum statistics

Threads
143,066
Messages
1,467,356
Members
104,934
Latest member
jody.paugh@fullerandsons.