So often, while browsing pages, i'll notice that the progress bar will hang for a few seconds. I'm on wifi, so looking at my router's traffic charts, I can tell that no data is being transferred. This led me to believe that I may be waiting on Tmobile's dns servers, and they may be slow.
i figured out how to change the dns servers used for mobile data. type the following into a root terminal/adb shell
setprop ro.kernel.android.ndns 2
setprop net.dns1 208.67.222.222
setprop net.dns2 208.67.220.220
i've noticed a pretty big speed boost in browsing from this...no more long hangs with nothing happening. the only problem is it doesn't stick after a reboot so I have to enter it every time i restart, which is annoying. Anyone have any ideas on how to make this stick?
Thanks,
Vivan
You could throw something in /system/etc/init.d/, couldn't you?
Edit: Eh, it looks like it doesn't actually (re)initialize the DNS settings until long after the init.d scripts run. Actually, this probably means you'll lose the settings when changing towers / signal type. This post has an .apk which they claim will do what you want, but I haven't tried it.
Related
I’m like many others, a happy user of Helmi’s ROM and read this forum everyday to see what clever things people have come up with.
Recently, my cell phone provider came out of the dark ages and is providing GPRS. It’s even free at the moment! (Even though it’s very slow).
This is all nice for on the road and in town, but when I am at home or in the office, it want to connect via WiFi and being able to access web pages a LOT faster then via GPRS. I can connect to WiFi while I am connected to GPRS, but when I try to open a page with PIE, it uses the GPRS connection, not my WiFi (the difference is easy to tell since it’s so slow).
On one of the previous ROMs there was a little utility to track the GPRS settings and it had a disconnect option. However, this program is no longer included in the Helmi’s 1.4 and I have not found any other option to turn off GPRS then by using the “Flight mode” program to disconnect from the cell phone network and back on again. But that is of course a slow and strange solution.
What I would like is this: When WiFi is available, it will go via WiFi, when WiFi is off, it should use GPRS to get a web page. Is there is a way to prioritize the internet connections?
Vijay555 has a command-line utility to disconnect GPRS with and I’m going to give that a try, but maybe someone has a different solution where the 2 connection can exist at the same time….
Thanks in advance.
Are u referring to http://www.gb-soft.cz/XDAII/ this little app?
GerardNL said:
Is there is a way to prioritize the internet connections?
Click to expand...
Click to collapse
Yes, it's built into the TCP/IP protocol. You are looking for something called "interface metric" which is a number. IIRC, the lower the metric, the lower the "cost" i.e. the better the link is. This can be set manually on PCs. No idea how to do it on the phone, probably a registry tweak. The following makes sense:
1 Wifi
10 ActiveSync
100 GPRS
The numbers are whatever you want them to be.
kerio said:
Are u referring to http://www.gb-soft.cz/XDAII/ this little app?
Click to expand...
Click to collapse
Yes, that's the one. Thx!. It's a very tiny program, but it has the option to add the "disconnect" button to the pop-up bubble. Maybe that is just a registry setting... I will have to look into that one. If so, then that registry option is going to be a standard for me...
fraser said:
Yes, it's built into the TCP/IP protocol. You are looking for something called "interface metric" which is a number. IIRC, the lower the metric, the lower the "cost" i.e. the better the link is. This can be set manually on PCs. No idea how to do it on the phone, probably a registry tweak. The following makes sense:
1 Wifi
10 ActiveSync
100 GPRS
The numbers are whatever you want them to be.
Click to expand...
Click to collapse
I totally agree and it does make a lot of sense. I've been snooping around in the registry, but did not find anything that I expect that has to do with the "cost" of a connection. So, that might mean that extra keys need to be added if it would be possible at all and that's a bit out of league.
However, I can't imagine that other people not facing the same problem, so maybe the solution is in a totally different direction??
GerardNL said:
I totally agree and it does make a lot of sense. I've been snooping around in the registry, but did not find anything that I expect that has to do with the "cost" of a connection. So, that might mean that extra keys need to be added if it would be possible at all and that's a bit out of league.
Click to expand...
Click to collapse
I've looked around myself with no success. It must be there because it's a part of the TCP spec. Very odd.
Is there any way to get a "netstat -r" out of the phone? vxUtil and vxIpConfig don't seem to do it, but the output would confirm that the device knew about iface metrics.
However, I can't imagine that other people not facing the same problem, so maybe the solution is in a totally different direction??
Click to expand...
Click to collapse
I've just learned to live with the fact that you cannot control this. Not that it matters for me, GSM and GPRS doesn't work for me on the 3.5 roms anyway; some sort of carrier issue.
Maybe the link below can help you
http://msdn2.microsoft.com/en-us/library/aa915714.aspx
I've found it see the attached file.
Original source : http://www.ce4you.cz/forums/view_topic.asp?t=13033&dd=0&fi=10 thx goes to jimm98y
PocketCMD not working
I've tried to install the PocketCMD program, but whenever I start it, I get the below error:
"CMD Cannot start. There are too many console windows open. Please close some console applications and try again"
This even happens when I just restarted my BA. Does PocketCMD work for you?
Its working like a charm, I've Helmi 1.4 vanilla one. Maybe its cause of some installed program?
I recieved the same message as you - but one soft reset and then disappeared.
Also I've NETf v.2 installed - not sure if its required or not?
http://www.symbolictools.de
Found out more about the network metric
Today, I noticed that there is also a Pocket CMD icon on of the Settings tabs. Once I started that and flipped through the pages, Pocket CMD starts!
The strange thing is that after another reset, I get the same error message again and the above trick doesn't work.
While it was working, I got these results:
With "netstat -r" (or "route print") I've figured out that my GPRS interface has a metric of 50.
And when connected to ActiveSync the metric is 30 (but the GPRS gets disconnected)
The WiFi interface has a metric of ?? (Haven't gotten that one yet), but obviously >50 or we would not be having this discussion....
I've done some searching on the internet (with the keywords: Pocket PC network metric interface) and you find a lot of conversion tools for metric to imperial, but did find something interesting on this page:
From: http://www.lockergnome.com/nexus/it/category/troubleshooting/page/3/ (by Marc Erickson)
-------------------------------
Below is the syntax to add a new route:
ROUTE ADD MASK METRIC IF
Here’s an example:
ROUTE ADD 192.168.1.0 MASK 255.255.255.0 192.168.0.9 METRIC 2 IF 2
In this example, 192.168.0.9 is the gateway for all traffic to the destination 192.168.1.0/24. The metric is 2, and the interface number is 2.
When you add a route using this syntax, the route doesn’t persist across restarts of the computer. To make a route persist, add the -p switch to the command, as shown below:
ROUTE -p ADD 192.168.1.0 MASK 255.255.255.0 192.168.0.9 METRIC 2 IF 2
To delete a route, use the DELETE keyword and the destination address. Here’s an example:
ROUTE DELETE 192.168.1.0
----------------------
So, it is (should) be possible to manually add and remove routes and set the metrics of multiple connections. Especially with the "-p" option this looks very interesting. Since all that we need is that the metric of WiFi is lower then the one of GPRS and we're in business.
Have you ever worked with ROUTE command (see the windows help)? It shouldn't be difficult to set the proper metric - just make your GPRS connection and analyse routing table. Then make persistent changes.
Or post here your entries of routing table.
never mind, I answered my own question .
Metrics are not the problem
Today, I finally had a chance to work on this and all the electronics were willing to cooperate, so I finally have a result. This is the output from the "route print" statement while having GPRS and WiFi enabled:
Code:
=============================================================================
Interface List
196610 0 0 0 0 0 0
196611 0 9 2d 10 ab 0 tiacxwln1
=============================================================================
=============================================================================
Active Routes
The no. of entries is ::: 13
Destination Netmask GatewayAddress Interface Metric
----------------------------------------------------------------------------
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.3 30
0.0.0.0 0.0.0.0 10.41.247.141 10.41.247.141 50
10.0.0.0 255.0.0.0 10.41.247.141 10.41.247.141 50
10.41.247.141 255.255.255.255 127.0.0.1 127.0.0.1 50
10.255.255.255 255.255.255.255 10.41.247.141 10.41.247.141 50
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.3 192.168.1.3 30
192.168.1.3 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.1.255 255.255.255.255 192.168.1.3 192.168.1.3 30
224.0.0.0 240.0.0.0 192.168.1.3 192.168.1.3 30
224.0.0.0 240.0.0.0 10.41.247.141 10.41.247.141 50
255.255.255.255 255.255.255.255 10.41.247.141 10.41.247.141 1
255.255.255.255 255.255.255.255 192.168.1.3 192.168.1.3 1
=============================================================================
For the WiFi, I'm using the 192.x.x.x range and the 10.x.x.x is used by the phone company. As you can see, the metrics are correct: WiFi has a metrics of 30 and GPRS of 50, so when you open a page and both connections are active it should route via the WiFi as these 2 lines would suggest:
Code:
Destination Netmask GatewayAddress Interface Metric
----------------------------------------------------------------------------
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.3 30
0.0.0.0 0.0.0.0 10.41.247.141 10.41.247.141 50
So, why doesn't this work? As it seems to me, the metric is not the problem that the "cheapest" route is not choosen. I have been thinking what else could cause this, but have not found anything logical yet.
Interesting. I've been quiet on this as I can't get PocketCMD to work. Locks up my phone.
What I would test next is test that all routes are active. Connect to GPRS and use xvUtil tracert (or pocketcmd if it has it) to determine where packets for the following destinations:
1) www.google.com
2) 192.168.0.1 (you router)
3) 10.41.247.141 (GPRS router, may change per connection)
Now, if you can hit (2) OK, the WiFi routing is mostly OK. As per your original problem, (1) should route via GPRS. The default route is represented by 0.0.0.0 here; this means that any subnets (e.g. google's) that aren't specifically mentioned in the table go that way. If you delete the GRPS 0.0.0.0 route via "route delete", then you should guarantee that the internet packets go via your wifi. However, this isn't an ideal solution as you would need to run this all the time. On the other hand, you might be able to write two scripts to manage this. The first would activate the wifi and delete the GPRS route. The second would deactivate the wifi and re-enable the route. As the GPRS route probably changes, this could be difficult. Would probably be easier to write this in Visual Studio as a compiled app in order to do the parsing, perhaps storing the GPRS route details in the registry for retrieval when it's re-enabled. Quite a lot of work for what is essentially a brute force fix. There must be a better way...
I want to ask anyone with better knowledge of the android os for help.
I need to be able to connect to ADHOC networks. I have a laptop with LAN internet connection and I want to connect my G1 to the laptop's wi-fi. I used to do that with windows mobile.
YES I know there are similar topics, but they are all abandoned and ignored.
I almost feel that it's forbidden to talk about that.
WHY I need that. I live in a country with NO unlimited data plans and very expensive mobile internet. That's it. I want to be able to sync, download and watch youtube while relaxing on the sofa at home without pennies dropping off my pockets for every tiny byte I download.
OK HERE's THE SOLUTION. Thanks to everyone who made the great tutorials available to us :
http://hydtech.wordpress.com/2009/09/14/how-to-connect-to-ad-hoc-networks-using-tmobile-g1-android/
The important part is to tweak the windows part - you need to tell the broadband/adsl internet connection to share itself to the Private wireless network (the network manging your Wireless adapter). If you are having trouble with the windows part (say you connect and have full bars on the phone but no access to web) google ICS (internet connection sharing) in windows and you should get it working.
*Important notice: AdHoc will drain your battery very fast (1hour tops)
Maybe one of the reasons they disabled it... If you cant cope with taht - get a router. I'm cheap and I'm using it like that
Possible solution
I downloaded aNETSHARE - a free aplication for wifi tethering posted on this forum as well. Inside the apk there is a tiwlan_ini file which might be executed when running the app so you can create adhoc connection on the phone. I have replaced the /etc/wifi/tiwlan.ini with this file and tonight I'm gonna try it on the laptop, but I guess it will only enable creation of adhoc networks on the phone.
Am I talking to myself?
I it's not the tiwlan.ini to be edited. There is a wpa_suplicant.conf file where the AP are stored. I will edit it tomorow and see if it works. Helloo unix gurus. Have some mercy on my mortal soul and help a little.
axlastro said:
I it's not the tiwlan.ini to be edited. There is a wpa_suplicant.conf file where the AP are stored. I will edit it tomorow and see if it works. Helloo unix gurus. Have some mercy on my mortal soul and help a little.
Click to expand...
Click to collapse
wish i could help, by the time someone does youll of figured it out lol
axlastro said:
I it's not the tiwlan.ini to be edited. There is a wpa_suplicant.conf file where the AP are stored. I will edit it tomorow and see if it works. Helloo unix gurus. Have some mercy on my mortal soul and help a little.
Click to expand...
Click to collapse
You do want to use a modified tiwlan.ini, but do not replace the system one.
Simply create a new one somewhere and use a command like this
Code:
insmod /system/lib/modules/wlan.ko
wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration -i /data/local/tiwlan.ini
netcfg tiwlan0 dhcp
setprop net.dns1 208.67.222.222
The last two lines are to set up the proper IP address and dns server.
the backend of the wifi config gui uses wpa_supplicant. simply edit this and add whatever type of wireless connection you want. this is how we obtained wpa2 enterprise support. it was capable, the gui is just setup, for some reason, to ignore wpa2 enterprise/adhoc/whatever networks.
here's the original post from forever ago
http://forum.xda-developers.com/archive/index.php/t-450915.html
... Wouldn't it be easier to turn your laptop into an Access Point?
Assuming you are under Windows, you can enable ICS (Internet Connection Sharing) and then use your G1 to connect to that.
Many people do the same to connect their XBOX360 for example to their laptop or computer to go online.
NeoBlade said:
... Wouldn't it be easier to turn your laptop into an Access Point?
Assuming you are under Windows, you can enable ICS (Internet Connection Sharing) and then use your G1 to connect to that.
Many people do the same to connect their XBOX360 for example to their laptop or computer to go online.
Click to expand...
Click to collapse
This is what he's trying to do. The thing is, by default a G1 does not see/connect to Ad-hoc connections, which is what the ICS setup will create.
All the information he needs to get his G1 to see/connect to Ad-hoc networks has been listed in this thread by now. Whether or not he will read any of it is another story.
Aaaahh... My bad. I thought the programs already had such a feature >_< Would be interested in this also incase I don't have any signal for whatever reason.
billc.cn said:
You do want to use a modified tiwlan.ini, but do not replace the system one.
Simply create a new one somewhere and use a command like this
Code:
insmod /system/lib/modules/wlan.ko
wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration -i /data/local/tiwlan.ini
netcfg tiwlan0 dhcp
setprop net.dns1 208.67.222.222
The last two lines are to set up the proper IP address and dns server.
Click to expand...
Click to collapse
Thank you! I needed some help on that.
So if I create a internet connection in XP I have to specify a dns there and then enter the same dns in the last line, right?
I actually replaced the system tiwlan.ini (i kept the original) with the one from the aNETSHARE.apk but as expected it created an AP on the G1. I guess I will have to modify the WPA_SUPPLUCANT.CONF too. it should be something like
SSID="test adhoc"
MODE=1 (i think 1 stands for adhoc)
and some other lines i dont remember like the encryption mode and frequency. There are plenty of sample config files. Tonight I will try to do it.
But the question is - what do I modify in tiwlan.ini - is it only the line adhoc=0 to adhoc=1 enough or should I specify ip address and dns there too.
btw I did configure an adhoc network using the wifiHELPER app but all it did was add it to my wifi connections list without being able to see it. The only option was to "forget" the network.
Anyway. I think you helped enough, I will figure read the thread pointed by breaultm. Thanks. I actually couldn't find this very thread cos I searched with "adhoc" as a keyword. Thank you again. I really don't see why they omitted the support for this type of connection. My guess - either a security concern or they just want to make you pay for data plan.
Some reason you don't just use a wireless access point? They're DIRT CHEAP... for example: http://www.infonec.com/site/main.php?module=detail&id=352591 -- thats a wireless router (just disable dhcp server and don't use the wan port) PLUS a wireless nic for $34 CDN.
lbcoder said:
Some reason you don't just use a wireless access point? They're DIRT CHEAP... for example: http://www.infonec.com/site/main.php?module=detail&id=352591 -- thats a wireless router (just disable dhcp server and don't use the wan port) PLUS a wireless nic for $34 CDN.
Click to expand...
Click to collapse
Well, I know. The cheapest routers are like 35 USD here in Bulgaria. Why not buy one? Call me cheap, but I'd better buy a bigger sd card first (I use a 4gb one now). I used to connect wirelessly with a pocketPC to the laptop and the connection was very stable. If I can't manage to connect the hard way then I will buy a router...
Hey peeps. I'm on Andromeda 3 and I have been plagued lately by a very odd wireless issue that I cannot seem to fix. My symptoms will replicate no matter which wireless network that I connect to.
First off, I am an IT guy so I am very savvy. Secondly, I have been developing a theme on this phone so that may be related, but unlikely.
Some information on my setup:
In my home I have a Cisco Aironet 1200 802.11g access point that I am using for wifi behind a Cisco PIX 501 router.
At work we use Extreme Networks (enterprise grade) wireless access points with Juniper firewalls/routers/switches. I do not recall model numbers (irrelevant).
The problem:
Issue #1 - When I turn on wifi my signal bounces between 0 and 1 bar, and occasionally if the sun and moon are in the perfect positions in orbit, I will get 2 bars (wifi, not cell signal).
Issue #2 - I cannot for the life of me get a new IP address from DHCP on either network! My IP address on eth0 is stuck at 10.x.x.x but my home IP scheme is 192.168.0.x
My phone is set on DHCP, not static so I have no clue why it's binding to that address.
I have tried terminal emulator to release and renew but it doesnt work and I just end up getting an error that says DHCP timed out. Im not sure how far Android commands differ from Debian but I have tried (without success),
ifconfig eth0 down & up
netcfg eth0 down & up
dhclient (not recognized)
Other than that my host file is clogged up with a bunch of crap that I'm guessing by the ROM dev for disabling ad's.
I have even reflashed the ROM but that didn't help.
Can anyone suggest other things I can try to get that IP to unbind? The eth0 settings have to be stored away on some conf file somewhere right? I just dont where to look.
Thanks way in advance!
I have had issues with wi-fi connectivity with Andromeda 3 as well. I have found that for me, either rebooting the phone or using the power button menu to switch to airplane mode for a minute or so and then turning airplane mode off again fixes it for me - until the next time. Otherwise, I am sorry that I do not have better suggestions.
I'm using an XT862 on Telstra 850MHz 3G here in sunny Oz and can't get the tethering to work.
I've tried it with and without root and I'm now on the leaked update and still no joy.
The data connection is fine and I can browse on the phone directly both before starting the hotspot and after. My laptop or iPad both connect and get DHCP addresses but can't get any data.
Has anyone else got this working?
It works fine here in Germany, at least for me. I'm using stock tethering.
I have no idea why it doesn't work for you. Does DNS and ping work?
What output do you have with "ping google.de"?
Dns works using the phone as the dns server, any external dns server fails. Ping and http traffic all fail. When I start the connection, the 3G connection drops and reconnects. Skype disconnects then reconnects on the phone.
It's got me stumped. The sim worked in my Sony xperia play before it was in this phone.
So I got you right, from your laptop, DNS works but no ping?
Is your phone rooted? If yes, open a shell (with Connectbot or so) and type "iptables -t nat --list". Do you see the line with MASQUERADE?
Thats right. Dns works IF I use the phone as dns server. Ping never works from the laptop. Yes the phone is rooted.
Listing the Nat tables, the three are all blank. Pre route, output and post route all have no rules.
my d3 on TPG (Optus network) tethers fine
were you able to tether with your xperia play? it could possibly be telstra blocking tethering
NaVVy said:
Thats right. Dns works IF I use the phone as dns server. Ping never works from the laptop. Yes the phone is rooted.
Listing the Nat tables, the three are all blank. Pre route, output and post route all have no rules.
Click to expand...
Click to collapse
I think this is at least one reason it doesnt work. Can you try this command (after establishing tethering):
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
Before the d3, I could tether on my xperia and before that on my atrix.
It seems like the d3 isn't loading the Nat/routing tables properly. I haven't seen any network traffic return from the phone to the laptop except for dns from the phone. Even dns from other servers doesn't get through.
rweb said:
I think this is at least one reason it doesnt work. Can you try this command (after establishing tethering):
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
Click to expand...
Click to collapse
This seems to have worked. Web browsing from my iPad works. I'll check more tomorrow from my laptop but I wonder why it wasn't loading the correct tables itself?
NaVVy said:
I'll check more tomorrow from my laptop but I wonder why it wasn't loading the correct tables itself?
Click to expand...
Click to collapse
I have no idea. Most likely some bug, but I don't know why you are running into it while I don't.
I wonder if the iptables line disappears when you stop tethering (mine does). I don't think it hurts if not. If yes you have to re-enter the iptables command after each tethering. You could write a little script and create a widget for it with the App "Script Manager". It's at least a workaround.
Workaround found. See below.
Being a newbie, I was not allowed to post to MiniCM thread, however I suppose it could be more relevant.
I have Sony Ericsson Xperia X8 with properly (with factory wipe etc) installed MiniCM7-2.2.1-shakira (Android 2.3.7) and 2.6.29.6-nAa-11 kernel. Overall very happy (especially comparing to 2.1 stock firmware from SONY), but...
Wifi tethering works perfectly, except... DNS.
Built-in server starts and listens on port 53. And resolves nothing (it simply causes timeouts). Using 8.8.8.8 or mobile operator's servers does not help: NAT seems to fail UDP passthrough. This also leads to DNS timeouts.
The other annoying (not fatal, but annoying) particularity is that hotspot switches off when on battery and when screen locks. Changing WiFi policy to always on does not help.
So thanks a lot to anybody who can help to solve this. Log harvested by logcat is attached.
No thirdparty software was used, only built-in Android features.
I don't now about the DNS issues but for WiFi hotspot bug there is no fix afaik, you'll have to bear with it. Perhaps connect phone to charger and set screen time out to some large value and then start tethering. Or perhaps try using USB tethering.
Sent from my E15i using Tapatalk 2
SpyderX said:
I don't now about the DNS issues but for WiFi hotspot bug there is no fix afaik, you'll have to bear with it. Perhaps connect phone to charger and set screen time out to some large value and then start tethering. Or perhaps try using USB tethering.
Sent from my E15i using Tapatalk 2
Click to expand...
Click to collapse
Thank you. In fact it is worth enough to connect to charger. It does not stop tethering with blank screen.
But DNS blows my mind... DNS server is user mode application, relatively simple... It looks like DNS server works behind the same NAT that throws out UDP.
I worked the problem by using a proxy server (proxoid or ProxUrDroid), but this solution sucks very much: is is too far from "push and use"...
Workaround found
DNS
The problem is in the way how built-in dnsmasq and NAT behave. NAT does not allow UDP traffic, and dnsmasq starts behind NAT. Then dnsmasq tries to contect upstream DNS servers using UDP and fails.
The solution is to prohibit dnsmasq from being DNS server and replace it with something more flexible.
Go to /system/bin with some root-enabled file manager.
Rename dnamasq to dnsmasq.real.
Create dnsmasq file with the same permissions and ownship as original dnsmasq (now dnsmasq.real) binary.
Edit it with text editor and write the following script to it:
Code:
#!/system/bin/sh
exec /system/bin/dnsmasq.real [email protected] --port=0
This dirty hack does nothing good itself except freeing port 53. Dnsmasq can has a config file with the same option passed in more elegant manner, but I found no way to make dnsmasq read it.
After throwing away dnsmasq's DNS, give a way to an awesome software piece — DNSLite (search Google Play, we are all very happy with XDA that does not allow outside links to me). It should run separately. And it has a killing feature: it can always contact upstream DNSs via TCP! So it saves the show.
BTW other way is to use proxies like ProxyDroid or ProxURDroid. I do not know when they get DNS info, but they also work. But this is definitely not so handy for clients attaching to the hotspot.
Power
Simply install Wake Lock - PowerManager from market, it works. Use the setting to turn screen and keyboard off, but leave CPU on: software access point relies on CPU being active.
Tethering while power is plugged is also a good idea: it does consume power. In this case nothing s needed to lock, the AP will keep on automatically.
Shutting down
Do not forget to shut down everything you started before (especially unlock power) to leave more charge in the battery.