无法在 ubuntu 22.04.1 上创建 5Ghz wifi 热点

无法在 ubuntu 22.04.1 上创建 5Ghz wifi 热点

我最近购买了一个基于 RT3572 芯片的 USB wifi 适配器,但我似乎无法创建 5Ghz 热点,当我在 ubuntu 22.04 中尝试时,这是 dmesg 的输出:

sudo dmesg 的输出

这是我的热点配置(wlx0013eff709bd 是 ubuntu 为 RT3572 适配器命名的):

热点配置

使用iw命令确实确认它可以使用 AP 模式

支持模式

另外这里是 5Ghz 频段支持的频率列表:

5ghz 支持的频率

如果有帮助的话,我的国家代码是 PK

PS 我还尝试将此适配器插入运行 raspAP 的 raspberry piOS,并尝试在那里创建一个 5Ghz 热点,这是 hostapd 日志文件的输出(此处,RT3572 是 wlan1):

Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Configuration file: /etc/hostapd/hostapd.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 36 (primary) not allowed for AP mode, flags: 0x3 NO-IR
wlan1: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: Unable to setup interface.
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0

答案1

我在 5Ghz WiFi 接入点中有一个接入点,运行 ubuntu 20.04 和 hostapd(Ubuntu 服务器版本 - 无 GUI)。

升级到 Ubuntu 22.04 后,接入点不再工作。阅读了很多页面后得出的结论是:存在监管变化(取决于国家/地区),需要其他 802.11 标准,而我的硬件不支持这些标准。

这在您提供的最后一条日志中可以清楚地看到:

Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 

答案验证:

安装 20.00 而不是 22.04,AP 将在 5Ghz 下工作

选项:

  • 伪造您所在国家/地区的代码,并尝试找到允许使用 5Ghz AP 的国家/地区
  • 获取其他硬件。
  • 升级至 2.4 Ghz

相关内容