You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wifi: add NetworkManager support and various tweaks
Added support for NetworkManager and predictable network interface device names.
NetworkManager is default on RaspiOS 12 and also on Armbian. Armbian doesn't disable the predictable ifnames, so the changes here will help adding support for configuring WiFi on it.
Changes included:
- interface name is not hardcoded to 'wlan0', but taken from `/sys/net/devices`.
Most of the functions had to be modified and an extra parameter for ifname was added.
- config/remove wifi functions have been added for each management version (wpasupplicant/nm)
- tweaked the interface in a few places (colors, title, phrasing)
- the NetworkManager configuration methods will create a connection named 'RetroPie-WiFi'.
This helps identifying the connection during removal, since I didn't find a way to add some info/metadata to
a connection in order to mark the one we're configuring with our script.
- the country code is now read with `raspi-config` instead of querying the `wpa_supplicant.conf`, since it might not exist when NetworkManager is active.
Only tested WPA and Open networks, since I lack any WEP capable AP/device.
if dialog --defaultno --yesno "You don't currently have your WiFi country set in /etc/wpa_supplicant/wpa_supplicant.conf\n\nOn a Raspberry Pi 3B+/4B/400 your WiFI will be disabled until the country is set. You can do this via raspi-config which is available from the RetroPie menu in Emulation Station. Once in raspi-config you can set your country via menu 5 (Localisation Options)\n\nDo you want me to launch raspi-config for you now ?" 22 76 2>&1>/dev/tty;then
250
+
local country
251
+
country="$(raspi-config nonint get_wifi_country)"
252
+
if [[ -z"$country" ]];then
253
+
if dialog --defaultno --yesno "You don't currently have your WiFi country set.\n\nOn a Raspberry Pi 3B+ and later your WiFi will be disabled until the country is set. You can do this via raspi-config which is available from the RetroPie menu in Emulation Station. Once in raspi-config you can set your country via menu 5 (Localisation Options)\n\nDo you want me to launch raspi-config for you now ?" 22 76 2>&1>/dev/tty;then
0 commit comments