ImaginaryTango
New Member
I've asked about this in multiple forums and get partial answers, but not full ones. I've seen some posts here about nmcli, but even after reading the docs, I still have questions I can't find the answers to.
My goal is to be able to set up multiple wifi connections in one shot - ultimately, I'd like to just use a batch file to do the work.
I'm using a Pi Zero 2W as a prototype and I'll be doing this same thing with some more of them for my use (and a few friends and people I work with will likely find them useful, too). I'm using Debian Trixie, Raspberry Pi OS, and OctoPrint for testing this out and they are all using Network Manager.
I'm having trouble finding clear information on multiple factors of adding new wifi connections. Every tutorial (including this one, on this forum) specifies to connect to the wifi network THEN to add the connection to Network Manager. If you look at the post I linked to as an example, it has the same steps as other tutorials (I think it's just copied and pasted around). The first step is connecting to the wifi network, then the 2nd step is to add the connection. Note the first step includes providing the wifi password. I've tried adding a wifi connection and never get it working. First, when I used the keyword "password" and a value to add, it doesn't work. (I also tried using "psk" instead. No help there.)
So I can't create a connection with nmcli unless I'm currently connected to the wifi. In my case, that would mean the firs time I take this Pi Zero someplace to use it, I have to have access to a keyboard and monitor to set up the connection. I see directions to add an ethernet connection, but that doesn't require an SSID and password/psk. I also tried to create one file and use it as a model for the other connections by copying the file and changing the connection information and the filename, but Network Manager didn't read it as a new connection. (I listed connections in nmcli and it didn't show up.)
I'll number my questions to make it it easier, in case people can provide answers to at least one question:
1) How do I create a new wifi connection if I don't have access to that wifi network at the time I'm setting things up?
2) How do I specify the password or psk while adding a wifi connection (again, when I don't have access to that network at the time of setup)?
3) Is the UUID created automatically by Network Manager when I create a new connection?
4) How is the password/psk encrypted in the file? I have seen some nmconnection files with this in plaintext in the file, and some where it's encrypted.
5) When I tried to make a new connection by copying and edting an nmconnection file, it didn't show up. Why? Do I have to do something to say, "Here's a new nmconnection file - read it!" or something similar?
My goal is to be able to set up multiple wifi connections in one shot - ultimately, I'd like to just use a batch file to do the work.
I'm using a Pi Zero 2W as a prototype and I'll be doing this same thing with some more of them for my use (and a few friends and people I work with will likely find them useful, too). I'm using Debian Trixie, Raspberry Pi OS, and OctoPrint for testing this out and they are all using Network Manager.
I'm having trouble finding clear information on multiple factors of adding new wifi connections. Every tutorial (including this one, on this forum) specifies to connect to the wifi network THEN to add the connection to Network Manager. If you look at the post I linked to as an example, it has the same steps as other tutorials (I think it's just copied and pasted around). The first step is connecting to the wifi network, then the 2nd step is to add the connection. Note the first step includes providing the wifi password. I've tried adding a wifi connection and never get it working. First, when I used the keyword "password" and a value to add, it doesn't work. (I also tried using "psk" instead. No help there.)
So I can't create a connection with nmcli unless I'm currently connected to the wifi. In my case, that would mean the firs time I take this Pi Zero someplace to use it, I have to have access to a keyboard and monitor to set up the connection. I see directions to add an ethernet connection, but that doesn't require an SSID and password/psk. I also tried to create one file and use it as a model for the other connections by copying the file and changing the connection information and the filename, but Network Manager didn't read it as a new connection. (I listed connections in nmcli and it didn't show up.)
I'll number my questions to make it it easier, in case people can provide answers to at least one question:
1) How do I create a new wifi connection if I don't have access to that wifi network at the time I'm setting things up?
2) How do I specify the password or psk while adding a wifi connection (again, when I don't have access to that network at the time of setup)?
3) Is the UUID created automatically by Network Manager when I create a new connection?
4) How is the password/psk encrypted in the file? I have seen some nmconnection files with this in plaintext in the file, and some where it's encrypted.
5) When I tried to make a new connection by copying and edting an nmconnection file, it didn't show up. Why? Do I have to do something to say, "Here's a new nmconnection file - read it!" or something similar?

