Liste des Groupes | Revenir à cs raspberry-pi |
A power cut this a.m had my Pi zero W reconnecting to the wrong wifi.
Which forced me to delve into the depths of network manager as evinced
by nmcli. Network manager is the new way to manage networks, and like
systemd, its all changed for the sake of it
You probably can edit the files directly - mine were in
/etc/NetworkManager/system-connections, but it's safer to use nmcli tools
You can set a priority if you have more than one wifi SSID.
sudo nmcli c modify <connection name> connection.autoconnect-priority 1
You can also force it to use 5Ghz or 2.4Ghz or let it decide
sudo nmcli c modify <connection name> 802-11-wireless.band "bg"
or
sudo nmcli c modify <connection name> 802-11-wireless.band "a"
"bg" is 2.4GHz, "a" is 5GHz.
It may well be that bookworm has changed the implicit defaults in
network manager.
It is well worth dumping the connections with
sudo nmcli connection show <connection name>
To work out what the connection names are, use
sudo nmcli c show
I think - but am not sure - that you can set more stuff through the
command line than through the GUI interface to network manager
Les messages affichés proviennent d'usenet.