In my (development) situation, I have 2 WLANs:
1. local with hidden SSID and no internet access.
2. not-hidden, with internet access.
I sometimes need to switch between them. Switch 1->2 is relatively easy, select the WIFI Icon and select the network.
However, switch 2->1 is troublesome, the hidden WLAN can not be found using the WIFI Icon. And worse, the wpa_supplicant.conf file has the hidden SSID disabled* for me, so even a reboot doesn't work unless I manually fix the config file.
Is there an easy solution to this? (Or should I write some script that restores the wpa_supplicant.conf and restarts the service?)
PS.* with disabled, I mean in my wpa_supplicant.config:
disabled=1
And with hidden, that I had to say:
scan_ssid=1
Other information in the wpa_supplicant file is the sensitive part with passwords and network names.
As I say in my comments, I was looking for a more 'user friendly' way of executing 'wpa_cli enable 0 && wpa_cli reconnect 0'.
the wpa_supplicant.conf file has the hidden SSID disabled for me
what do you mean? can you put your wpa_supplicant file content ?bash script
containing yourwpa_cli commands
and with passing argument at this script :$1
for example can be 'Local' or 'External' or another names as you want. Then in a terminal you can call for examplesudo bash myscript.sh "Local"
for switching to local network andsudo bash myscript.sh "External"
for switching to the other network.