I'm trying to connect to an already known network via console (to later put this into a script). The most promising command so far seemed to be this one:
nmcli con up "Weelaan" ifname wlp4s0 That at least turns my WLAN tray icon into a loading animation and it looks like it's trying to connect to the right network, but after a wile I get error notifications and this output:
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. Running that hinted command gives this output for the corresponding time:
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') Simply clicking the network tray icon and then the "connect" button on the network works, but I don't want to take over the mouse in that script. That would also make it dependant on screen resolution and would have many other undesirable side effects. So what is nmcli's issue and how do I resolve this? What does it even do differently from KDE's network menu?