Device Setup

The setup process is a short but important phase in the life cycle of an IoT device. In most IoT products, specific information needs to be entered so that the device can connect to the customer’s network. Generally, this procedure needs to be performed only once. Nevertheless, it is one of the first major interactions the user has with the product, and the process needs to be simple yet robust. In the case of so-called headless applications in particular, where user interface elements on the device are limited, this process can prove challenging to design. This page gives an overview of different setup methods that can be used with IoT devices.

On-device setup

One of the easiest and most robust methods to set up network information on an IoT device is to rely on the user interface of the device itself. The figure to the right shows the WiFi setup process of the Nest thermostat. The device has a large color LCD that is used to display network information. Users can input the WiFi password using the the outer ring of the device. Of course, such a setup process is only possible for IoT products that already have a prominent user interface that includes a screen and buttons. This is not possible or desirable for all types of products. Small IoT sensor products might not include any user interface elements at all on the device. Additionally, limited input options can be frustrating for users, as it can be difficult and time consuming to input the required information into the device.

WPS setup

WPS, standing for WiFi Protected Setup, is a technology that aims to simplify the process of connecting wireless devices to a wireless network. The standard was introduced in 2006, and is currently supported by most wireless routers. The two most common WPS procedures by which a user can connect a device to their network are as follows:

  1. Pin method — The access point (the WiFi router) generates a PIN number must enter into the new device in order to establish a connection. Alternatively, the new device can specify a PIN number which must be entered into the access point.
  2. Push button method — A connection is established by pressing the WPS button simultaneously on both access point and the new device.

There are a couple of caveats to the WPS method. In 2011, a major security flaw was discovered in the WPS protocol, allowing an attacker to gain access to a WPS-enabled network through a brute force attack. Consequently, security experts have urged users to disable WPS on their WiFi routers. Secondly, WPS is not available on all networks, especially in the case of enterprise networks. Finally, the WPS button/PIN needs to be easily accessible for users, which is not always true.

Wired setup

A wired connection (e.g. USB) can be used to enter the required network setup information. After successful configuration, the cable can be removed and the device will continue to function. This method is predominantly used in Maker- and hobbyist IoT projects, where network information is either hard-coded into the device’s source code, or the information is read in from a local config file. Such a solution is simple to implement, but is not optimal with respect to user-friendliness and security. Still, in specific contexts, this may be a viable solution.

Setup via smartphone

Many consumer IoT devices rely handle device setup through a smartphone app. The use of smartphones makes sense as these devices have become a commodity in the past few years. Smartphones offer many communication interfaces that can be leveraged to set up IoT devices, such as WiFi, Bluetooth, NFC. Consequently, manufacturers use different mechanisms to handle the technical side of the setup process. The list below illustrates this with a number of real-world examples.

  • Google Chromecast — When a Chromecast is first turned on, it broadcasts an unprotected WiFi access point. The Chromecast configuration app automatically recognizes Chromecast’s network name, connects to it via WiFi, transmits the password, and disconnects again. The Chromecast then stops broadcasting the access point and connects to the same network. The smartphone app checks whether the Chromecast has successfully connected to the network and finalizes the device setup process.
  • Nest Protect — The Nest Protect uses Bluetooth communication to set up the device’s WiFi settings. On the back of each Protect, a unique QR code is printed. This QR code contains all authentication details for a Bluetooth connection. To set up the device, a user scans this QR code using the Nest app. The app will then connect to the Nest Protect via Bluetooth and transmit the WiFi credentials, after which the setup process is complete.
  • Electric Imp — The Electric Imp is a WiFi module in the form factor of an SD card, and is intended to be integrated in other commercial products. The module system uses a unique setup protocol called BlinkUp. The app takes the WiFi credentials from the phone, and uses it to flash the phone’s screen in a specific pattern. The Electric Imp module contains a light sensor, which it uses to receive the transmitted information.
  • TI Smart ConfigSmart Config is a setup protocol developed by Texas Instruments and implemented in their WiFi modules. A button on the IoT device needs to be pressed in order to set the WiFi module to listening mode. Then, a user can transmit the WiFi credentials to the device using the Smart Config app. The technology exploits the fact that WiFi encryption affects the length of data packets in a predictable manner. Thus, WiFi credentials are not encoded in the content of data packets, but in the length. When the IoT device is in setup mode, it cannot read the content of the encrypted messages sent from the SmartPhone, but it can detect the length of data packets, thus allowing credentials to be transferred.

In summary, there are many ways to implement the device setup process using smartphones. Still, the challenge for companies remains that a custom app needs to be developed and maintained, and that multiple platforms (e.g. Android and iOS) need to be supported.

Setup over WiFi access point

Some devices use a built-in web interface to handle WiFi configuration. Simply put: if the device cannot connect to a WiFi network, it will start a local access point. When users connect to the access point, they are presented with web page allowing them to enter the correct configuration details. This solution is easy to implement and technically robust. However, the process can be difficult for novice users (e.g. connected to wrong network, entered wrong web address, …). The WiFiManager library for ESP8266 offers a simple way to implement this type of behavior.