mattg31
Posts: 79
Joined: Fri Jan 05, 2018 9:55 pm

Easiest way to switch between 'access point' and 'wifi'

Fri Aug 30, 2019 10:15 pm

I would like to setup my raspberry pi to broadcast it's own wifi signal so that it can serve a webpage where users can input their wifi SSID and password, then it will disconnect from broadcasting, and connect to this network that was provided by the user.

So I have figured out how to do this by following this turorial(https://learn.sparkfun.com/tutorials/se ... -point/all) and modifying the 5 or 6 files required to switch the raspi to an access point, then serve the webpage, then add these credentials to the config file, but my question is: What is the easiest way to switch back and forth between the two modes (broadcasting and consuming?)

My thought at this point is to just create a python program that when a button is pushed it just overwrites the files back to the stock configuration and vice versa when I want it to broadcast. Is this a decent strategy? Thanks for any input!

epoch1970
Posts: 5132
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Easiest way to switch between 'access point' and 'wifi'

Sat Aug 31, 2019 10:01 am

Perhaps you can build upon one of the recent initiatives for this type of feature.
I’ve seen a few threads, here is one, you might find other options if you search the forum.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

mattg31
Posts: 79
Joined: Fri Jan 05, 2018 9:55 pm

Re: Easiest way to switch between 'access point' and 'wifi'

Sat Aug 31, 2019 10:42 am

Great, thanks! This looks promising

Return to “Networking and servers”