無法使用 iwconfig 與 Atheros TL-WN821N (AR7010) 控制連線位元率

無法使用 iwconfig 與 Atheros TL-WN821N (AR7010) 控制連線位元率

由於頻繁出現不穩定問題,我正在嘗試降低Atheros TP-Link TL-WN821N v3 USB WiFi 適配器上的連接比特率(報告的連接速度降至1Mb/s,並且我必須以物理方式重新連接適配器才能重新獲得連接) )。我知道這是該設備的一個常見問題,並且我已經嘗試了所有我能想到的方法來修復它,包括使用 linux-backports 的驅動程式;編譯並安裝自訂韌體(遵循https://wiki.debian.org/ath9k_htc#fw-free)和(作為最後的手段)使用 ndiswrapper。

使用ndiswrapper時,wifi適配器穩定,以54Mb/s的g模式運作(而使用預設的ath9k_htc模組時,適配器以n模式連接,比特率不斷波動)。不幸的是,透過這種設置,我必須只使用一個核心來運行我的處理器,因為將 SMP 與 ndiswrapper 一起使用會導致我的系統出現核心錯誤。

因此,我想使用 ath9k_htc 模組將位元率鎖定為 54Mb/s(或更低,如果需要)以確保連接穩定性。

我嘗試過“sudo iwconfig wlan0 速率 54M”;該命令運行時沒有錯誤,但是當我使用“sudo iwlist wlan0 bitrate”檢查比特率時,該命令返回:

wlan0 unknown bit-rate information. 
          Current Bit Rate:78 Mb/s

有任何想法嗎?以下是有關我的設定的一些資訊(希望相關):

使用網路管理器的 Xubuntu (12.04.3) 64 位元(核心 3.2.0-55.85-generic)。我的路由器來自 Virgin Media,VMDG480。

lshw -C network :

  *-network               
       description: Wireless interface 
       physical id: 1 
       bus info: usb@1:4 
       logical name: wlan0 
       serial: 74:ea:3a:8f:16:b6 
       capabilities: ethernet physical wireless 
       configuration: broadcast=yes driver=ath9k_htc driverversion=3.2.0-55 firmware=1.3 ip=192.168.0.9 link=yes multicast=yes wireless=IEEE 802.11bgn
lsusb -v:

Bus 001 Device 003: ID 0cf3:7015 Atheros Communications, Inc. TP-Link TL-WN821N v3 802.11n [Atheros AR7010+AR9287] 
Device Descriptor: 
  bLength                18 
  bDescriptorType         1 
  bcdUSB               2.00 
  bDeviceClass          255 Vendor Specific Class 
  bDeviceSubClass       255 Vendor Specific Subclass 
  bDeviceProtocol       255 Vendor Specific Protocol 
  bMaxPacketSize0        64 
  idVendor           0x0cf3 Atheros Communications, Inc. 
  idProduct          0x7015 TP-Link TL-WN821N v3 802.11n [Atheros AR7010+AR9287] 
  bcdDevice            2.02 
  iManufacturer          16 ATHEROS 
  iProduct               32 UB95 
  iSerial                48 12345 
  bNumConfigurations      1 
  Configuration Descriptor: 
    bLength                 9 
    bDescriptorType         2 
    wTotalLength           60 
    bNumInterfaces          1 
    bConfigurationValue     1 
    iConfiguration          0 
    bmAttributes         0x80 
      (Bus Powered) 
    MaxPower              500mA 
    Interface Descriptor: 
      bLength                 9 
      bDescriptorType         4 
      bInterfaceNumber        0 
      bAlternateSetting       0 
      bNumEndpoints           6 
      bInterfaceClass       255 Vendor Specific Class 
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor: 
        bLength                 7 
        bDescriptorType         5 
        bEndpointAddress     0x01  EP 1 OUT 
        bmAttributes            2 
          Transfer Type            Bulk 
          Synch Type               None 
          Usage Type               Data 
        wMaxPacketSize     0x0200  1x 512 bytes 
        bInterval               0 
      Endpoint Descriptor: 
        bLength                 7 
        bDescriptorType         5 
        bEndpointAddress     0x82  EP 2 IN 
        bmAttributes            2 
          Transfer Type            Bulk 
          Synch Type               None 
          Usage Type               Data 
        wMaxPacketSize     0x0200  1x 512 bytes 
        bInterval               0 
      Endpoint Descriptor: 
        bLength                 7 
        bDescriptorType         5 
        bEndpointAddress     0x83  EP 3 IN 
        bmAttributes            3 
          Transfer Type            Interrupt 
          Synch Type               None 
          Usage Type               Data 
        wMaxPacketSize     0x0040  1x 64 bytes 
        bInterval               1 
      Endpoint Descriptor: 
        bLength                 7 
        bDescriptorType         5 
        bEndpointAddress     0x04  EP 4 OUT 
        bmAttributes            3 
          Transfer Type            Interrupt 
          Synch Type               None 
          Usage Type               Data 
        wMaxPacketSize     0x0040  1x 64 bytes 
        bInterval               1 
      Endpoint Descriptor: 
        bLength                 7 
        bDescriptorType         5 
        bEndpointAddress     0x05  EP 5 OUT 
        bmAttributes            2 
          Transfer Type            Bulk 
          Synch Type               None 
          Usage Type               Data 
        wMaxPacketSize     0x0200  1x 512 bytes 
        bInterval               0 
      Endpoint Descriptor: 
        bLength                 7 
        bDescriptorType         5 
        bEndpointAddress     0x06  EP 6 OUT 
        bmAttributes            2 
          Transfer Type            Bulk 
          Synch Type               None 
          Usage Type               Data 
        wMaxPacketSize     0x0200  1x 512 bytes 
        bInterval               0 
Device Qualifier (for other device speed): 
  bLength                10 
  bDescriptorType         6 
  bcdUSB               2.00 
  bDeviceClass          255 Vendor Specific Class 
  bDeviceSubClass       255 Vendor Specific Subclass 
  bDeviceProtocol       255 Vendor Specific Protocol 
  bMaxPacketSize0        64 
  bNumConfigurations      1 
Device Status:     0x0000 
  (Bus Powered)
iwlist wlan0 scanning:

wlan0     Scan completed : 
          Cell 01 - Address: C4:3D:C7:3A:1F:5D 
                    Channel:1 
                    Frequency:2.412 GHz (Channel 1) 
                    Quality=37/70  Signal level=-73 dBm  
                    Encryption key:on 
                    ESSID:"my essid" 
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 
                              24 Mb/s; 36 Mb/s; 54 Mb/s 
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s 
                    Mode:Master 
                    Extra:tsf=00000070cca77186 
                    Extra: Last beacon: 5588ms ago 
                    IE: Unknown: 0007756E69636F726E 
                    IE: Unknown: 010882848B962430486C 
                    IE: Unknown: 030101 
                    IE: Unknown: 2A0100 
                    IE: Unknown: 2F0100 
                    IE: IEEE 802.11i/WPA2 Version 1 
                        Group Cipher : TKIP 
                        Pairwise Ciphers (2) : CCMP TKIP 
                        Authentication Suites (1) : PSK 
                    IE: Unknown: 32040C121860 
                    IE: Unknown: 2D1AFC181BFFFF000000000000000000000000000000000000000000 
                    IE: Unknown: 3D1601080400000000000000000000000000000000000000 
                    IE: Unknown: DD7E0050F204104A0001101044000102103B00010310470010F99C335D7BAC57FB00137DFA79600220102100074E657467656172102300074E6574676561721024000631323334353610420007303030303030311054000800060050F20400011011000743473331303144100800022008103C0001011049000600372A000120 
                    IE: Unknown: DD090010180203F02C0000 
                    IE: WPA Version 1 
                        Group Cipher : TKIP 
                        Pairwise Ciphers (2) : CCMP TKIP 
                        Authentication Suites (1) : PSK 
                    IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
iwconfig:

lo        no wireless extensions. 

wlan0     IEEE 802.11bgn  ESSID:"my essid"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: C4:3D:C7:3A:1F:5D   
          Bit Rate=78 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off 
          Power Management:off 
          Link Quality=36/70  Signal level=-74 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0,

答案1

我沒有這個硬件,所以無法測試,但是,看來速率是由韌體決定的。已經有補丁韌體了這裡這應該適用於核心 3.2.0-55.85-generic,或許也適用於更高版本的核心。

引用貝菲尼蒂夫

您可以在 patch/AR9271/firmware/htc_9271.fw 下找到使用 MCS3(26mbit/s)作為注入速率的預編譯韌體。將此檔案複製到 /lib/firmware 並重新插入卡片以使用修改後的韌體。如果您想以不同的注入速率編譯韌體,您可以查看我提供的補丁。最簡單的方法是用所需注入速率的副本來取代清單中的第一行。為 Linux 編譯韌體的說明在韌體倉庫。

安裝韌體後,只需重新插入 USB 轉接器即可使用。

資料來源:

https://befintiv.wordpress.com/2015/02/22/finding-the-right-wifi-dongle-and-patching-its-kernel-driver-and-firmware/

https://github.com/qca/open-ath9k-htc-firmware/blob/master/README

編輯:作為@pandalion98指出在這則評論可以找到正在討論的補丁這裡。

答案2

使用 iw 代替:

iw wlan0 set bitrates legacy-2.4 9

在建立連線之前

相關內容