• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root looking over wifi settings

D

Deleted User

Guest
Okay so i got bored and was tweaking. Basically im going for small packet throughput. No spell check haha. Been keeping an eye out for wireless N and tethering comments. No love. The rom guys may want to increase the auto txpower to 23dbm. However, this is roughly a 25% increase in wifi power usage. 18dbm would be fair id say i think the stock nexus 7 tablet was at 15dbm. some people mention about roughly a 3 meter increase - inference per 4dbm. i was using ZV6
#made some comments

Also if anyone has found more wifi files with beneficial info while digging in the file system please post there location. Android has a lot of scripts in oem roms that change settings.

Someone asked if you could increase wifi range, and yes you can. Stock WCNSS config has a txpower of 22dbm verified with iwconfig. The two stock WCNSS configs files are also configured for automatic txpower. i however wasn't able to get a actual readings of these feature working. (Maybe someone can?) At any rate, i disable auto txpower control (line 329 gEnableAutomaticTxPowerControl=0), enabled force txpower (line 120 gTxPowerCap=30).

Run Terminal
Su (enter)
Iwconfig (enter, Mental note)
Iwconfig --help (enter, Mental note)
Iwconfig wlan0 (enter)
Take note of Tx-power hopefully it says 23dbm. hahah! Adjusting the country code may help but i haven't tried yet. There are laws for radio.
You might notice that fragment thr= some 6000 i also changed this to default=2346. RTS thr/Fragment thr maybe useful for people in noisy environments like an apartment complex.

After adjusting the txpower line you will noticed that it is like +2 of what you set it at when reading with iwconfig; weird driver config file execution. moreover, most of the iwconfig commands don't work. This could be that the iwconfig bin wasn't built for the volt file structure (maybe someone wants to build it?)

Nevertheless, i have mine set at gTxPowerCap=6 which according to iwconfig is 8dbm. Im using this in a single story 800-ish sq ft home with the AP in the center. Verified throughput with speedtest.net and walking around. Power savings - haven't be able to test, but theoretically i'm forcing 1/26 of the max power usage vs stock.
sbrn0x.jpg




Running these currently in /proc/sys if i can remember right *testing*

Code:
/core/rmem_default 32768
/core/rmem_max 65536
/core/wmem_default 32768
/core/wmem_max 65536
/core/somaxconn 6
/core/netdev_max_backlog 512
/ipv4/tcp_rmem "4096 32768 65536"
/ipv4/tcp_wmem "4096 32768 65536"
/ipv4/tcp_low_latency 1
/ipv4/tcp_slow_start_after_idle 0
/ipv4/tcp_timestamps 1
/ipv4/tcp_tw_recycle 1
/ipv4/tcp_tw_reuse 1
/ipv4/tcp_window_scaling 1
# This file allows user to override the factory
/system/etc/wifi/WCNSS****.config - Shown below
Second Location
/system/etc/firmware/wlan/prima/WCNSS***.config
This file looks similar like a shortcut/simlink maybe loaded from module.
Code:
# defaults for the WLAN Driver


# Enable IMPS or not
gEnableImps=1

# Enable/Disable Idle Scan

gEnableIdleScan=0


# Increase sleep duration (seconds) during IMPS
# 0 implies no periodic wake up from IMPS. Periodic wakeup is
# unnecessary if Idle Scan is disabled.
gImpsModSleepTime=0


# Enable BMPS or not
gEnableBmps=1

# Enable suspend or not

# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter

gEnableSuspend=3


# Phy Mode (auto, b, g, n, etc)
# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
gDot11Mode=0


# CSR Roaming Enable(1) Disable(0)

gRoamingTime=0


# Assigned MAC Addresses - This will be used until NV items are in place

# Each byte of MAC address is represented in Hex format as XX

Intf0MacAddress=88C9D0AB7E5F
Intf1MacAddress=000AF58989FE
Intf2MacAddress=000AF58989FD

Intf3MacAddress=000AF58989FC


# UAPSD service interval for VO,VI, BE, BK traffic

InfraUapsdVoSrvIntv=0

InfraUapsdViSrvIntv=0

InfraUapsdBeSrvIntv=0

InfraUapsdBkSrvIntv=0


# Make 1x1 the default antenna configuration

gNumRxAnt=1


# Beacon filtering frequency (unit in beacon intervals)

gNthBeaconFilter=50


# Enable WAPI or not

# WAPIIsEnabled=0


# Flags to filter Mcast abd Bcast RX packets.

