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

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.

  • 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 Aug 1 '18 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 Aug 1 '18 at 19:15

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.