I am super new to coding and have been trying my hand at setting up a Magic Mirror with a Raspberry Pi 4B (purchased here). I've been doing pretty well but ran into a problem where my WiFi no longer connects after a reboot. I may not have been searching for the correct keywords, but eventually found a command from this post that I can run to successfully obtain a connection...BUT I'd really like to know why this works and what I can do to fix the problem overall.
This is the command that fixes things:
sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -d
and this is what my wpa_supplicant.conf file looks like:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="MY_NETWORK_SSID"
psk="MY_WIFI_PASSWORD"
}
I have edited/re-set the wpa_supplicant.conf file a few different ways from the command line based on posts I viewed to no avail. I've also re-set the WiFi from the raspi-config
menu but after rebooting its back to telling me "No Networks Found" from the desktop/GUI.
Please let me know if I am missing any information that could be helpful. I appreciate you taking the time to hopefully help me out :)