SRG Posted November 4, 2013 Posted November 4, 2013 Hi. I'd like to switch between different wifi hotspots depending where I am. I think the DIP switches are the easiest method. How do I get started there? I believe I just need to get a copy of a specific config file for each hotspot. Then depending on which DIP switch combo I have, put the appropriate config file in place. I have the concept but don't have the details yet. Any guidance is greatly appreciated. Thanks in advance. SRG Quote
-=Dante=- Posted November 4, 2013 Posted November 4, 2013 (edited) I think the file you are going to want to change will be /etc/config/wireless. Something like this. cp -f /sd/wifi-profile-1 /etc/config/wireless You may have to bring the interface down and back up for it to associate. Make sure to keep the beginning of that file intact though or it will break wlan0. Edited November 4, 2013 by -=Dante=- Quote
Lord_humungus Posted November 9, 2013 Posted November 9, 2013 Please post your results as they may help other person. Good luck. Quote
jjd Posted November 9, 2013 Posted November 9, 2013 (edited) cp -f /sd/starbucks /etc/config/wireless; wifi adding the wifi command will bring your interfaces down then up and keep things working unlike "ifconfig wlan0 down" "ifconfig wlan0 up" so you could connect in the web ui then use execute command to run cp /etc/config/wireless /sd/[name of network] and just set the name accordingly in both commands also keep in mind this will change all settings having to do with wireless so if you use "free wifi" for your pineapples ssid name when you set a config it will be part of the file. Edited November 9, 2013 by jjd Quote
Mit0s1s Posted November 10, 2013 Posted November 10, 2013 i had to add "uci commit wireless" to get the network to come up. so i ended up with cp /sd/wirelessFileName /etc/config/wireless; uci commit wireless; wifi and this works fine for me. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.