Let's imagine I create this cool little Arduino-based (replace Arduino with any embedded system that's not a Raspberry Pi) object that does some interesting things but it needs an internet connection to retrieve some information. The object doesn't have an input interface for the user because it would be meaningless if not for the WiFi credentials insertion procedure. In my testing instance, I can just hardcode the credentials before flashing the firmware, but what if I wanted to make it a product and have every user set it up on his own network?

How was such a task handled in some commercial products with similar challenges? Or what would the best way of handling it be?

  • 1
    I have a security camera that gets wifi creds from an app. You enter the wifi info in the app, it generates a qr code, and you stick that in front of the camera, which scans it. Pretty clever.
    – GrandmasterB
    May 2, 2019 at 3:02
  • You could use WPS on boot, but then you would have to press the WPS button on your AP on every boot. Another option is to have some external media plugged into the device (e.g. USB flash drive) with the passcode stored on that.
    – Minijack
    May 2, 2019 at 3:21
  • @Minijack doesn't WPS only work after you select the network you want to connect to?
    – memememe
    May 2, 2019 at 3:27
  • @memememe Yes. The way I read your question, I thought you needed the password, not the SSID as well. you could try and connect to every WiFi network with WPS (not ideal, and may take a lot of time depending on number of networks around)
    – Minijack
    May 2, 2019 at 3:49

1 Answer 1


Most WiFi chips/modules these days worth paying for can function both as a WiFi client or as an AP.

So, what you would do is when the device is unconfigured, put your WiFi module into AP mode, and serve up a lightweight webpage hosted from your device. The owner connects to the devices WiFi network, and accessing the device through that webpage, they can setup their wifi information. Once configured, you switch the WiFi back to client mode, and connect to the provided Wi-Fi network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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