本文介紹WCNSS_qcom_cfg.ini中常用參數的作用。
wifi 日誌等級
- vosTraceEnableBAP=255
- vosTraceEnableTL=255
- vosTraceEnableWDI=255
- vosTraceEnableHDD=255
- vosTraceEnableSME=255
- vosTraceEnablePE=255
- vosTraceEnablePMC=255
- vosTraceEnableWDA=255
- vosTraceEnableSYS=255
- vosTraceEnableVOSS=255
- vosTraceEnableSAP=255
- vosTraceEnableHDDSAP=255
- wdiTraceEnableDAL=255
- wdiTraceEnableCTL=255
- wdiTraceEnableDAT=255
- wdiTraceEnablePAL=255
-
每一位代表一個等級是否打開,0xFF,表示所有的等級都打開。
-
00000001 FATAL
-
00000010 ERROR
-
00000100 WARN
-
00001000 INFO
-
00010000 INFO HIGH
-
00100000 INFO MED
-
01000000 INFO LOW
-
10000000 DEBUG
省電模式
-
gEnableImps=1
-
gEnableBmps=1
-
相關參數:
-
# Enable IMPS or not
-
gEnableImps=1
-
# Enable BMPS or not
-
gEnableBmps=1
-
gEnableImps:(Idle mode powersave)
-
打開wifi,未連接wifi的power save。
-
gEnableBmps:(Beacon mode powersave)
-
連接wifi的情況下的power save
-
使用工具測量電池電流大小。
Phy Mode (auto, b, g, n, etc)
- gDot11Mode=0
-
# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
-
gDot11Mode=0
-
支持何種協議,可取之範圍0-9
Roaming Parameters
-
gNeighborLookupThreshold=65
-
RoamRssiDiff=5
-
gRoamIntraBand=0
-
* gNeighborLookupThreshold
-
Roaming RSSI Threshold: ap的信號達到所設置的值,將會進行掃描周邊設備,尋找更好的AP
-
* RoamRssiDiff
-
Roaming RSSI Difference: AP將會進行roaming,當尋找到的ap的信號比連接的AP的信號更好,並且超過這個值
-
* gRoamIntraBand=1
-
# To enable, set gRoamIntraBand=1 (Roaming within band)
-
# To disable, set gRoamIntraBand=0 (Roaming across band)
-
enable across band roaming. 只會在同一個頻段內部進行roam,例如2.4G到2.4G內部,或者5G到5G。
-
如果沒有打開,那麼roam的時候,2.4G-5G直接的roam是不允許的。
-
但是可以斷開再重連。
802.11d支持
- g11dSupportEnabled=1
-
80_Y0476_2_WCN36X0_ANDROID_WLAN_REGULATORY_AND_COUNTRY_CODE.pdf
-
802.11d支持,根據路由器的國家碼進行選擇。
-
g11dSupportEnabled=1
-
Wifi 國家碼獲取途徑
-
1.DefaultCountryTablefield in WCNSS_qcom_wlan_nv.bin-read during driver initialization
-
nv中默認有設置國家碼
-
2.gStaCountryCodeparameter in WCNSS_qcom_cfg.ini –read during driver initialization to replace default country code in WCNSS_qcom_wlan_nv.bin
-
配置文件gStaCountryCodeparameter設置國家碼,用於覆蓋nv中的國家碼
-
3.Country IE from AP defined by 802.11d –information given by AP
-
使能802.11d功能,通過AP來獲取國家碼,g11dSupportEnabled用來打開這個功能。
-
4.“iw reg set” command –set from userspaceapplication over cfg80211 interface
-
用戶空間通過命令設置國家碼
-
5.Private IOCTL with “COUNTRY” command –set from userspaceapplication over wextinterface
-
用戶空間通過ioctl設置國家碼,例如wpa_cli -iwlan DRIVER COUNTRY US.
-
gCountryCodePriority設置國家碼獲取的優先級
-
1 –Country Code information from userspacecommands takes priority
-
userspacecommands > 802.11d > gStaCountryCodein WCNSS_qcom_cfg.ini > DefaultCountryTablein WCNSS_qcom_wlan_nv.bin
-
默認是0:
-
0 –Country Code information from 802.11d takes priority
-
802.11d > userspacecommands > gStaCountryCodein WCNSS_qcom_cfg.ini > DefaultCountryTablein WCNSS_qcom_wlan_nv.bin
-
通過AP獲取國家碼:
-
g11dSupportEnabled=1使能,然後如果周圍有多個AP,包含不同的國家碼,根據接收到的Beacon幀(被動掃描),進行投票,設置成票數最多的國家碼。
-
但是我查看的話,好多情況下,只是更具瞭解的AP來設置國家碼。
-
gEnableBypass11d=1,會進行主動掃描,獲取國家碼,這樣速率會快些。
-
通過SIM卡獲取國家碼是最可靠的途徑。
記錄一下與國家碼有關的網址,方便查找:
國家地區代碼:
https://zh.wikipedia.org/wiki/%E5%9C%8B%E5%AE%B6%E5%9C%B0%E5%8D%80%E4%BB%A3%E7%A2%BC
wifi信道列表
https://zh.wikipedia.org/wiki/WLAN%E4%BF%A1%E9%81%93%E5%88%97%E8%A1%A8
世界各個地區WIFI 2.4G及5G信道一覽表
http://www.sohu.com/a/143179782_202311
kernel中相關文檔:
net/wireless/db.txt
beacon loss
- gHeartbeat24=40
-
beacon包的統計,如果超過40(默認值)個沒有到,表示AP不在範圍內。會有相應的事件產生。
信道帶寬選擇
-
BandCapability=0
-
gOperatingChannelListEnabled
-
gOperatingChannelList
-
#Preferred band (both or 2.4 only or 5 only)
-
BandCapability=0
-
0: both
-
1: 5G
-
2: 2.4G
-
# Operating Channel List
-
# 打開信道選擇
-
gOperatingChannelListEnabled=1
-
不打開就表示所有信道都支持。打開就根據gOperatingChannelList的內容進行顯示。
-
# 所選擇的信道
-
gOperatingChannelList=6,7,8
-
所支持的信道。
WMM Enable/Disable
- WmmIsEnabled=0
-
WmmIsEnabled=0
-
Wifi Multi Media,wifi多媒體。
-
WMM is enabled:
-
1 – Enable, QoS only
-
2 – Enable, but not QoS
-
0 – Auto, join any AP
-
Wi-Fi網絡中的多媒體應用要求服務質量(QoS)功能。QoS能使Wi-Fi接入點區分業務優先級,
-
並優化共享網絡資源的方法。如果沒有QoS,在不同設備上運行的所有應用傳送數據幀的
-
機會相等,這對於網絡瀏覽器、文件傳送或E-mail這類應用的數據業務不成問題,但對於
-
多媒體應用則不適宜。Internet協議上話音(VoIP)、流視頻和交互式遊戲對時延增加和
-
吞吐量下降高度敏感,因此要求QoS。
-
Wi-Fi聯盟把Wi-Fi多媒體(WMM)定義爲即將實現的IEEE 802.11e標準的規範概要,並開始
-
實施WMM合格檢驗計劃,以滿足業界對Wi-Fi網絡QoS解決方案的需求。
cisco漫遊協議支持
- FastTransitionEnabled=1
# CCX Support and fast transition