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.

cowdrool
  • 143
  • 2

1 Answers1

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.

Aurora0001
  • 18,520
  • 13
  • 55
  • 169