morrownr / 88x2bu-20210702

Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets - v5.13.1
Other
932 stars 172 forks source link

Using wrong 802.11 mode/frequency and bit rate. #67

Closed Deses closed 2 years ago

Deses commented 2 years ago

Hello, I have a generic Amazon 8812bu dongle and I'm having some issues.

I installed this driver without any issue. I selected Concurrent_Mode during install because I want to have both a 5Ghz and a 2.4Ghz AP.

I'm using Mint 20.3 and I used the GUI to set my two wireless AP as following:

image image

But as far as I see, the access points are working in 802.11n mode only, not ac. And the bit-rate is way too low, 144.4 Mbps is far from the advertised numbers (5GHz (867Mbps) / 2.4GHz (300Mbps)). I verified this by connecting to the networks with my phone and seeing that the AP is "WiFi 4", not 5.

Rebooting or doing $ sudo systemctl restart NetworkManager doesn't make a difference.

This is the output from iwconfig:

$ iwconfig
wlx1ebfcee632b8  IEEE 802.11bgn  ESSID:"Home"  Nickname:"WIFI@RTL88X2BU"
          Mode:Master  Frequency:2.412 GHz  Access Point: 1E:BF:CE:E6:32:B8
          Bit Rate:144.4 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlx1cbfcee632b8  IEEE 802.11bgn  ESSID:"Home_5G"  Nickname:"WIFI@RTL88X2BU"
          Mode:Master  Frequency:2.412 GHz  Access Point: 1C:BF:CE:E6:32:B8
          Bit Rate:144.4 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

See? both AP are using IEEE 802.11bgn, Frequency:2.412 GHz and Bit Rate:144.4 Mb/s. 🤔

$ sudo uname -a; mokutil --sb-state; lsusb; rfkill list all; dkms status; iw dev
Linux RDMServer 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
SecureBoot disabled
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0bda:b812 Realtek Semiconductor Corp. USB3.0 802.11ac 1200M Adapter
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 1b1c:0c04 Corsair Link Cooling Node
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
rtl88x2bu, 5.13.1, 5.4.0-122-generic, x86_64: installed
phy#0
        Interface wlx1ebfcee632b8
                ifindex 4
                wdev 0x2
                addr 1e:bf:ce:e6:32:b8
                ssid Home
                type AP
                channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
                txpower 16.00 dBm
        Interface wlx1cbfcee632b8
                ifindex 3
                wdev 0x1
                addr 1c:bf:ce:e6:32:b8
                ssid Home_5G
                type AP
                channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
                txpower 16.00 dBm
$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 4: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtl88x2bu, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
    |__ Port 11: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M

My dongle is connected to a USB3.0 port in the back on the computer, directly to the motherboard (An Asus MAXIMUS VI HERO).

I also tried to manually edit /etc/modprobe.d/88x2bu.conf to define my country code and the wireless mode, but this didn't fix the issue.

options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_switch_usb_mode=1 rtw_country_code=ES rtw_wireless_mode=95

My goal is to have a 2.4ghz and a 5ghz network to extend Wi-Fi coverage to my garage where I have some smartplugs that need 2.4ghz Wi-Fi but depending on the day they don't have a good enough connection. The 5ghz network would be used so phones and other mobile devices don't drop connection when they are brought to the garage.

The computer I'm using for this task is an old Intel i5 4670K based computer that I'm using as a "small" server and it's connected to the network using ethernet and it's getting a stable Gigabit connection from a nearby switch.

Deses commented 2 years ago

By the way, why does my USB dongle has 2 MAC addresses? I understand one is for 5Ghz and the other for 2.4Ghz. Which one should I use for each AP? I tried with both of them and I get the same results.

Deses commented 2 years ago

Some more data:

