Connect to alternative wifi


#1

I’m running Musicbox straight from the card (not raspian) but I’m having to do everything via wifi, not LAN.

Is there a way of getting the Pi to connect to a different network without putting the SD card in my laptop and changing the ini file manually? I have two networks, one that runs my music that is offline (i.e. local network only), and one that connects to the internet, but that second network can change depending up on which internet connection I’m using (it’s a long explanation that I won’t go in to now).

I haven’t used Linux in a long time and was only ever a noob at it, but I’m wondering if there is something I can type in to say ‘don’t connect to that network, try this one’.

Cheers.


#2

I’m hesitant to reply because I’m not very strong with Linux, but you’ll probably want to edit the wpa_supplicant.conf file. May be have a few shell scripts that you can use to quickly activate (delete original, copy the configuration file you want to activate to wpa_supplicant.conf, restart wireless, etc.) the network you want to connect to. If you want to be clever about it, find a way to put that into the web client so you don’t have to fire up a terminal to do it.


#3

You could make some little shell scripts to run that you activate by wiring up some buttons or by typing on the keyboard. The simplest way would be to have the scripts just make particular changes to settings.ini and then rerun part of the startup script.