I have seen the tutorials for creating a stand alone network on raspberry pi like the one on The Raspberry Pi site and the nice tutorial in this previously asked question but what is not clear to me is if there is an easy way to turn that stand alone network off afterwards and use the WiFi as a client again. My goal with this is to create different modes for my raspberry pi so for example if it is connected to Ethernet it will start up the stand alone network but if not it uses the WiFi as a client to connect to the internet that way it always has internet but if it doesn't need the WiFi for internet it creates a WiFi network
1 Answers
You can switch off the access point, reconfigure the wifi interface and use it as client connection to the internet router. But you have to worry about what mode actually to use. There are two simple commands to switch between the modes without rebooting. How to set it up you can look at Swapping between wifi client and access point?. But this does not completely fit to your needs because the wired interface eth0 isn't configured yet.
You can also use both modes simultaneously by using an Access point as WiFi repeater, optional with bridge. But this also does not exactly fit your needs because the usage of the interface eth0 must be changed from a member of a brigde to an uplink.
If I know what's the best solution for you I will invest into it and update this answer.
- 42,961
- 20
- 87
- 207