• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[TWEAK] Reduce wifi Transmit Power in Zeus to get more battery life

Search This thread

adxgrave

Senior Member
Dec 24, 2011
262
52
Of course... the power will be on people's hands... ;)

Thanks man. Also just to note you if you missed it, the current txpower app we're using doesn't auto set txpower value when we turn on the Portable Hotspot feature, it goes back to default value. It would be great if you can incorporate that too. Also, sorry if this is too much of a request, but it would be useful if you can put dropbear so we can SSH into the phone for future tweaking. I've tried sshdroid, but with ads being block it wouldn't run.

Sent from my LG-P970 using XDA App
 

N00BY0815

Senior Member
Nov 6, 2011
2,528
1,897
Can anyone already confirm less drain? It already seems lower with zeus v3.2, at least for me.

Sent from my LG-P970 using Tapatalk
 

jason600

Senior Member
Nov 26, 2009
195
157
For most users, this mod won't make much diference. TXpower effects only when your phone is sending information, it doesn't effect recieving. If you are web browsing, the only information your phone is sending is a small request to download the page, everything else is recieving.

You can check in BatteryUsage how much data you are sending ie open BatteryUsage and click on your browser, it will display cpu usage and data sent/recieved.

If your are using running wifi tethering, ftp server or are uploading a lot of files to the internet, you may see a small diference.

Download the excellent app PowerTutor from the market, it will show real time usage power drain for each component ie screen, cpu, wifi, 3G. After uploading 100mb files from my phone to my PC with diferent txpower settings, I can't see much diference.

The way wifi works on Android is it has diferent power states depending on usage, sleep, active, idle etc. When information is being received, the wifi switches to active (with uses approx 750mw, for comparison the screen on minimum uses about 300mw, maximum is about 900mw) until all information is downloaded, then it switches back to idle. The power drain when receiving is the same, regardless of download speed.

To clarify, is you load a web site on a slow connection, the wifi will be in active mode (using 750mw) for maybe 15 seconds. On a fast connection, it might be in active mode (using 750mw) for 5 seconds. So, the faster you pages load, the less power is used.

You can experiment using PowerTutor to see the diferent power drains for diferent browsers. Remember, the browser that loads the page fastest will be using less power. In my test, Opera Mini uses the least power, by a large margin.

One last ting about txpower, if you set it too low, you will get an excessive number of retries. To check, run the command 'iwconfig wlan0' after you've been using wifi. On the last line, check Tx excessive retries, if its 0, it ok. Anything else and you need to increase the txpower value and repeat until its 0. On my network, 5db causes excessive retries, 10db works OK. The value you can use depends on how much interference you get, especially when there are multiple networks close by with overlapping channels.
 

Huexxx

Senior Member
Jul 21, 2009
1,700
4,848
44
Madrid
For most users, this mod won't make much diference. TXpower effects only when your phone is sending information, it doesn't effect recieving. If you are web browsing, the only information your phone is sending is a small request to download the page, everything else is recieving.

You can check in BatteryUsage how much data you are sending ie open BatteryUsage and click on your browser, it will display cpu usage and data sent/recieved.

If your are using running wifi tethering, ftp server or are uploading a lot of files to the internet, you may see a small diference.

Download the excellent app PowerTutor from the market, it will show real time usage power drain for each component ie screen, cpu, wifi, 3G. After uploading 100mb files from my phone to my PC with diferent txpower settings, I can't see much diference.

The way wifi works on Android is it has diferent power states depending on usage, sleep, active, idle etc. When information is being received, the wifi switches to active (with uses approx 750mw, for comparison the screen on minimum uses about 300mw, maximum is about 900mw) until all information is downloaded, then it switches back to idle. The power drain when receiving is the same, regardless of download speed.

To clarify, is you load a web site on a slow connection, the wifi will be in active mode (using 750mw) for maybe 15 seconds. On a fast connection, it might be in active mode (using 750mw) for 5 seconds. So, the faster you pages load, the less power is used.

You can experiment using PowerTutor to see the diferent power drains for diferent browsers. Remember, the browser that loads the page fastest will be using less power. In my test, Opera Mini uses the least power, by a large margin.

