WIFI txpower, lower or higher? - LG Spirit Questions & Answers

I've always used iwconfig to configure my wlan0 interface on Android phones. But, even after managing to find a Lollipop working iwconfig, I was unable fo set wlan0 txpower with it.
Then, after browsing around a bit and learning of a file that resides in /data/misc/wifi, called "WCNSS_qcom_cfg.ini", it seems it's possible to tweak a lot of wifi parameters.
If you want your wifi to blast on highest, just uncomment the line:
# gTxPowerCap=30
... and there you have it. Otherwise, lower to 4 or 10.

So, we have # gTxPowerCap=30 change to # gTxPowerCap=4 or # gTxPowerCap=10, yes?

Uncommenting means to remove the hash before the command. Like this:
# gTxPowerCap=30
to this...
gTxPowerCap=10

Does this increase battery drain on wifi, since I am putting more energy to the transmitter?

Of course.
If you have a good WIFI connection at home, you could set it to 10, since that's the lowest it'll go. Should save battery.
Although, the default drivers are quite good at limiting power automatically.

Related

Direct Push registry settings?

I'm trying to see if there's some kind of registry setting that would allow Direct Push to use an available WiFi connection as opposed to forcing a GPRS connection. While searching for relevant keys, I came across these:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync]
"LastUIState"=dword:00000000
"KeepAlive"=dword:00000001
"MIMETruncation"=dword:0003E800
"MailBodyTruncation"=dword:FFFFFFFF
"DeviceID"="F0393738D4933383B0EF2423F0667416"
"SyncAPN"=""
"SendMailItemsImmediately"=dword:00000001
"PeakStartTime"=dword:000001E0
"PeakEndTime"=dword:00000438
"OutboundMailDelay"=dword:00000005
"MinHeartbeat"=dword:000001E0
"MaxHeartbeat"=dword:00000690
"HeartbeatIncrement"=dword:0000012C
"InitialHeartbeat"=dword:000001E0
"EnableNonLocalCrossPollination"=dword:00000000
"Device"="PPC"
"TcpPingRetryStepMs"=dword:000009C4
"TcpPingTcpRetries"=dword:00000005
"TcpPingDnsRetries"=dword:00000001
"Interval"=dword:00000000
"Retries"=dword:00000001
"Resilience"=dword:00000002
"NotifySyncDelay"=dword:00000000
"DisconnectWhenDone"=dword:00000001
"SyncWhenRoaming"=dword:00000000
"MailFileAttachments"=dword:00000000
"SaveSentItems"=dword:00000001
"BodyTruncation"=dword:00001400
"CalendarAgeFilter"=dword:00000004
"EmailAgeFilter"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync\Partners]
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync\Partners\{0DFDB9E1-74E0-5744-15C0-1CD660E700DF}]
"RetryCount"=dword:00000000
"RetryInterval"=dword:00000000
"LastSyncSuccess"=hex:80,73,DE,05,78,74,C6,01
"LastSyncAttempt"=hex:80,73,DE,05,78,74,C6,01
"LastSyncResult"=dword:00000000
"ErrorSeverity"=dword:00000000
"LastPingResult"=dword:06000701
"ServerNameChanged"=dword:00000000
"URI"=""
"EnrollForCertOnNextCradle"=dword:00000000
"DeviceSMSAddress"=""
"DeviceAddressingMethod"=dword:00000000
"CarrierConnector"=""
"Server"="mobile.exchange.mail2web.com"
"ClientRenegotiated"=dword:00000000
"EmailAddress"=""
"IsSecureIdServer"=dword:00000000
"TasksFolderId"="1b5349336f74fd48be3b785536ff9688-1d7f0ab"
"ContactsFolderId"="1b5349336f74fd48be3b785536ff9688-1d7f0a7"
"CalendarFolderId"="1b5349336f74fd48be3b785536ff9688-1d7f0a6"
"AutdSupportLevel"=dword:00000003
"PartnerIndex"=dword:00000001
"ClientProtocolVersion"="2.5"
"ClientNegotiated"=dword:00000001
"TempAirsyncVersion"="2.5"
"CommandsSupported"="Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,
FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,ResolveRecipients,ValidateCert,Provision,Search,Notify,Ping"
"MSAS-ProtocolVersions"="1.0,2.0,2.1,2.5"
"ClientAuthCertRequired"=dword:00000000
"Logging"=dword:00000000
"ConflictResolution"=dword:00000001
"Domain"="ad2"
"User"= <Exchange User Name Here>
"SavePassword"=dword:00000001
"UseSSL"=dword:00000001
"StoreType"=dword:00000003
"Engine"="{22C7DA12-F3FD-4875-8344-7786454F6534}"
"Name"="Exchange Server"
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync\Partners\{0DFDB9E1-74E0-5744-15C0-1CD660E700DF}\{783AE4F6-4C12-4423-8270-66361260D4F1}]
"Enabled"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync\Partners\{0DFDB9E1-74E0-5744-15C0-1CD660E700DF}\{C6D47067-6E92-480E-B0FC-4BA82182FAC7}]
"Enabled"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync\Partners\{0DFDB9E1-74E0-5744-15C0-1CD660E700DF}\{4A5D9FE0-F139-4A63-A5A4-4F31CEEA02AD}]
"Enabled"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\ActiveSync\Partners\{0DFDB9E1-74E0-5744-15C0-1CD660E700DF}\{0DD8685C-E272-4FCB-9ECF-2EAD7EA2497B}]
"Enabled"=dword:00000001
Assuming Microsoft was kind enough to include a registry setting to allow this (maybe they did it during testing), what names and values do you guys think could hold relevance to what we're looking for?
I spotted some of these keys when digging around. When I first implemented direct push I found that it has transmitting some traffic every 8 mins (there was also a problem with our ISA server dropping the https connection after 2 mins but that is another story).
Any I have changed one of those settings and from 8 mins to about 28 and the traffic count has dropped. Although I did hear that the settings are automatically updated as the system is used.
I find I need to turn off direct push if I want to use wi-fi which is a pain .
I suspect the ISA server drops the connection every 2mins because that is the default timeout value on the web listener.
Change that to 30mins (18000ms) as per the KB article (can't be arsed looking up the number).
mobileadam said:
I find I need to turn off direct push if I want to use wi-fi which is a pain .
Click to expand...
Click to collapse
I wholeheartedly agree. To quote what I said in another thread:
This is not an issue of whether Direct Push should work over WiFi, this is an issue of not being able to use the device at all when WiFi is enabled while Direct Push is enabled.
If Direct Push wants to use a GPRS connection, fine, I don't mind. But I should be able to enable WiFi as well with no consequences, and Direct Push can still use the GPRS connection while the WiFi radio is on.
I have successfully tested this and it works. I was able to send my device an e-mail and have it notify me while WiFi is on, and when I browse the internet it uses the WiFi connection, not the GPRS one. But after a while of having both connections enabled, through some kind of bug or glitch the device will slow down till it eventually comes to a screeching halt.
There is no way that this is like this by design. If you can't enable WiFi with Direct Push enabled, then the system should force you to disable Direct Push before enabling WiFi or vice versa. But I believe it's a bug because even the WiFi icon has the ActiveSync animated connection graphic when both connections are enabled, which leads me to believe that Microsoft had anticipated a WiFi connection being active while Direct Push is doing its business over GPRS.

[Q] Radio low power mode timeout

It's my understanding that the radio will go into low power mode when the screen is off, unless some program is doing something over the network in the background.
I assume that when something happens in the background, the radio will wait for a period of inactivity before it goes into low power mode. Does anyone know how long this is?
I set up openvpn, and it kills my battery when I leave it connected. The default keepalive messages are sent every 10 seconds, but are adjustable. I have a home automation/security device that needs to be able to send data back to my phone for alerts, which is why I'd like to keep the VPN up all the time. I'm trying to figure out if I can increase the keepalive time enough to give the radio time to sleep, but not enough to allow my NAT session through TMO's proxy/NAT devices to timeout, which will break the VPN and require a reconnect.
Too bad IPV6 isn't widely supported yet, since it provides encryption at Layer-3, and would negate the need for NAT.
I haven't looked into IPv6 from the T-Mo side of things (are there even any v6 apps on the phone? anybody tried to access a v6 site yet?) but you can get a free v6 tunnel endpoint for your home from places like SixXS.
I'm fully IPV6 enabled inside my home network (including Android), running dual stack. And I have a 6to4 tunnel with tunnelbroker.net.
Apparently Android does not support IPV6 natively on the 3g/4g interface yet. Once that happens, it will be possible to get on the IPV6 beta with TMO. Right now, you need a Symbian or Maemo phone.

Wifi Client (WLAN Driver) Tuning - may solve connection problem

Hi Guys,
If you experience Wifi connection problem, you may want to try tuning the WLAN driver. In fact, I found that the default settings are inappropriate for a consistent and stable connection. So, I'd like to share how I got through the problem.
1. Root your phone. Download and install Root Explorer or ES File Explorer (Explorer).
2. Make sure you manage how to use the Explorer as a tool to modify files in the /system folder.
3. Using the Explorer, browse to /system/etc/firmware/wlan/qcom_cfg.ini
4. Make a backup if you wish. Most of the parameters inside need not be changed except the followings:
a. gTxPowerCap=30 (change to 60 increases the TX power)
b. gDot11Mode=auto (change to n to always connect as n, but if you sometimes want to use g, don't change this)
c. You may wish to play around with the other parameters as well
5. Now save the file.
6. Browse to /system/etc/firmware/wlan/hostapd_default.conf
7. Again make a backup copy.
8. This is a long file. So please hang on. Amendment of the following is recommended:
a. max_num_sta=2007 (change to 10 to only display 10 wireless AP)
b. channel=6 (change to 0 can solve most wifi connection problems)
c. You may wish to play around with the SSID options such as disabling SSID broadcast.
9. Cheers !
The changes to hostapd_default.conf will only affect using your phone as a wifi access point. But the first set of changes are worth looking at.
Thanks for this BookBu,
I've constantly been having dropouts on my wifi irrespective of ROM. I've used void, B160, even stock and still I constantly have dropouts. I only made the TX power change but I'll see how it goes.
It seems to be a problem that nly affects a few users, so if it continues to happen I will change my phone as I only just bought it as it may be a hardware problem. My router at home isn't the best either so hard to contribute to whats actually causing it.
Would doing this cause more power requirements for the battery? Just out of sheer logic. Would it be significant? I don't have wifi on all the time only when downloading so it's not that big a deal for me but I'm just curious
Yes,I think boosting up the transmission cap should make the hardware draw more power from the battery. However, the hardware will enter into idle state in which no power is wasted when not in use. From my experience, the idle time is about 50 to 60 % Just imagine that you must use a more powerful flash light if you wish to see far things in the dark.
Sent from my IDEOS X5

3G USB Solution; Verizon Dumbphones, Possible Other Devices

I don't post much (obviously, and keeping me from putting this in Dev forum or posting external links :| ) but I do work a lot on the sides and figured out how to get a Verizon non-smartphone to act as a 3g dongle for the Acer A500. This is a copy of my tutorial originally posted on TegraOwners.
First off my setup;
Acer Iconia A500; Running Thor v14.2 ROM (Possible to work on other ROMs/kernels that support 3g dongles)
Build.prop mod installed from -snipped because of limit, will edit when able-
Phone; LG EnV2 Verizon prepaid.
Solution should work for any tether enabled verizon phone, POSSIBLY Verizon Dongles, and other brands of phones besides LG.
This guide assumes you either have, or know how to flash Thor's rom, and other flashable zips. I will not provide ADB instructions, but if someone would like to send me instructables how; I will add them into this post.
From a 'fresh' or unmodified version of Thor's ROM (I used v14.2, follow the build.prop install instructions in the link above. (Link removed because of limitations on posting)
Then using root explorer (or equivalent root browser) remount /system rewritable and open the build.prop file in a text editor.
Comment out ro.carrier=wifi-only and uncomment the rest of the block. It should match the following when done;
#ro.carrier=wifi-only
picasso.3g=true
rild.libpath=/system/lib/libhuawei-ril.so
rild.libargs=-d /dev/ttyUSB2
ro.pad.features.modem=true
Save the file and check permissions; they should still be rw-r--r-- and reboot the tablet.
This enables the 3g menus, and using the previous build.prop, lets your A500 read as an A500 instead of an EPAD.
Note: You DO NOT need to set an APN, Verizon, being a CDMA network, does not use APNs. The 'login' information is in the phone itself. It just needs the commands to initiate a data connection.
Now is where it got tricky to figure out; If you open a terminal emulator as root (type su at the prompt) and type ppp-start.sh you will get a couple of lines with this error;
pppd: In file /system/etc/ppp/peers/3g: unrecognized option '/dev/ttyUSB2'
or similar.
In the terminal prompt, type dmesg | grep tty it will return several lines, I noticed I had a device on ttyUSB0 not ttyUSB2.
On study, some modems make several ports for control, monitoring, etc. mostly data connections are on ttyUSB2, which is my guess why it was default.
I figured out by editing the ppp config file that ttyUSB0 wouldn't error, but wouldn't start either. I looked back at the grep and noticed something else that matched and I had seen before in my studies; ttyAMC0
So using the same method as editing build.prop, edit /system/etc/ppp/peers/3g it should read as follows;
ttyACM0
921600
crtscts
defaultroute
modem
noauth
noipdefault
persist
updetach
usepeerdns
connect 'chat "" AT OK ATD#777 CONNECT'
Note the ttyUSB2 being changed to ttyACM0, apparently the data serial for the phone, and atd number being changed to #777, Verizon's 3g number. (Speculation that you could increase the 921600 for higher USB bus speed, but I've not tested this).
Save the file and confirm the permissions are; r-xr-xr-x
Open terminal emulator with root permissions and again try ppp-start.sh
This time after it says pppd, after about 5 or so seconds, it should list your IP and other information confirming the connection. You should see TX and RX packet info on the phone screen. If so, congrats you are now connected via 3g with the phone.
To turn off the connection, use the command ppp-stop.sh I suggest making a couple script manager widgets to 'shortcut' these.
Note; If the screen turns off, the phone will disconnect and you will have to unplug the phone, restart the ril daemon, plug the phone back in, and run ppp-start.sh again.
You can install the ril-daemon_restarter.apk to easily restart ril, or in terminal emulator; stop ril-daemon then start ril-daemon
(Had to remove link for limitation, google for now, will add in when I can. suspected credit goes to dmatusek76 on XDA.)
Things that I've tested;
Browser works despite saying 'no connection' at the start.
Market can browse apps, but not download them.
GMail seems to receive, but not send emails.
Netflix works.
Edit: OpenVPN works.
Google Maps/Navigation works (downgrade to stock, latest update FCs)
Best part; The Portable Wireless Hotspot option in Settings > Wireless & Networks > Tethering & Portable Hotspot menu works to create a 3g Wi-Fi hotspot.
All connections through the hotspot are NOT BLOCKED; i.e. using my android to connect to the tablet, I was able to browse apps, download them, send emails, etc.
My theory on the reason the tablet won't; Some apps (like Google Voice and AndroIRC), check for an internet connection BEFORE TRYING, and if it isn't 'available' it just gives you a warning and stops without actually TRYING. Other apps just try to access the internet without checking for a connection first (Like Netflix), and they work.
This theory is backed up by the Browser first checking for a connection (hence the 'no connection available' popup), but then loading as it continues to try anyway after the check.
Using the wireless hotspot, the phone sees it as a full connection, so nothing stops during the 'network check'.
I hope this information might be useful in getting other devices, phones, dongles, etc. working with this masterful tablet.
Please let me know if it works and if you use other equipment.
Credits;
Thor for his awesome rom that supports USB 3g in the first place
pimpmaneaton for the build.prop

[Magisk Module] WiFi 802.11w fix for stock.

Fixes wifi connection issue when 802.11w protected management frames is enabled in your access point. Replaces wpa_supplicant with new one from LineageOS and sets pmf=0 in /system/etc/wifi/wpa_supplicant.conf
Still a bit slow, after hitting connect it appears to fail, but connects after a minute or so. At least it works now.
You may need to set pmf=0 in /data/misc/wifi/wpa_supplicant.conf too, I'm not sure if it will automatically overwrite, but the change wouldn't stick until I modified the one in /system.
I'll try this one. Thank you!

Categories

Resources