how do you handle multiple wifi connections on a Ubuntu Server os that’s running on a rpi4?

i’ve configured it to connect to my 2.4GHz network successfully on boot, but then i’ve added the 5GHz network to my netplan .yaml, ran the netplan apply, and then i go to switch to that network “wpa_cli -i wlan0 select_network 1”

but it just hangs there (i.e. doesn’t successfully connect), and then i’m forced to manually reboot my rpi4 in order to get it back onto the 2.4GHz network so i can SSH into it again

🤔

Reply to this note

Please Login to reply.

Discussion

#[1]​ oh my fucking god i finally figured it out, so simple in hindsight it fkn hurts 🤣😭

so Ubuntu Server uses netplan, so you can just go into the .yaml and add the SSID / password where the other working SSID / password already was

i knew that, so i was already doing that, BUT

my password is the same across my 2.4GHz and my 5GHz network, so i just copy and pasted the password hash thinking it was the same fuxking thing, BUT

wpa password hashing takes the SSID as a fkn input too, which i did not know, so the same password, but used on a different network name (i.e. different SSID), actually gives a completely different hash for the password

makes complete sense, should have fucking realised it earlier

and you can get the correct hash by just going into your shell and punching in:

wpa_passphrase “yourSSID” “yourPASSWORD”

🤦🏻‍♂️