Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Multiple Wifi credentials
#11
Yes, I think could work. Just add the network={} blocks.

As long as you don't use moOde's Network Config and SAVE they will remain there.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#12
(07-22-2020, 06:30 PM)Tim Curtis Wrote: Yes, I think could work. Just add the network={} blocks.

As long as you don't use moOde's Network Config and SAVE they will remain there.

Great, I'll give that a go and report back.
Is this something that could be better and easier to implement as a plugin? 
The main network config menu could be left as it is, where entering new WiFi credentials overwrites the old ones, but the minority of us who do use multiple networks could install a plugin that can write additional networks to wpa_supplicant.conf?
Reply
#13
Manually editing wpa_supplicant.conf worked a treat. I actually had three SSIDs saved in it while testing it. For anyone who wants a workaround in the meantime for adding more than one SSID, here's how it's done from a SSH command prompt:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
copy the contents of wpa_supplicant.conf into a text file, either the full contents, or just the relevant section for the currently saved SSID credentials, which will look like this:
network={
ssid="wirelessnetwork1"
scan_ssid=1
psk=0f4964208xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx96aa58a0
}
exit nano, then log out of SSH. Through the config menu of the Moode interface, add your new network credentials, and reboot.
Log back in through SSH, and open wpa_supplicant.conf again. Paste the credentials of your previous saved network under the new one, so it will look like this:

network={
ssid="wirelessnetwork2"
scan_ssid=1
psk=0f4964208xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx96aa58a0
}

network={
ssid="wirelessnetwork1"
scan_ssid=1
psk=0f4964208xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx96aa58a0
}

exit nano, and it will ask if you want to save the changes you've made. Save them, and exit the SSH prompt. From now on, Moode should connect to either of these networks, until you overwrite wpa_supplicant.conf by adding a new network through the network config menu.
Reply
#14
@Mr Creosote

+1
Reply
#15
Just to see what happened, last night I tried disabling the hotspot that moode was connected to, and enabling the other one. It switched over to the other hotspot pretty much instantly, no need to reboot.
Now all I need is a browser for Android that can actually resolve the moode.local address.
Reply
#16
Added to the moOde 7 series TODO list
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
Hello,

Just to say that :
1. I had exactly the same need than Mr Creosote
2. The wpa_supplicant.conf manual modification worked perfectly (on 6.7.1 for now). I now have two registered wifi network, and moode is able to catch the second one when the first is turned off. It can catch any of them at startup.

Thank you very much Tim and Mr Creosote for the tip. I am interested that it can be in good place in the "todo list" in order the tip became integrated Smile
Reply
#18
It's been on the TODO list for a long while but not getting any priority relative to other things but maybe a developer will be interested in this and volunteer their time to implement it :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#19
(01-24-2021, 09:38 PM)Tim Curtis Wrote: It's been on the TODO list for a long while but not getting any priority relative to other things but maybe a developer will be interested in this and volunteer their time to implement it :-)

I read that Mister Tim, and can imagine what it is to hear a lot of needs and just not to have time to do all tasks.

I wish I could implement it myself. I have just written my first bash script (recent files menu) so I think I don't met requirements to help you ! If it's "just a script" I could try, but probably one's need to see the whole system environment and modify several programs, then I guess only a real developer will do it.
Reply
#20
If useful I wrote this function for an esp8266/wemos (used for clocks).
In my sketch I entered the credentials of my 4 hotspots and when it starts up the esp8266 loops until it finds one of the active wifi.
Reply


Forum Jump: