Windows 10 Anniversary on a Raspberry Pi: Another look at IoT Core

Neat platform but should we just use Linux?

The App Manager in the Device Portal, managing Windows 10 IoT Core on Raspberry Pi
The App Manager in the Device Portal, managing Windows 10 IoT Core on Raspberry Pi

Hands on Microsoft has released Windows 10 Anniversary for IoT Core, a version of Windows which runs on Raspberry Pi 2 or 3, Dragonboard or Minnowboard.

The company has also announced support for Intel Joule, an Internet of Things (IoT) compute module launched at the August 2016 Intel Developer Forum, though Windows software for this is not yet publicly available.

As I type, I am watching Windows 10 IoT Core apply a system update on a Raspberry Pi 3. It is taking ages, whereas when I have done Linux updates on a Pi it is generally quicker and does not require a reboot.

I also experienced a number of annoyances in a brief hands-on, with failure dialogue boxes from the browser-based dashboard and oddities such as a refusal to set the keyboard layout to other than “English (United States)”; I selected a different keyboard, the screen went grey, then came back without changing it. Oddly, this worked fine when done later in a remote session.

This is Windows, then, but there are some attractions. In particular, you can build applications in Visual Studio using C#, C++ or a variety of other languages; you can enrol IoT Core devices for management with System Center Configuration Manager; and you can easily connect IoT Core with Azure services for processing data.

The way Microsoft presents IoT Core is puzzling. It seems to have two goals in mind; one is to support the hobbyist “Maker” community in order to attract developers to its platform, and the other is to provide large businesses with an end-to-end IoT solution. It is the latter which has most business potential, but go to Microsoft’s Windows 10 IoT Core developer site and you see sample applications with a hobbyist feel, such as an Air Hockey Robot and a connected clock radio.

In essence, Windows 10 IoT Core is a cut-down version of Windows designed either to run headless with long-running applications that talk to sensors or other devices and send the data for processing, or to run a Windows UWP (Universal Windows Platform) application with a graphical interface. Only one UWP application can be in the foreground. On IoT Core, it is also possible to run a special kind of UMP “Background app”, without a GUI, for long-running tasks. You can configure an app to run at startup, and in fact the home screen is itself a UWP App, called IoT Core Default App, for which you can download the code from GitHub and perhaps fix the keyboard configuration bug I ran into.

Microsoft has evolved the platform considerably since I last looked at it, over a year ago. There is now an IoT Dashboard application which is meant to simplify getting started. Provided you have an SD card reader, the application will download the operating system and write it to the card, configuring it with your choice of device name and administrator password.

You can also automatically provision an Azure connection using the IoT Hub, for managing and communicating with multiple devices.

Remote Desktop to a Pi running Windows 10 IoT Core

Remote Desktop to a Pi running Windows 10 IoT Core

Another new piece is the Windows IoT Remote Client, which runs on any Windows 10 PC, tablet or phone. As the name implies, this is a remote desktop to your device. In practice, a remote PowerShell session is generally more useful, unless you write an application with a graphical user interface.

I had a few hassles with both PowerShell and the Remote Client. In order to get PowerShell remoting working, you have to follow a few steps to start the WinRM service and add the Pi to TrustedHosts, before you can run the magic Enter-PsSession command. You will probably need to do this if you want to try the Remote Client, because the Remote Client requires the Remote Server to be running on the Pi. Although you should be able to enable this via the browser-based dashboard (called the Device Portal), it gave me an error when I tried, and this seems to be common.

The solution is to add a scheduled task to run the NanoRDP task on boot, using PowerShell. I did this but it does not quite work, and I have to manually run the task in PowerShell before the Remote Client will connect, and even then it does not always work.

There is also now a command prompt built into the default app, though to enable this you need to type some PowerShell to add a registry key, otherwise it comes up with “Access Denied” when you try to run cmd.exe. Once done, this makes an interactive logon considerably more useful than before.

Microsoft has also added Store integration, though it is not what you are used to on desktop Windows 10. Installing an application from the Store is a multi-step process involving the Windows Imaging and Configuration Designer, creating a package, and then copying it to a special folder on the device before rebooting. You can also pre-install compatible Store apps when creating the initial OS image. The real advantage is that Store apps get automatic updates, simplifying maintenance once deployed. Microsoft describes another new feature as “multiple foreground app support”. This means you can write launcher applications, such as a Start screen.

There is also now support for an IoTivity AllJoyn Device System Bridge. Both AllJoyn and IoTivity are frameworks for connecting and controlling devices. Windows supports AllJoyn, but the bridge enables interaction with IoTivity devices.

Windows IoT Core running on a Raspberry Pi is a neat platform and it is easy to see its potential, especially for businesses with .NET development skills and Azure accounts. It is not an alternative to Linux if you want a full-features OS on a Pi, but could be used for all sorts of home automation, robotics or multimedia projects.

Considering the importance of stability and low maintenance overhead for an IoT platform, it is a shame I ran into so many annoyances in the initial setup, leading to an impression that it is not yet ready for business. That said, it may be fine once you have got your application working and deployed. Visual Studio integration works well.

One last thought: with Microsoft’s efforts to get .NET Core working on Linux, it is reasonable to wonder whether that alternative route to bringing IoT on devices, such as the Pi, into the Windows and .NET ecosystem may, in the end, be more productive. ®

Sponsored: Minds Mastering Machines - Call for papers now open

Biting the hand that feeds IT © 1998–2018