I'm looking for a solution for configuring wifi in headless mode, the same way as IoT devices : when not known wifi in range, toggle to AP mode with a predefined SSID, run a small web-server to list available network, and provide inputs to enter network Key.

I didn't find anything, so I'm eager to develop something to solve the problem.

So does someone know a premade solution ? If not, how should I proceed ? Write a script that modifies wicd/wpasupplicant config files ?

The google coder project does exactly this and I've used it successfully to enter wifi credentials and connect a headless Raspi to a wireless network.

  • copy the coder image to an SD card.

  • Connect to the headless Raspi via a web browser on another computer. The computer must be on the same network as the Raspi.

  • To access your Coder, allow time for it to boot, then visit http://coder.local on your computer.

  • The Raspi, booted with the coder image, starts a web server and after logging into the site a password can be entered to connect to any detected SSID on the next boot.

This might be interesting:


The app is not 100% stable. I still have some problems as described in issue #12.

  • Have to try, but it seems to do the job ! Since I ask the question, another project came to life : github.com/resin-io/resin-wifi-connect a module from resin.io framework – Tryum Mar 23 '16 at 14:48
  • many thanks for the link, this sounds really interesting. I will try to install it on my pi :-) – Martin Schneider Mar 24 '16 at 16:33
  • I have tested resin-wifi-connect. It requires to download a resin.io image and is not exactly what I was looking for. – Martin Schneider Mar 28 '16 at 21:54
  • It can't be used as a standalone tool ? what a shame :/ – Tryum Mar 29 '16 at 13:02
  • I could not use it as a standalone tool. I had to enter my wifi credentials on the resin.io website before downloading the image. Yesterday I found this repository on Github: github.com/jasbur/RaspiWiFi It might be an alternative. I haven't tested it yet. – Martin Schneider Mar 30 '16 at 19:37

The following shows 3 ways of setting up WiFi, http://www.raspberrypi.org/documentation/configuration/wireless/README.md

Te easiest is to set up using GUI, but if you follow the detailed instructions you can do via the command line. (I assume you propose to use Ethernet to setup.)

Your project is more ambitious. I suggest you get WiFi working first, then you can work on AP. I doubt you will find a ready made solution.

  • I know how to setup wifi in station/AP mode using the CLI. What I'm looking for is a solution in an IoT way for configuring wifi on site with only a smartphone. – Tryum Jan 21 '15 at 15:01

If you want to setup an IoT like network; it will be very painful (a loads of work has to do to make it automate).

For your question I want to share what I have done for automatic network connection. You will have to develop a mobile app (in my case it was android).

First, I gave each device a name and a psk. Then run an encryption on the name and get the generated SSID. Then configure this SSID through wpa_supplicant or hostapd.

base_64(encrypt(ssid + 'delimiter' + psk)) ==> your hostapd/wpa_supplicant ssid

In you android app get the scan list run decryption on the name (only your devices will succeed others will fail). extract SSID and psk. configure wpa_supplicant using the SSID and key.

network_info = split(decrypt(base_64(scan_list)), 'delimiter')
ssid = network_info[0]
psk = network_info[1]

hope this helps :)

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.