Configure Wi-Fi and update your device
After you claim your Azure Sphere device, configure it for Wi-Fi so that it can receive over-the-air (OTA) updates from the Azure Sphere Security Service and communicate with services such as an Azure IoT Hub.
Before you can configure Wi-Fi, you must:
Set up Wi-Fi on your Azure Sphere device
Follow these steps to configure Wi-Fi on your Azure Sphere device:
Connect your Azure Sphere board to your PC over USB.
Open an Azure Sphere Developer Command Prompt.
Register the device's MAC address if your network environment requires it. Use the following command to get the MAC address:
azsphere device wifi show-status
Add your Wi-Fi network to the device by using the azsphere device wifi add command as follows:
azsphere device wifi add --ssid <yourSSID> --key <yourNetworkKey>
Replace <yourSSID> with the name of your network and <yourNetworkKey> with your WPA/WPA2 key. Azure Sphere devices do not support WEP. Network SSIDs are case-sensitive. For example:
azsphere device wifi add --ssid My5GNetwork --key secretnetworkkey
To add an open network, omit the --key flag.
If your network SSID or key has embedded spaces, enclose the SSID or key in quotation marks. If the SSID or key includes a quotation mark, use a backslash to escape the quotation mark. Backslashes do not require escape if they are part of a value. For example:
azsphere device wifi add --ssid "New SSID" --key "key \"value\" with quotes"
It typically takes several seconds for networking to be ready on the board, but might take longer, depending on your network environment.
The Azure Sphere device checks for software updates each time it boots, when it initially connects to Wi-Fi, and at 24-hour intervals thereafter. If an Azure Sphere OS update is available, download and installation could take as much as 15 minutes and might cause the device to restart.
Use the azsphere device wifi show-status command to check the status of the connection. During update, the azsphere device wifi show-status command may temporarily show an unknown configuration state. The following example shows successful results for a secure WPA2 connection:
azsphere device wifi show-status SSID : NETGEAR21 Configuration state : enabled Connection state : connected Security state : psk Frequency : 2442 Mode : station Key management : WPA2-PSK WPA State : COMPLETED IP Address : 192.168.1.15 MAC Address : 52:cf:ff:3a:76:1b Command completed successfully in 00:00:01.3976308.
The azsphere device wifi command supports several additional options. Type azsphere device wifi for a complete list, or azsphere device wifi option --help for help on an individual option.
If you encounter Wi-Fi problems, first ensure that your Wi-Fi network uses 802.11b/g/n; Azure Sphere devices do not support 802.11a.
Update the device
When Wi-Fi networking initially becomes available, the device checks for over-the-air (OTA) updates for the Azure Sphere operating system (OS) and the current application (if one exists). If updates are available, download should complete within 15-20 minutes.
To check on update status, type the following command in an Azure Sphere Developer Command Prompt:
azsphere device show-ota-status
Azure Sphere OS update is a staged process over a period that may be less than 15 minutes but can be longer depending on the internet connectivity. Between stages, the board will appear functional while the next group of updates is downloaded, but during the update you should expect the board to be unresponsive for several minutes at a time.
- Subscribe to Azure Sphere notifications so that you receive the latest information about OS updates
Send feedback about: