Automatic wifi hotspot startup if there is no target wifi

How to make it so that when you start dietpi it searches for a wifi network and if there is none, it starts hotspot?

We don’t have such functionality. Something you would need to develop yourself.

Maybe something like this would help?

I wonder if it would be a good script to implement into DietPi? Devs??

This one too

It is not about setting up the hotspot. Rather, it is about detecting a valid WiFi connection. And if there is no WiFi, create a temporary hotspot as an alternative.

ah…that would be two operations, one to be a script somewhere when the interface/wifi adapter is brought up, another if the detection fails to roll over to the script I showed before

Stumbled across this where someone did something like that

It’s a mess…

It will detect if wifi is up on known SSID’s, if not up, then it will run another script telling it to setup an ADHOC hotspot instead

Way beyond my paygrade unfortunately

I did find a few “Scripts” and others…but ultimately that linux-wifi-hotspot script in cli format would be the last thing run…if wifi detection of known SSID fails…the script would have to diasable known network managers first…then once it’s knocked those down, start down the path of detecting for known SSID, if fail start wifi-hotspot

Bucketloads of links I poked thru

Simple steps: Create wifi hotspot in ubuntu

1. Disable Wifi (Uncheck Enable Wi-Fi)
2. Go to network connection (Edit Connections...)
3. Click "Add"
4. Choose "Wi-Fi" and click "Create"
5. Type in Connection name like "wifi-hotspot"
6. Type in SSID as you wish
7. Choose Device MAC Address from the dropdown (wlan0)
8. Wifi Security select "WPA & WPA2 Personal" and set a *password*.
9. Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.
10. Then save and close.
11. Open Terminal (Ctrl+Alt+T) and type in the following command with your connection name used in step 5.

sudo gedit /etc/NetworkManager/system-connections/wifi-hotspot


12. Find `mode=infrastructure` and change it to `mode=ap`
13. Now check the network section where wi-fi will be connected to the created hotspot automatically. If you can not find it, go to *Connect to Hidden Network...* Find the connection and connect to it.

yeah…I’m all over the place…but the basics of the program to do what he wants “is” there…I just don’t know how to code…

What is Kupiki Hotspot

This project is the latest version of the tutorial created first on my blog Pi Home Server(now closed) Created on a Raspberry Pi 2, some functionalities and tools where not available for the Raspberry Pi 3. Also the tutorial was a little bit difficult to implement because of too many steps. That’s why i decided to create a script that will help you to build your own hotspot automatically.

Once the script is executed, you will get :

  • A Wifi hotspot using the integrated wifi chipset
  • A custom captive portal based on coovachilli
    • The portal is served by the high performance web server Nginx
    • The design of the portal can be easily modified for anyone who has knowledge in HTML and Javascript
    • Register feature available for users
      • Must be activated via the portal configuration file
      • Security on the backend to limit access to the register API
  • An authentication process based on freeRadius
    • User/password authentication
    • MAC address authentication (optionnal)
  • An interface for freeRadius management
    • daloRadius is installed by default, served by Nginx web server
    • A full management of the hotspot, with batch for user creation, vouchers, NAS, etc.

Hi WarHawk,

Did you succeed in finding a solution?

Negative…