4

I am looking to build a smart device with no external controls (no buttons, display, etc.) and am trying to figure out how to most easily allow a user to supply Wifi configuration to it.

A specific device that comes to mind is the Chromecast; to configure this device, a user simply goes to a URL (something like chromecast.com/setup) and is able to configure the device from there. How is something like that implemented on a technical level? The site must redirect to a local I.P. or something, but that wouldn't make sense because there is no guarantee that the device has any specific I.P.

In short, I am looking for a description of how such a feature on something like the Chromecast is implemented.

2
  • 1
    Related: How can I easily configure Wi-Fi on a smart device without a screen?, though it doesn't explain specifically about the Chromecast.
    – Aurora0001
    Commented Aug 1, 2018 at 18:56
  • 1
    Right, maybe should have clarified that I have seen other questions on this, but I don't feel that things like WPS, NFC, or Bluetooth feel as seamless and easy as does the Chromecast-style setup. Maybe some other P2P connection is what I am looking for, like Wifi direct
    – cowdrool
    Commented Aug 1, 2018 at 19:01

1 Answer 1

2

It turns out that the Chromecast uses a fairly common method of getting Wi-Fi details—it acts as a Wi-Fi access point when turned on. The apps wrap the setup process up neatly, but essentially the process is this:

  • The Chromecast boots into access point mode if it doesn't have any Wi-Fi details stored.

  • The apps look for this access point—this is presumably why they insist on you installing an app (or using the feature built into Chrome), because a website cannot connect to other Wi-Fi networks, but a native app can usually do that.

  • Once the access point is found, the app will handle sending the connection details to the Chromecast.

  • The Chromecast will then switch off its access point and try to connect to the network.

This isn't an unusual method (and similar products might just have you directly connect to the network from your phone/computer, loading up a landing page). All that's different in this case is that the app handles the steps for you.

2
  • Ah, thank you. I was under the impression that this was not possible because it was done in-browser when I used it, but I didn't consider that it could be a Chrome-only feature.
    – cowdrool
    Commented Aug 1, 2018 at 19:12
  • @cowdrool Indeed, looks like it sneakily redirects you to an internal Chrome URI, chrome://cast/#setup. If you use any other browser it just doesn't offer you that option and only shows you the app links.
    – Aurora0001
    Commented Aug 1, 2018 at 19:15

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.