nmcli con up:“连接激活失败:找不到 Wi-Fi 网络”

nmcli con up:“连接激活失败:找不到 Wi-Fi 网络”

我正在尝试通过控制台连接到已知的网络(稍后将其放入脚本中)。迄今为止最有前途的命令似乎是这个:

nmcli con up "Weelaan" ifname wlp4s0

这至少将我的 WLAN 托盘图标变成加载动画,并且看起来它正在尝试连接到正确的网络,但过了一会儿我收到错误通知和以下输出:

Error: Connection activation failed: The Wi-Fi network could not be found
Hint: use 'journalctl -xe NM_CONNECTION=eef66f76-9566-4e3c-889c-9634960dd1b7 + NM_DEVICE=wlp4s0' to get more details.

运行该提示命令会在相应时间给出以下输出:

Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9017] device (wlp4s0): Activation: starting connection 'Weelaan' (eef66f76-9566-4e3c-889c-9634960dd1b7)
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9021] device (wlp4s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9049] device (wlp4s0): set-hw-addr: reset MAC address to 28:C6:3F:B1:EA:27 (preserve)
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9095] device (wlp4s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9100] device (wlp4s0): Activation: (wifi) access point 'Weelaan' has security, but secrets are required.
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9101] device (wlp4s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9122] device (wlp4s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9127] device (wlp4s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9129] device (wlp4s0): Activation: (wifi) connection 'Weelaan' has security, and secrets exist.  No new secrets needed.
Jul 26 10:21:24 manjaro NetworkManager[623]: <info>  [1627287684.9435] device (wlp4s0): supplicant interface state: disconnected -> scanning
Jul 26 10:21:49 manjaro NetworkManager[623]: <warn>  [1627287709.9959] device (wlp4s0): Activation: (wifi) association took too long, failing activation
Jul 26 10:21:49 manjaro NetworkManager[623]: <info>  [1627287709.9959] device (wlp4s0): state change: config -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Jul 26 10:21:49 manjaro NetworkManager[623]: <info>  [1627287709.9983] device (wlp4s0): set-hw-addr: set MAC address to 26:28:CC:D2:10:A4 (scanning)
Jul 26 10:21:50 manjaro NetworkManager[623]: <warn>  [1627287710.0022] device (wlp4s0): Activation: failed for connection 'Weelaan'
Jul 26 10:21:50 manjaro NetworkManager[623]: <info>  [1627287710.0024] device (wlp4s0): supplicant interface state: scanning -> disconnected
Jul 26 10:21:50 manjaro NetworkManager[623]: <info>  [1627287710.0043] device (wlp4s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')

只需单击网络托盘图标,然后单击网络上的“连接”按钮即可,但我不想接管该脚本中的鼠标。这也将使其依赖于屏幕分辨率,并会产生许多其他不良副作用。那么nmcli问题是什么?我该如何解决这个问题?它与 KDE 的网络菜单有什么不同?

答案1

显然,您需要nmcli device wifi rescan先执行,即使该网络已知并且已经出现在可见网络列表中。

相关内容