One last ting about txpower, if you set it too low, you will get an excessive number of retries. To check, run the command 'iwconfig wlan0' after you've been using wifi. On the last line, check Tx excessive retries, if its 0, it ok. Anything else and you need to increase the txpower value and repeat until its 0. On my network, 5db causes excessive retries, 10db works OK. The value you can use depends on how much interference you get, especially when there are multiple networks close by with overlapping channels.

Thanks for your knowledge!
 

adxgrave

Senior Member
Dec 24, 2011
262
52
This feature is utmost important in hotspot mode (access point mode) and tethering (ad-hoc mode). For regular use (managed mode), one also has to take into account the initial communication between router and phone not just after connection has been established. Only crank up the power if you need to connect to a far away AP or trying to connect to the one you failed to connect before.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Huexxx has included this feature in his Zeus ROM v4. With Zeus, there's no need to install WiFi TX Power apps from market and we have one less app running in background. Go to Zeus thread for more info.

    In quest to get longer battery life in Zues ROM (which is already awesome, btw), I remember an important feature in openwrt firmware that is transmit power. I search around for tweaks and then tried it on our OB. I found that our OB's wifi driver is capable of adjusting WiFi's transmit power. This is a good feature to decrease power consumption. Many of us have their WiFi router broadcasting signal in close proximity and for those who use portable hotspot most of the time the phone is sitting close to the laptop. In both situation, we can turn the power down thus give us longer uptime.

    I'm not sure about the original GB but in Zues (v3.2b) there's no "iwconfig" which we need to configure the wireless interface. I found a post here : http://forum.xda-developers.com/showthread.php?t=1465750 and at the bottom of the first post there's link to download "iwconfig", http://www.mediafire.com/?r1uu73tr5q8fsoj. Thanks to the original poster, full credit goes to him.

    I've done this via adb, can also be done via terminal (basically copy iwconfig to /system/xbin/):

    1. Download iwconfig from the link above to your pc (if you got iwconfig with .txt extension, remove .txt from it)
    2. Connect the phone and run adb push iwconfig /system/xbin/
    3. adb shell and cd to /system/xbin/
    4. chmod 755 iwconfig

    type iwconfig wlan0 in adb shell to see current wlan0 interface configuration. This is what I got:

    Code:
    wlan0     IEEE 802.11-DS  ESSID:"TL-WR1043ND"  Nickname:""
              Mode:Managed  Frequency:2.437 GHz  Access Point: xx:xx:xx:xx:xx:xx   
              Bit Rate=54 Mb/s   Tx-Power:32 dBm   
              Retry min limit:7   RTS thr:off   Fragment thr:off
              Power Managementmode:All packets received
              Link Quality=5/5  Signal level=-25 dBm  Noise level=-91 dBm
              Rx invalid nwid:0  Rx invalid crypt:7  Rx invalid frag:0
              Tx excessive retries:114  Invalid misc:0   Missed beacon:0

    As you can see the default Tx-Power is a whooping 32dBm (1496mW), I'm not sure if this is a correct value reported by the driver but this is definately too much.

    We can change the transmit power directly with iwconfig by command iwconfig txpower but that's not very convenience. So, download WiFi TXpower from market here: https://market.android.com/details?id=rubberbibpepper.WiFiTxPower&hl=en . As we've already have iwconfig in the system, this app will run fine. Set the power to 4dBm first and see if it's ok for your usage.

    Note that this is not final. I'm still monitoring power consumption if it has any effect (which it should if the txpower has been reduce). So far so good.

    Edit: I've run a simple test by setting up a few routers around, checking the signal quality on the router and using wifi analyser on the phone itself. I can confirm that the phone driver did honour the txpower setting. Reducing the power also has improve the noise level making it more efficient and less prone to transmission error.

    if you tried this, post your opinion/result.
    3
    For most users, this mod won't make much diference. TXpower effects only when your phone is sending information, it doesn't effect recieving. If you are web browsing, the only information your phone is sending is a small request to download the page, everything else is recieving.

    You can check in BatteryUsage how much data you are sending ie open BatteryUsage and click on your browser, it will display cpu usage and data sent/recieved.

    If your are using running wifi tethering, ftp server or are uploading a lot of files to the internet, you may see a small diference.

    Download the excellent app PowerTutor from the market, it will show real time usage power drain for each component ie screen, cpu, wifi, 3G. After uploading 100mb files from my phone to my PC with diferent txpower settings, I can't see much diference.

    The way wifi works on Android is it has diferent power states depending on usage, sleep, active, idle etc. When information is being received, the wifi switches to active (with uses approx 750mw, for comparison the screen on minimum uses about 300mw, maximum is about 900mw) until all information is downloaded, then it switches back to idle. The power drain when receiving is the same, regardless of download speed.

    To clarify, is you load a web site on a slow connection, the wifi will be in active mode (using 750mw) for maybe 15 seconds. On a fast connection, it might be in active mode (using 750mw) for 5 seconds. So, the faster you pages load, the less power is used.

    You can experiment using PowerTutor to see the diferent power drains for diferent browsers. Remember, the browser that loads the page fastest will be using less power. In my test, Opera Mini uses the least power, by a large margin.

    One last ting about txpower, if you set it too low, you will get an excessive number of retries. To check, run the command 'iwconfig wlan0' after you've been using wifi. On the last line, check Tx excessive retries, if its 0, it ok. Anything else and you need to increase the txpower value and repeat until its 0. On my network, 5db causes excessive retries, 10db works OK. The value you can use depends on how much interference you get, especially when there are multiple networks close by with overlapping channels.
    2
    In quest to get longer battery life in Zues ROM (which is already awesome, btw), I remember an important feature in openwrt firmware that is transmit power. I search around for tweaks and then tried it on our OB. I found that our OB's wifi driver is capable of adjusting WiFi's transmit power. This is a good feature to decrease power consumption. Many of us have their WiFi router broadcasting signal in close proximity and for those who use portable hotspot most of the time the phone is sitting close to the laptop. In both situation, we can turn the power down thus give us longer uptime.

    I'm not sure about the original GB but in Zues (v3.2b) there's no "iwconfig" which we need to configure the wireless interface. I found a post here : http://forum.xda-developers.com/showthread.php?t=1465750 and at the bottom of the first post there's link to download "iwconfig", http://www.mediafire.com/?r1uu73tr5q8fsoj. Thanks to the original poster, full credit goes to him.

    I've done this via adb, can also be done via terminal (basically copy iwconfig to /system/xbin/):

    1. Download iwconfig from the link above to your pc
    2. Connect the phone and run adb push iwconfig /system/xbin/
    3. adb shell and cd to /system/xbin/
    4. chmod 777 iwconfig

    type iwconfig wlan0 in adb shell to see current wlan0 interface configuration. This is what I got:

    Code:
    wlan0     IEEE 802.11-DS  ESSID:"TL-WR1043ND"  Nickname:""
              Mode:Managed  Frequency:2.437 GHz  Access Point: xx:xx:xx:xx:xx:xx   
              Bit Rate=54 Mb/s   Tx-Power:32 dBm   
              Retry min limit:7   RTS thr:off   Fragment thr:off
              Power Managementmode:All packets received
              Link Quality=5/5  Signal level=-25 dBm  Noise level=-91 dBm
              Rx invalid nwid:0  Rx invalid crypt:7  Rx invalid frag:0
              Tx excessive retries:114  Invalid misc:0   Missed beacon:0

    As you can see the default Tx-Power is a whooping 32dBm (1496mW), I'm not sure if this is a correct value reported by the driver but this is definately too much.

    We can change the transmit power directly with iwconfig by command iwconfig <interface> txpower <value> but that's not very efficient. So, download WiFi TXpower from market here: https://market.android.com/details?id=rubberbibpepper.WiFiTxPower&hl=en . As we've already have iwconfig in the system, this app will run fine. Set the power to 4dBm first and see if it's ok for your usage.

    Note that this is not final. I'm still monitoring power consumption if it has any effect (which it should if the txpower has been reduce). So far so good. My only concern is if the setting didn't have any effect on the actual value which is quite difficult to determine without proper equipment.

    if you tried this, post your opinion.

    If it worths, i 'll include it!

    Sent from my LG-P970 using XDA App
    2
    I've already modified zeus to automatically set it on boot, and to automatically reset it when wifi on-off-sleep, etc...

    You can use it on next zeus v4...

    But, does it works??? Does it saves battery?
    1
    Nice... maybe huexxx can incorporate this and make a script or .sh to set a default value/or configurable via zeus script.