I have been anxious to get my hands on a Microsoft Azure Sphere MT3620 development kit and Santa didn’t disappoint! I have written down what I have learned including many revelations which were not immediately apparent.
What is Azure Sphere?
Azure Sphere is a secured microcontroller device targeting the Internet of Things (IoT) scenarios, i.e. connected devices, appliances, industrial machines… Microsoft will transform the IoT security landscape with Azure Sphere- both hardware and software were developed in tandem with security as the major focus. They took years and years of security knowledge from securing XBox hardware and the Azure cloud and made it available to everyone.
It runs a custom Linux kernel developed by Microsoft. Check out Ryan Fiarfax (Microsoft) talk about how Microsoft reduced the Linux kernel to fit in 4 MiB of RAM. Microsoft maintains the OS and is able to update all the devices in the field using over the air updates.
Communication between Azure and the device uses HTTPS and trusted certificates for authentication. Every device has a certificate on it and is known by Microsoft before that Azure Sphere ships to you.
The currently-available development kit uses Mediatek’s MT3620 chip. The board includes 802 b/g/n wi-fi and supports ISU, I2C, SPI, and UART. It includes a micro USB cable, which is used to both power and load prototype software onto the board (finished software is delivered over the air).
Seeed sells both the Azure Sphere development kit, as well as a Grove Starter Kit for Azure Sphere, which uses their Grove shield to provide: 1 UART, 2 I2C, 1 analog input, and 4 GPIO. Also included are six Grove modules:
- 1.12″ OLED Display
- Rotary Angle Sensor
- Light Sensor
- Blue LED Button
- Temperature and Humidity Sensor
The Azure Sphere solution does not target the Maker community
In practical terms, the Azure Sphere solution is not geared toward the Maker community and will not compete with other microcontroller boards such as Arduinos and Raspberry Pi.
The solution is geared toward manufacturers; a manufacturer would go to a distributor and buy a chip with Azure Sphere on it, or design a board with Azure Sphere chip included. For example, a thermostat company could design their board with all the necessary pins and terminals to support controlling AHUs, furnaces, air conditioners, and humidifiers. It enables the manufacturer to take advantage of this increased security and ability to keep the device up to date without having to reinvent the wheel.
Raspberry Pi and Arduino have been very approachable for the Maker community because of the easy to use kits, a plethora of tutorials, examples, and support from the community. Azure Sphere does not have tutorials on how to schedule your Christmas tree lights, or how to run a Plex server (and it shouldn’t!). Currently there are no commercially-available cases for the Azure Sphere development board because the board is made for developers to prototype their solutions before placing a proper order.
Microsoft has made it easy to integrate with other Azure services, i.e. IoT hub, eventing and messaging. However if you have already invested in other infrastructure, the data from the device does not need to be sent to Azure. The Azure Sphere must be connected to Azure Active Directory so it requires a ‘work or school’ account; in other words, a proper Azure Tenant. As an individual you can have an Azure Sphere using free Azure services, but it does require some time to set up.
Developing Software for the Azure Sphere
To develop applications for the board you need both Visual Studio (VS) and the Azure Sphere SDK. The community edition of VS will work. It supports C code only and a Windows 10 machine (Mac OS not supported).
Steps to set up development environment (expect 1-2 hours):
- Install Visual Studio (VS) and the Azure Sphere SDK
- Connect the board to your laptop, it will install some drivers which takes about 15 minutes. You can validate it is installed by checking for COM ports in Device Manager.
- Update the Azure Sphere device using the Azure Sphere Developer Command Prompt
- Create an Azure Tenant, or use your organization’s Azure Tenant if you have elevated rights.
- Claim the device. “Every device must be “claimed” by an Azure Sphere tenant. Claiming the device associates its unique, immutable device ID with your Azure Sphere tenant. The Azure Sphere Security Service uses the device ID to identify and authenticate the device.”
- Configure Wifi on the Azure Sphere device