# Value 0: No filtering, 1: Filter all Multicast.

# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast

McastBcastFilter=0


#Flag to enable HostARPOffload feature or not

hostArpOffload=1

# Flag to enable Host IPv6 NS Offload feature or not
hostNSOffload=1

#SoftAP Related Parameters

# AP MAc addr

gAPMacAddr=88C9D0AB7E5F


# 802.11n Protection flag

gEnableApProt=1


#Enable OBSS protection

gEnableApOBSSProt=0


#Enable/Disable UAPSD for SoftAP

gEnableApUapsd=0


# Fixed Rate

gFixedRate=0


# Maximum Tx power

# gTxPowerCap=30
# maybe lower for power savings?


# Fragmentation Threshold

# gFragmentationThreshold=2346
#pimp edit most internet 1500?


# RTS threshold

RTSThreshold=2347
#pimp edit 1500 maybe?


# Intra-BSS forward

gDisableIntraBssFwd=0


# WMM Enable/Disable

WmmIsEnabled=0
#shouldnt this be enabled? for streaming?


# 802.11d support

g11dSupportEnabled=0

# CCX Support and fast transition
#shouldnt this be enabled? i hate when my phone changes to a low signal ap.
CcxEnabled=0
FastTransitionEnabled=1
ImplicitQosIsEnabled=1
gNeighborScanTimerPeriod=200

gNeighborLookupThreshold=78

gNeighborScanChannelMinTime=20
gNeighborScanChannelMaxTime=30

# Legacy (non-CCX, non-802.11r) Fast Roaming Support
FastRoamEnabled=1
gEnableFWRssiMonitoring=1
# To enable, set FastRoamEnabled=1, gEnableFWRssiMonitoring=1, FastTransitionEnabled=1
# To disable, set FastRoamEnabled=0, gEnableFWRssiMonitoring=0, FastTransitionEnabled=0

#Check if the AP to which we are roaming is better than current AP in terms of RSSI.
#Checking is disabled if set to Zero_Otherwise it will use this value as to how better
#the RSSI of the new/roamable AP should be for roaming
RoamRssiDiff=15
# okay i dont know the scaling on this but it needs to change no reason to switch ap unless it offers significant higher signal str. like low to high med to high aint worth it.

# SAP Country code

# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.

# Example

#   US Indoor, USI

#   Korea Outdoor, KRO

#   Japan without optional byte, JP

#   France without optional byte, FR

#gAPCntryCode=USI
#whats the use of this?


#Short Guard Interval Enable/disable

gShortGI20Mhz=1
#pimp edit to 0 most 2.4ghz networks dont support. less overhead. how often are you on 5ghz

gShortGI40Mhz=1


#Auto Shutdown  Value in seconds. A value of 0 means Auto shutoff is disabled

gAPAutoShutOff=0
#pimp edit, power savings?

# SAP auto channel selection configuration

# 0 = disable auto channel selection

# 1 = enable auto channel selection, channel provided by supplicant will be ignored

gApAutoChannelSelection=0


# Listen Energy Detect Mode Configuration

# Valid values 0-128

# 128 means disable Energy Detect feature

# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.

# 10-128 are reserved.

# The EDET threshold mapping is as follows in 3dB step:

# 0 = -60 dBm

# 1 = -63 dBm

# 2 = -66 dBm

# ...

# 7 = -81 dBm

# 8 = -84 dBm

# 9 = -87 dBm

# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:

#

#  Range Loss  (dB)  =  EDET threshold level (dBm) + 97 dBm.

#

gEnablePhyAgcListenMode=128
#pimp edit, 7 ever been to a friends apt or live in one? everyone has a dam ap on the same channel.


#Preferred channel to start BT AMP AP mode (0 means, any channel)

BtAmpPreferredChannel=0


#Preferred band (both or 2.4 only or 5 only)

BandCapability=1
#pimp edit, 1 is both i guess, however i dont know if this phone even supports 5ghz let alone i dont even like N for gaming. security to much overhead.


#Beacon Early Termination (1 = enable the BET feature, 0 = disable)

enableBeaconEarlyTermination=1

beaconEarlyTerminationWakeInterval=11
# pimp edit, maybe edit?


#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)

gEnableBtAmp=0
#pimp edit, maybe edit sounds good for bluetooth 3.0+ devices.


#SOFTAP Channel Range selection

gAPChannelSelectStartChannel=1

gAPChannelSelectEndChannel=11
#pimp edit, isnt there 14 channels?


#SOFTAP Channel Range selection Operating band

# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND

gAPChannelSelectOperatingBand=0


#Channel Bonding
gChannelBondingMode5GHz=1


#Enable Keep alive with non-zero period value

gStaKeepAlivePeriod = 30
#pimp edit, lower for battery? higher for Performance on screen off maybe?

#AP LINK MONITOR TIMEOUT is used for both SAP and GO mode.
#It is used to change the frequency of keep alive packets in the AP Link Monitor period which is by
#default 20s. Currently the keep alive packets are sent as an interval of 3s but after this change
#the keep alive packet frequency can be changed.

#gApLinkMonitorPeriod = 3
# pimp edit, every 3 seconds sounds like overhead.


#If set will start with active scan after driver load, otherwise will start with

#passive scan to find out the domain

gEnableBypass11d=1


#If set to 0, will not scan DFS channels

gEnableDFSChnlScan=1


gVhtChannelWidth=2
gEnableLogp=1


# Enable Automatic Tx Power control

gEnableAutomaticTxPowerControl=1
# pimp edit, overhead either use high range or low range.

# 0 for OLPC 1 for CLPC and SCPC
gEnableCloseLoop=1

#Data Inactivity Timeout when in powersave (in ms)
gDataInactivityTimeout=200
#pimp edit possible if powersave then why wait?

# VHT Tx/Rx MCS values
# Valid values are 0,1,2. If commented out, the default value is 0.
# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
gVhtRxMCS=2
gVhtTxMCS=2
# pimp edit whats this?

gEnableLpwrImgTransition=1

# Enable Tx beamforming
gTxBFEnable=0
#pimp edit probably not good for a mobile device but beam me up scotty.

# Enable Tx LDPC
#gTxLdpcEnable = 1 for HT mode, 2 for VHT mode,3 for both HT and VHT
gTxLdpcEnable=3
#pimp edit this sounds like overhead since ive read the decoder code is robust.

# Oxygen network (prop IE for IBSS)
gEnableOxygenNwk=0
#h20 or gaderade. lol whats this?

# Valid values are 2048,4096,8192 and so on
# Please don't use values other than the ones mentioned above
gMaxMediumTime=4096

# LGE_CHANGE_S, [WiFi][jaeoh.oh@lge.com], 2013-10-23, To improve running current consumption
# Set Listen Interval
gBmpsMinListenInterval=1
gBmpsMaxListenInterval=10
gBmpsModListenInterval=5
gPowerUsage=Mod
#pimp edit more tweaks and officl lg source wifi config settings

#DTIM Skip
gEnableModulatedDTIM=3
# LGE_CHANGE_E, [WiFi][jaeoh.oh@lge.com], 2013-10-23, To improve running current consumption

# LGE_CHANGE_S, [WiFi][cheolsook.lee@lge.com], 2013-10-25, P2p connection issue .
isP2pDeviceAddrAdministrated=1
# LGE_CHANGE_E, [WiFi][cheolsook.lee@lge.com], 2013-10-25, P2p connection issue .

gScanResultAgeCount=1

gApLinkMonitorPeriod=30

#enable/disable PNO scan support.(background)
gPNOScanSupport=0

gStaCountryCode=US

END

# Note: Configuration parser would not read anything past the END marker
 

Attachments

Last edited by a moderator:
Why would you want to disable wireless N? Did you use this on the stock system, or a custom rom?
 
Last edited:
Can wifi power be increased, to obtain further distance?
Yes it can! However on a mobile device its going to be difficult because of proprietary code i.e drivers; moreover your battery life will suffer. If you read some of the setting in this file it will let you adjust between short and long ranges. Look for # ive made comments. Personally i perfer short range. Strong signal, less interference, less pings from devies(unless you hide your ap, and less power usage. Moreover, best way to get great range is to get a legit router; preferably with open firmware. I'd even recommend using short range on a router and placing cheap wall outlet wifi repeters to maximize gains. In addition, ive noticed some devices have underdeveloped drive code for Ap selection! This can even make your device lose connection (drop out/packet loss) because it keeps switching Ap. Try using 2 ap with the same exact name, password,and settings; even the volt suffers from this and it will kill your battery like no ones business ! Hope i helped. also note some of these settings are experimental. Hell stock rom is almost impossible to tweak for 100% results because there are alot of scripts. For example , lg uses a foreign language that I don't understand, and if mpdecision activates it reverts so many settings its obnoxious. But i use it because it has the best core management.
 
Last edited by a moderator:
Back
Top Bottom