Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6970

Networking and servers • Network Manager not working for any WIFI other than preconfigured

$
0
0
Hi all,

I'm having a new issue arise with a new Pi Zero 2 W I'm working with. I'm used to using Raspberry Pi Imager, setting up my username/password, and setting up wifi with SSH checked. I do this so I'm connected on initial boot without using wpa_supplicant.conf

After this, at boot, I ssh into the Pi with my laptop, and run a script:

Code:

#!/bin/bashecho connection name?read connection_nameecho ssid?read ssidecho password?read passwordsudo nmcli c add type wifi con-name $connection_name ifname wlan0 ssid $ssid sleep 1sudo nmcli c modify $connection_name wifi-sec.key-mgmt wpa-psk wifi-sec.psk $password
This has been working for me with a few previous Pi projects. After I establish a new connection, I modify the connection to change priority. I'm used to modifying my hotspot connection to have the highest priority so I can ssh quickly while I'm out with my laptop and a Pi.

But now, with this new Pi Zero 2 W, it doesn't want to budge. I've tried this ^ and I've also tried nmcli c up id $ssid, but no matter what I do, it doesn't want to budge from the preconfigured Wifi.

Any thoughts why this might be happening now considering I'm not doing anything differently?

Statistics: Posted by elpollopollopollo — Thu Jul 25, 2024 10:55 pm — Replies 4 — Views 102



Viewing all articles
Browse latest Browse all 6970

Trending Articles