qca wifi相关操作命令

  1. 创建VAP
root@OpenWrt:~# wlanconfig ath0 create wlandev wifi0 wlanmode ap
[ 1044.840000] wlan_vap_create : enter. devhandle=0x867f0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[ 1044.850000] ieee80211_mbo_vattach:MBO Initialized 
[ 1044.850000] ieee80211_oce_vattach: OCE Initialized 
[ 1044.860000] wlan_vap_create : exit. devhandle=0x867f0380, vap=0x83948000, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[ 1044.870000] __ieee80211_smart_ant_init: Smart Antenna is not supported 
[ 1044.880000] VAP device ath0 created osifp: (838cdb80) os_if: (83948000)
ath0
  1. 设置SSID
root@OpenWrt:~# iwconfig ath0 essid "HELLO"
[ 1145.690000] [DEBUG] vap-0(ath0):set SIOC80211NWID, 5 characters
[ 1145.700000]  
[ 1145.700000]  DES SSID SET=HELLO 
  1. 查看VAP连接列表
root@OpenWrt:~# wlanconfig ath0 list
ADDR               AID CHAN TXRATE RXRATE RSSI MINRSSI MAXRSSI IDLE  TXSEQ  RXSEQ  CAPS        ACAPS     ERP    STATE MAXRATE(DOT11) HTCAPS ASSOCTIME    IEs   MODE                   PSMODE
11:2f:00:c7:ab:11    1    1   0M     24M   62      66      66   15      0   65535   ESs         0          f              0              AP 00:00:06     WME IEEE80211_MODE_11NG_HT20   0 

4.查看VAP支持的信道和当前设置的信道

root@OpenWrt:~# iwlist ath0 channel
ath0      47 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Current Frequency:2.412 GHz (Channel 1)
  1. 设置信道
root@OpenWrt:~# iwconfig ath0 channel 6
[ 1572.470000] siwfreq
[ 1572.470000] Set freq vap 0 stop send + 83948000
[ 1572.490000] Set freq vap 0 stop send -83948000
[ 1572.520000] Set wait done --83948000
[ 1572.600000] __ieee80211_smart_ant_init: Smart Antenna is not supported 

6.设置信道宽度与查看

root@OpenWrt:~# iwpriv ath0 chwidth 0
root@OpenWrt:~# iwpriv ath0 get_chwidth
ath0      get_chwidth:0
数字含义:
0 (HT)20 MHz
1 40 MHz
2 80 MHz
3 80_80/160 MHz
<3 Invalid

7.查看当前无线模式

root@OpenWrt:~# iwpriv ath0 get_mode
ath0      get_mode:AUTO

7.设置无线模式

root@OpenWrt:~# iwpriv ath0 mode 11NGHT40PLUS
root@OpenWrt:~# iwpriv ath0 get_mode
ath0      get_mode:11NGHT40PLUS

当设置模式之后通过iwconfig查看是否改变,需要对接口进行down up

root@OpenWrt:~# iwconfig ath0 
ath0      IEEE 802.11g  ESSID:"HELLO"  
          Mode:Master  Frequency:2.437 GHz  Access Point: 00:03:7F:55:88:88   
          Bit Rate:54 Mb/s   Tx-Power=11 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:2362  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# iwpriv ath0 mode 11NGHT40PLUS

root@OpenWrt:~# iwpriv ath0 get_mode
ath0      get_mode:11NGHT40PLUS
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# iwconfig ath0 
ath0      IEEE 802.11g  ESSID:"HELLO"  
          Mode:Master  Frequency:2.437 GHz  Access Point: 00:03:7F:55:88:88   
          Bit Rate:54 Mb/s   Tx-Power=11 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:2458  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@OpenWrt:~# ifconfig ath0 down
root@OpenWrt:~# ifconfig ath0 up
[ 3715.580000] 8021q: adding VLAN 0 to HW filter on device ath0
root@OpenWrt:~# ifconfig ath0 down[ 3717.910000] mlme_create_infra_bss : Overriding HT40 channel with HT20 channel
[ 3717.970000] __ieee80211_smart_ant_init: Smart Antenna is not supported 
root@OpenWrt:~# iwconfig ath0 
ath0      IEEE 802.11ng  ESSID:"HELLO"  
          Mode:Master  Frequency:2.437 GHz  Access Point: 00:03:7F:55:88:88   
          Bit Rate:144.4 Mb/s   Tx-Power=11 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:2464  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

8.设置tx power

root@OpenWrt:~# iwconfig ath0
ath0      IEEE 802.11ng  ESSID:"HELLO"  
          Mode:Master  Frequency:2.437 GHz  Access Point: 00:03:7F:55:88:88   
          Bit Rate:130 Mb/s   Tx-Power=11 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:573  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 文章图片上传不正常,如需文档,可联系微信:1017429387 目录 1 安装... 4 1.1 配置探针... ...
    Mrhappy_a7eb阅读 6,878评论 0 5
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,346评论 19 139
  • 这是一本讲述中华民族性格缺陷的书。本书分为三部分,第一部分列举了中国人的性格缺陷,如冷漠麻木,是非不分,不团结...
    李世男阅读 170评论 0 0

友情链接更多精彩内容