qca wifi相關(guān)操作命令

  1. 創(chuàng)建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. 設(shè)置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支持的信道和當(dāng)前設(shè)置的信道

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. 設(shè)置信道
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.設(shè)置信道寬度與查看

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

7.查看當(dāng)前無線模式

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

7.設(shè)置無線模式

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

當(dāng)設(shè)置模式之后通過iwconfig查看是否改變,需要對(duì)接口進(jìn)行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.設(shè)置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
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 文章圖片上傳不正常,如需文檔,可聯(lián)系微信:1017429387 目錄 1 安裝... 4 1.1 配置探針... ...
    Mrhappy_a7eb閱讀 6,919評(píng)論 0 5
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,554評(píng)論 19 139
  • 這是一本講述中華民族性格缺陷的書。本書分為三部分,第一部分列舉了中國人的性格缺陷,如冷漠麻木,是非不分,不團(tuán)結(jié)...
    李世男閱讀 176評(píng)論 0 0

友情鏈接更多精彩內(nèi)容