Linux 上 Wifi 网与 NetworkManager 结合使用

Linux 上 Wifi 网与 NetworkManager 结合使用

我需要有关 Linux 机器上的 wifi 网格的帮助。

根据iw phy ph0 info我的设备上可以实现的 AP 和网格点的组合:

        valid interface combinations:
                 * #{ managed } <= 2, #{ AP, mesh point, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
                   total <= 3, #channels <= 2
                 * #{ AP } <= 2, #{ mesh point } <= 1, #{ P2P-device } <= 1,
                   total <= 2, #channels <= 1, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

使用 iw 命令,我创建了第二个 wifi 接口:

# iw dev wlan0 interface add mesh0 type mesh addr 12:34:56:78:ab:cd
# iw dev
phy#0
        Interface mesh0
                ifindex 10
                wdev 0x3
                addr xx:xx:xx:xx:xx:xx
                type managed
                txpower 0.00 dBm
        Unnamed/non-netdev interface
                wdev 0x2
                addr xx:xx:xx:xx:xx:xx
                type P2P-device
                txpower 0.00 dBm
        Interface wlan0
                ifindex 9
                wdev 0x1
                addr xx:xx:xx:xx:xx:xx
                type managed
                txpower 0.00 dBm

然后,我使用 NetworkManager 创建 2 个连接,1 个 AP + 网格点:

# nmcli c add type wifi ifname mesh0 ssid testmesh 802-11-wireless.mode mesh 802-11-wireless.band bg 802-11-wireless.channel 1 connection.id testmesh ipv4.addresses 192.168.201.2/24 ipv4.method manual

# nmcli dev wifi hotspot ifname wlan0 ssid $(hostname) password "xxxxxxxxx"

现在,如果我尝试建立两个连接,则会出现以下错误:

# nmcli c u testmesh
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/15)
# nmcli c u Hotspot
Error: Connection activation failed: 802.1X supplicant took too long to authenticate

有人知道为什么会失败吗?有人尝试过使用 NetworkManager 创建网格点和网格接入点吗?

更新:

我使用调试选项启动了 wpa_supplicant 并看到一些错误:

...
nl80211: Beacon set failed: -16 (Device or resource busy)
Failed to set beacon parameters
...
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0)
...
Interface initialization failed
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
wlan0: Unable to setup interface.
Failed to initialize AP interface
...
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0)
...
nl80211: Failed to set interface 9 to mode 2: -16 (Device or resource busy)

有人能帮我吗?

相关内容