1

This should be a common situation. I have configured a Pi with Bookworm to work headless on my WiFi and now want to move it to a different location with another LAN. I have the SSID and password, but cannot access that network from here and cannot access my own LAN from there. So if I move the pi to the other location I will not be able to access it (unless I also bring a monitor and keyboard...). So I want to add the other network to the network list of the Pi, but with the new nmcli command it only seems to allow me to add networks it can find (and raspi-config returns "There was an error" because the nmcli command it runs returns "No network with SSID 'myNetID' found").

Is there a way to add a wifi network (SSID + unencrypted password) so it can connect to it later, as was possible before by editing wpa_supplicant.conf?

Bouke
  • 13
  • 1
  • 4

1 Answers1

1

You should be able to do this by editing /etc/NetworkManager/system-connections/xxxx.nmconnection (I won't pretend this is straightforward but it can be done - I would start by copying an existing entry or creating an additional entry to existing network).

I can see no reason "nmcli command it only seems to allow me to add networks it can find". You should be able to specify a network - depends what you ACTUALLY did.

It is certainly possible because if you preconfigure in raspi-imager it sets up the network.

Running /usr/lib/raspberrypi-sys-mods/imager_custom set_wlan 'SSID' 'PSK' 'AU' should setup WiFi (you may need to generate PSK from password and change country code) but I haven't confirmed this manually.

See How do I set up networking on Raspberry Pi OS - Bookworm

There is no NEED to use Network Manager - it is simple to enable dhcpcd and use wpa_supplicant.

Milliways
  • 62,573
  • 32
  • 113
  • 225