When no WiFi network is configured to connect to, or the configured network is unavailable, the device will start AP mode (access point), and allows clients to connect directly to make the configuration.
- Search for available Wi-Fi networks.
- Connect to a network with SSID similar to coiaca-xxxxxxxx (where xxxxxxx is the deviceID of your device)
- Use configured password to connect. If device is new, you will find the password on the label sticked on the device. If you don´t know the current password, keep reading.
Once connected, a welcome page will show up. Click or tab on “Config” to enter configuration page.
Enter or edit the following parameters
- Device Name: is the SSID name that the device will show when acting as AP (Access Point)
- AP password: is the key to connect to the device when acting as AP to be configured. (It’s mandatory to set this parameter if device is new. Fill and remember, or save it in a safe place.)
- WiFi SSID: Is the name of the WiFi network the device will connect through.
- WiFi password: Is the password key of the WiFi access point.
Scroll down to the bottom of the page and click on “Apply” button to save the changes and reset the device.
From now on, the device is configured to use the specified WiFi connection (WiFi SSID and WiFi password) and will connect to servers specified on the same config page. Configure servers accordingly to your needs or leave the default parameters to allow the device to be configured remotely later.
Furthermore some devices have a configuration button, that if pressed on startup will make the device to request the default factory password to be used instead of the last configured one (in case of forgotness, for instance). Default password in usually printed on a label sticked on the product case.
- You turn your Coiaca device on for the first time: It turns into AP (access point) mode, and waits for you to connect. For the first connection the default factory password (printed on the label sticked on the device case) is requested. When you connect to the AP, your device will likely automatically pop up the configiration portal page. (a Captive Portal.) with a web interface to set up your local network, and also other configurations. When configuration is done, you must disconnect from AP. Then, the device detects that no one is connected, and continues with normal operation.
- WiFi configuration is changed (or device is moved to another location with a different network): When the device cannot connect to the configured WiFi, it falls back to AP mode, and waits for you to change the network configuration. When no configuration was made, then it keeps trying to connect with the already configured settings. The Thing will not switch off the AP while anyone is connected to it, so you must disconnect from the AP when finished with the configuration.
- You want to connect to the AP to configure, but have forgotten the configured AP WiFi password you set up previously: Disconnect your device from power source and/or remove the battery. Then, reconnect the device to the power source or reconnect the battery and repower the device holding the configuration button pressed. This will cause the device to start the AP mode and request the default factory password. (From this point operation follows as Case 1)
- You want to change the configuration before the device connects to the Internet: The device always starts up in AP mode and provides you a time frame to connect to it and make any modification to the configuration. You must use the password configured on Case 1 to connect. While anyone is connected to the AP (provided by the device) the AP will stay on until the connection is closed. So take your time for the changes, the Thing will wait for you while you are connected to it.
- You want to change the configuration at runtime: Coiaca devices keeps the config portal up and running even after the WiFi connection is finished. In this scenario you must enter username “admin” and the password (already configured) to enter the config portal. Note, that the password provided for the authentication is not hidden from devices connected to the same WiFi network. You might want to force rebooting the device to apply your changes and make them persistant.
WiFi managing mechanism is a custom implementation of IotWebConf