博通开发调试命令
前言
本文主要介绍博通方案的常用的无线配置方法和以及开发调试过程中出现的一些常见问题及解决方案。
1、命令行基本语法
BCM基本命令行存在两种方式:wl 和 nvram
(1)、wl
Usage:
wl [-a|i <adapter>] [-h] [-d|u|x] <command> [arguments]
-h this message and command descriptions
-h [cmd] command description for cmd
-a, -i adapter name or number
-d output format signed integer
-u output format unsigned integer
-x output format hexdecimal
-i选项,用于指定具体的设备节点,如2.4G ssid1对应wl0, ssid2对应wl0.1,ssid3对应wl0.2,依此类推;
5G ssid1 则对应wl1,ssid2 对应wl1.1,依此类推
(2)、nvram
usage:
nvram [get name] [set name=value] [unset name] [show] [commit] [godefault] [save] [restore]
[set] : set name with value
[setflag] : set bit value
[unset] : remove nvram entry
[get] : get nvram value with name
[getflag] : get bit value
[show:dump:getall] : show all nvrams
[loadfile] : populate nvram value from files
[savefile] : save all nvram value to file
[commit] : save nvram [optional] to restart wlan when following restart
[restart] : restart wlan
1、bcm常见命令行
(1)查看软件版本信息
命令行:wl -i wl0 ver
说明:查看2.4G的版本信息
(2)查看无线硬件版本信息
命令行:wl –i wl0/wl1 revinfo
说明:命令行显示的无线硬件版本信息
(3)查看无线状态
命令行:wl status
说明:默认查询到的时2.4G主ssid的信息,如果需要查询指定ssid的信息,使用【-i】选项
wl -i wl0 status
SSID: “ChinaNet-zyh111”
Mode: Managed RSSI: 0 dBm SNR: 0 dB noise: -89 dBm Channel: 1l
BSSID: 00:23:22:22:11:55 Capability: ESS ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HE Capable:
Chanspec: 2.4GHz channel 3 40MHz (0x1803)
Primary channel: 1
HT Capabilities: 40MHz SGI20 SGI40
Supported HT MCS : 0-23 32
Supported VHT MCS:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11
Supported HE MCS:
20/40/80 MHz:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11
VHT MCS:表示802.11n mcs
HE MCS:表示802.11ax,也即支持wifi6
(4)查看无线驱动统计信息
命令行:wl –i wl0/wl1 counters
说明:命令行显示的无线驱动统计信息。
(5)无线驱动加载map文件信息
命令行:wl –i wl0/wl1 srdump
说明:命令行显示的加载到驱动里的map信息。
map文件储存无线校准相关参数,所以在调试中有时会需要调高或调低发射功率;产测涉及更新map文件。相当于mtk中的iwpriv ra0 e2p
(6)查询关联sta信息
命令行:wl -i wl0 assoclist
说明:查询指定接口下关联的sta列表
(7)查询指定sta详细信息
命令行:wl -i wl0 sta_info F8:87:F1:6C:E3:30
说明:查询已关联指定sta的相关信息
(8)查看AP当前发射功率
命令行:wl –i wl0/wl1 curpower