Wpa_cli connection issues

wpa_cli issues

Metadata

NixOS version: nixos-22.05pre339888.81cef6b70fb

What I’ve tried

wpa_cli

Boot up the installer and run, in accordance with chapter 2
of the unstable manual
:

sudo systemctl start wpa_supplicant
wpa_cli

I see immediately that the network device is defaulting to p2p-wlo1.

Inside wpa_cli’s shell, where <SSID> and <PSK> are the network’s SSID and PSK respectively:

> add_network
0
> set_network 0 ssid <SSID>
OK
> set_network 0 psk <PSK>
OK
> set_network 0 key_mgmt WPA-PSK
OK
> enable_network 0
OK

ping google.com fails, and wpa_cli never gives any feedback.

wpa_cli -i wlo1

Boot up the installer and run, in accordance with chapter 2
of the unstable manual
:

sudo systemctl start wpa_supplicant
wpa_cli

Inside wpa_cli’s shell, where <SSID> and <PSK> are the network’s SSID and PSK respectively:

> add_network
0
> set_network 0 ssid <SSID>
OK
> set_network 0 psk <PSK>
OK
> set_network 0 key_mgmt WPA-PSK
OK
> enable_network 0
OK

At this point, wpa_cli gave me feedback; it did the scan/connect thing I expected, but in the end, the subcommad status said COMPLETED and not CONNECTED.

ping google.com fails.

Try wpa_cli -i <interface_name>.

Sometimes it picks up this virtual “p2p” interface instead of the actual one. I never figured out why it happens.

Hmm. After I tried wpa_supplicant -i wlo1, it seemed successful, but the status subcommand said the wpa_status was COMPLETED, not CONNECTED, and therefor I can’t ping google.

Oh sorry, I missed part of your post.

I’m not sure then. If you connected succesfully you should have something like this in the wpa_supplicant log:

wpa_supplicant[1012]: Successfully initialized wpa_supplicant
wpa_supplicant[1012]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
wpa_supplicant[1012]: wlan0: SME: Trying to authenticate with <network_address> (SSID='<network_name>' freq=5220 MHz)
wpa_supplicant[1012]: wlan0: Associated with <network_address>
wpa_supplicant[1012]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0

Or if the key or some other setting is wrong:

wpa_supplicant[3962]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=6 ssid="<network_name>" auth_failures=1 duration=10 reason=CONN_FAILED
wpa_supplicant[3962]: wlan0: CTRL-EVENT-SSID-REENABLED id=6 ssid="<network_name>"
wpa_supplicant[3962]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=6 ssid="<network_name>" auth_failures=1 duration=10 reason=CONN_FAILED
wpa_supplicant[3962]: wlan0: CTRL-EVENT-SSID-REENABLED id=6 ssid="<network_name>"

All I had to do was reboot my computer :blush:.