I'm writing a bash script that is intended to update a Raspberry Pi's wifi settings contained with /etc/wpa_supplicant/wpa_supplicant.conf
(running raspbian 9 stretch).
As per the official Raspberry Pi documentation, I am making use of the wpa_passphrase
command, in which I can input the ESSID and password of my desired network and then append it's output onto the end of the existing /etc/wpa_supplicant/wpa_supplicant.conf
file, before reloading the settings with wpa_cli -i wlan0 reconfigure
.
This is all fine and dandy and works great, but I noticed that it doesn't produce any key_mgmt
fields, unlike if you were to manually log into a network via the desktop GUI.
I'm just curious if there is any harm in not having that key_mgmt
field explicitly defined? What is its use case, if networks can be connected to without trouble without it (at least in my cases). I read through the sparse documentation for wpa
and wpa_supplicant
, and it didn't tell me much.
For reference, the networks that I noticed would work with or without this field would have the key_mgmt=WPA-PSK
if I logged in via the RPi's desktop GUI. All the networks I tested with had this in common.
Thanks in advance!