我全新安装了 Fedora 33(从 Fedora 32 升级),并决定迁移到现代 NetworkManager 的托管 wifi 设置。我已成功执行了一些预先要求的步骤,例如创建连接、添加 WPA-PSK 安全性等。但当我尝试打开 WiFi 热点时,它显示“连接激活失败”。
嗯,这是我的东西:
lspci:
02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
nmcli 控制台显示:
NAME UUID TYPE DEVICE
CAR HotSpot a00c1f40-956a-4a05-8188-29f8011729c1 wifi wlp2s0
Wired connection 1 3f0c71e5-1001-37ce-9db2-22dd1a43c36b ethernet eno1
virbr0 ea74cc68-fe37-4172-9b89-b9f95a03d367 bridge virbr0
CAR HotSpot 呈灰色。
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5901] device (wlp2s0): Activation: (wifi) connection 'CAR HotSpot' has security, and secrets exist. No new secrets needed.
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5902] Config: added 'ssid' value 'CAR'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'mode' value '2'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'frequency' value '2412'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'freq_list' value '2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'psk' value '<hidden>'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'proto' value 'RSN'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'pairwise' value 'CCMP'
Oct 31 16:08:24 car NetworkManager[1074]: <info> [1604153304.5903] Config: added 'group' value 'CCMP'
Oct 31 16:08:49 car NetworkManager[1074]: <warn> [1604153329.6344] device (wlp2s0): Activation: (wifi) Hotspot network creation took too long, failing activation
Oct 31 16:08:49 car NetworkManager[1074]: <info> [1604153329.6345] device (wlp2s0): state change: config -> failed (reason 'supplicant-timeout', sys-iface-state: 'managed')
Oct 31 16:08:49 car NetworkManager[1074]: <warn> [1604153329.6376] device (wlp2s0): Activation: failed for connection 'CAR HotSpot'
Oct 31 16:08:49 car NetworkManager[1074]: <info> [1604153329.6378] device (wlp2s0): supplicant interface state: scanning -> disconnected
Oct 31 16:08:49 car NetworkManager[1074]: <info> [1604153329.6385] device (wlp2s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6723] policy: auto-activating connection 'CAR HotSpot' (a00c1f40-956a-4a05-8188-29f8011729c1)
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6730] device (wlp2s0): Activation: starting connection 'CAR HotSpot' (a00c1f40-956a-4a05-8188-29f8011729c1)
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6732] device (wlp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6771] device (wlp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6775] device (wlp2s0): Activation: (wifi) access point 'CAR HotSpot' has security, but secrets are required.
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6775] device (wlp2s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6822] device (wlp2s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6832] device (wlp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6836] device (wlp2s0): Activation: (wifi) connection 'CAR HotSpot' has security, and secrets exist. No new secrets needed.
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6837] Config: added 'ssid' value 'CAR'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6837] Config: added 'mode' value '2'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'frequency' value '2412'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'freq_list' value '2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'psk' value '<hidden>'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'proto' value 'RSN'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'pairwise' value 'CCMP'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6838] Config: added 'group' value 'CCMP'
Oct 31 16:08:50 car NetworkManager[1074]: <info> [1604153330.6944] device (wlp2s0): supplicant interface state: disconnected -> scanning
/var/log/wpa_supplicant.log
wlp2s0: Driver does not support AP mode
wlp2s0: Reject scan trigger since one is already pending
好的,我这里有什么(iw 列表):
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device
那么,可能会出现什么问题呢?
答案1
根本原因是 wpa_supplicant 使用了不正确的驱动程序。这是摘录自/etc/sysconfig/wpa_supplicant:
前:
DRIVERS="-D wext"
后:
DRIVERS="-D nl80211"
/var/log/wpa_supplicant.log:
Successfully initialized wpa_supplicant
wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
wlp2s0: Could not read SSID from driver
Note: nl80211 driver interface is not designed to be used with ap_scan=2; this can result in connection failures
Using interface wlp2s0 with hwaddr d0:57:7b:85:46:5c and ssid "CAR"
wlp2s0: interface state UNINITIALIZED->ENABLED
wlp2s0: AP-ENABLED
wlp2s0: CTRL-EVENT-CONNECTED - Connection to d0:57:7b:85:46:5c completed [id=1 id_str=]
wlp2s0: CTRL-EVENT-SCAN-FAILED ret=-95 retry=1
wlp2s0: CTRL-EVENT-SCAN-FAILED ret=-95
wlp2s0: AP-STA-CONNECTED 9c:fc:e8:f3:51:4c
wlp2s0: AP-STA-DISCONNECTED 9c:fc:e8:f3:51:4c