morrownr / rtl8852bu

Linux Driver for USB WiFi Adapters that are based on the RTL8832BU and RTL8852BU Chipsets - v1.19.3 - 20230505
Other
97 stars 19 forks source link

NO-ir #17

Open kzajac83 opened 9 months ago

kzajac83 commented 9 months ago

Hello.

Have chip RTL8832BU.

Not sure this is issue but not don't know where ask the question :/
Command "iw reg get" give me:

root@debian:~# iw reg get
global
country PL: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0 (self-managed)
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (6, 20), (N/A), NO-80MHZ, NO-160MHZ
        (2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, NO-80MHZ, NO-160MHZ, PASSIVE-SCAN
        (5170 - 5330 @ 160), (6, 20), (N/A), PASSIVE-SCAN
        (5490 - 5730 @ 160), (6, 20), (N/A), PASSIVE-SCAN
        (5735 - 5895 @ 160), (6, 20), (N/A), PASSIVE-SCAN

but for 5 GHz all channels is set to NO-IR

iw list |grep Freq -A 30
 Frequencies:
                        * 5180 MHz [36] (20.0 dBm) (no IR)
                        * 5200 MHz [40] (20.0 dBm) (no IR)
                        * 5220 MHz [44] (20.0 dBm) (no IR)
                        * 5240 MHz [48] (20.0 dBm) (no IR)
                        * 5260 MHz [52] (20.0 dBm) (no IR)
                        * 5280 MHz [56] (20.0 dBm) (no IR)
                        * 5300 MHz [60] (20.0 dBm) (no IR)
                        * 5320 MHz [64] (20.0 dBm) (no IR)
                        * 5500 MHz [100] (20.0 dBm) (no IR)
                        * 5520 MHz [104] (20.0 dBm) (no IR)
                        * 5540 MHz [108] (20.0 dBm) (no IR)
                        * 5560 MHz [112] (20.0 dBm) (no IR)
                        * 5580 MHz [116] (20.0 dBm) (no IR)
                        * 5600 MHz [120] (20.0 dBm) (no IR)
                        * 5620 MHz [124] (20.0 dBm) (no IR)
                        * 5640 MHz [128] (20.0 dBm) (no IR)
                        * 5660 MHz [132] (20.0 dBm) (no IR)
                        * 5680 MHz [136] (20.0 dBm) (no IR)
                        * 5700 MHz [140] (20.0 dBm) (no IR)
                        * 5720 MHz [144] (20.0 dBm) (no IR)
                        * 5745 MHz [149] (20.0 dBm) (no IR)
                        * 5765 MHz [153] (20.0 dBm) (no IR)
                        * 5785 MHz [157] (20.0 dBm) (no IR)
                        * 5805 MHz [161] (20.0 dBm) (no IR)
                        * 5825 MHz [165] (20.0 dBm) (no IR)
                        * 5845 MHz [169] (20.0 dBm) (no IR)
                        * 5865 MHz [173] (20.0 dBm) (no IR)
                        * 5885 MHz [177] (20.0 dBm) (no IR)

and due to cannot start hostapd:

root@debian:~# hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
wlx909164729982: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 44 (primary) not allowed for AP mode, flags: 0x403873 NO-IR
wlx909164729982: IEEE 802.11 Configured channel (44) not found from the channel list of current mode (2) IEEE 802.11a

Probably due to below config

phy#0 (self-managed)
country 00: DFS-UNSET

cannot set AP. Above can by change by 8852bu module from country "00" to other?

morrownr commented 9 months ago

Hi @kzajac83

Run the following:

$ sudo sh edit-options.sh

That command will allow you to edit the correct 8852bu.conf file. The file contains a lot of docs regarding the module parameters that are available. You have to read the 8852bu.conf file. There is a module parameter called rtw_country_code. I would suggest adding rtw_country_code=PL to the options line.

With that said, I have not investigated this specific issue on this driver so I don't know if additional things would need to be done or if it will work at all. This is not the greatest driver but we are used to that from Realtek.

@morrownr