$ iw list
Wiphy phy0
        max # scan SSIDs: 9
        max scan IEs length: 2304 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP-128 (00-0f-ac:4)
                * CMAC (00-0f-ac:6)
                * GCMP-128 (00-0f-ac:8)
                * GCMP-256 (00-0f-ac:9)
                * CCMP-256 (00-0f-ac:10)
                * GMAC-128 (00-0f-ac:11)
                * GMAC-256 (00-0f-ac:12)
                * CMAC-256 (00-0f-ac:13)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * monitor
                 * P2P-client
                 * P2P-GO
        Band 1:
                Capabilities: 0x1963
                        RX LDPC
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        RX STBC 1-stream
                        Max AMSDU length: 7935 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 16 usec (0x07)
                HT Max RX data rate: 300 Mbps
                HT TX/RX MCS rate indexes supported: 0-15
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps
                        * 5.5 Mbps
                        * 11.0 Mbps
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (16.0 dBm)
                        * 2417 MHz [2] (16.0 dBm)
                        * 2422 MHz [3] (16.0 dBm)
                        * 2427 MHz [4] (16.0 dBm)
                        * 2432 MHz [5] (16.0 dBm)
                        * 2437 MHz [6] (16.0 dBm)
                        * 2442 MHz [7] (16.0 dBm)
                        * 2447 MHz [8] (16.0 dBm)
                        * 2452 MHz [9] (16.0 dBm)
                        * 2457 MHz [10] (16.0 dBm)
                        * 2462 MHz [11] (16.0 dBm)
                        * 2467 MHz [12] (16.0 dBm) (no IR)
                        * 2472 MHz [13] (16.0 dBm) (no IR)
                        * 2484 MHz [14] (disabled)
        Band 2:
                Capabilities: 0x863
                        RX LDPC
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 7935 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 16 usec (0x07)
                HT Max RX data rate: 300 Mbps
                HT TX/RX MCS rate indexes supported: 0-15
                VHT Capabilities (0x03d071b2):
                        Max MPDU length: 11454
                        Supported Channel Width: neither 160 nor 80+80
                        RX LDPC
                        short GI (80 MHz)
                        TX STBC
                        SU Beamformee
                        MU Beamformee
                        +HTC-VHT
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 867 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 867 Mbps
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 5180 MHz [36] (15.0 dBm)
                        * 5200 MHz [40] (15.0 dBm)
                        * 5220 MHz [44] (15.0 dBm)
                        * 5240 MHz [48] (15.0 dBm)
                        * 5260 MHz [52] (15.0 dBm) (radar detection)
                        * 5280 MHz [56] (15.0 dBm) (radar detection)
                        * 5300 MHz [60] (15.0 dBm) (radar detection)
                        * 5320 MHz [64] (15.0 dBm) (radar detection)
                        * 5500 MHz [100] (15.0 dBm) (radar detection)
                        * 5520 MHz [104] (15.0 dBm) (radar detection)
                        * 5540 MHz [108] (15.0 dBm) (radar detection)
                        * 5560 MHz [112] (15.0 dBm) (radar detection)
                        * 5580 MHz [116] (15.0 dBm) (radar detection)
                        * 5600 MHz [120] (15.0 dBm) (radar detection)
                        * 5620 MHz [124] (15.0 dBm) (radar detection)
                        * 5640 MHz [128] (15.0 dBm) (radar detection)
                        * 5660 MHz [132] (15.0 dBm) (radar detection)
                        * 5680 MHz [136] (15.0 dBm) (radar detection)
                        * 5700 MHz [140] (15.0 dBm) (radar detection)
                        * 5720 MHz [144] (disabled)
                        * 5745 MHz [149] (disabled)
                        * 5765 MHz [153] (disabled)
                        * 5785 MHz [157] (disabled)
                        * 5805 MHz [161] (disabled)
                        * 5825 MHz [165] (disabled)
                        * 5845 MHz [169] (disabled)
                        * 5865 MHz [173] (disabled)
                        * 5885 MHz [177] (disabled)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * set_bss
                 * join_ibss
                 * set_pmksa
                 * del_pmksa
                 * flush_pmksa
                 * remain_on_channel
                 * frame
                 * set_channel
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0xd0
                 * managed: 0x40 0xb0 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
        WoWLAN support:
                 * wake up on anything (device continues operating normally)
        software interface modes (can always be added):
                 * monitor
        valid interface combinations:
                 * #{ managed, P2P-client } <= 2, #{ AP, P2P-GO } <= 1,
                   total <= 2, #channels <= 1
        Device supports SAE with AUTHENTICATE command
        Device supports scan flush.
        Supported extended features:
                * [ RRM ]: RRM
morrownr commented 2 years ago

Hi @Deses

I need to slow you down just a minute. We all have to learn and ...

I'm using Mint 20.3 and I used the GUI to set my two wireless AP as following:

A single usb wifi adapter cannot support dual band because it only has one radio. Dual band Wifi routers/access points have two internal radios.

Deses commented 2 years ago

Ah, bummer. When I had a read at Concurrent Mode my understanding was that I could use both radios at the same time. :P

Well if that's the case, I'll disable concurrent mode and just live with the 2.4ghz network. Maybe I'll get a proper AP down the road. :)

Thank you for the help!