Install Windows 10 IoT Core on Raspberry Pi
How the tiny Pi can run a stripped-down developer edition of the world's biggest operating system
There's a major change underway in the evolution of Windows - and it's not just about apps and flashy graphics. Microsoft's constantly evolving platform is actively expanding into new areas and onto new platforms. Admittedly, things didn't get off to a good start, with the demise of Windows Phone and the ditching of Windows 10 Mobile. But that's allowed Microsoft to focus on its core Windows product, evolving the desktop edition and embracing new hardware in innovative and unexpected ways.
Which brings us to the Raspberry Pi. This certainly isn't a conventional Windows workstation: even the range-topping Pi 3 Model B+ has just 1GB of RAM and a 1.4GHz ARM-based processor. There's no way you could run the full version of Windows 10 on a system like this. What you can do, however, is install Windows 10 IoT Core, a bare-bones edition of the operating system that, as its name suggests, is aimed at lightweight Internet of Things applications.
If you were hoping for a desktop replacement, we're sorry to say that this isn't it. IoT Core is a very limited experience that can only run a single UWP app at a time (see p43). Yet it is a fascinating and potentially useful thing to try out and the basic installation is free; you only need to pay for a licence if you plan on distributing the results of your endeavours. So if you're looking to dip a toe into app development, or simply to explore some of the varied roles your Raspberry Pi can take on, here's our guide to setting up a low-cost, low-power IoT development platform.
All you need to follow along is a Raspberry Pi 3 and a spare microSD card - plus a separate Windows computer with a microSD card reader, in order to create the installation media. When you're ready to start developing applications, you'll also need to download Visual Studio, a text editor and a handful of SDKs, add-ons and certificates. Microsoft maintains a full list of these optional extras here.
Preparing your Pi for IoT Core
Windows 10 IoT Core is available for a variety of lightweight system on a chip (SoC) devices: alongside the ARM-based Raspberry Pi and DragonBoard platforms, it will also run on the Intel-powered MinnowBoard. We'll stick with the Pi, though, as it's the most popular hobbyist board. It's cheap and easy to get your hands on the device itself, and if you want to turn your hand to other projects, it's well supported with a range of both hardware add-ons and applications.
The Dashboard app makes it easy to install Windows 10 IoT Core on your microSD card
The first thing we need to do is set up the microSD card for our model of Raspberry Pi. That's a little trickier than you might expect because the Pi board doesn't have a built-in BIOS as such, and the necessary code is read directly from the microSD card. This is why it's often not possible to switch cards directly between different models of Pi - even close relatives, like the Pi 3 and Pi 3 Model B+.
Fortunately, the New Out Of Box Software (NOOBS) installer makes it easy to set up the default Raspbian OS - and for Windows 10 IoT Core, you can create a bootable card from a Windows PC or laptop using Microsoft's IoT Dashboard app.
To download it, point your browser here and click "Download the Windows 10 IoT Core Dashboard", and when asked whether you want to run or save it, click Run. In the requester that pops up, allow it to make changes to your PC.
The IoT Dashboard
The Windows 10 IoT Dashboard opens with a list of "My devices", which will initially be empty. Once you've got Windows 10 IoT Core running on your Pi, it will appear here, enabling you to access its features remotely. Click "Set up a new device" in the sidebar, and if you're not already logged in, then sign in with your Microsoft account.
The IoT Dashboard lets you control your Pi remotely - as well as monitor performance and resources
You'll then see a set of options as pictured above. Set your device type to "Broadcomm Raspberry Pi 2 & 3" and choose your OS build, which will be Windows 10 IoT Core. You should opt for the latest build, which at the time of writing is 17763.
You can also specify a device name (the default "minwinpc" is easy to remember, so we have left ours as it is) and specify a password. It's unlikely that anyone will be hacking into your Raspberry Pi, but the usual advice about good password practice still applies - don't use the same login as you do for other services.
At the right-hand side of the window there's also a list of Wi-Fi network connections. Selecting one now will make life easier when you first boot your Raspberry Pi, as it will automatically be able to get online. If you prefer not to do this right now (perhaps because your Raspberry Pi is going to be used in a different location), it's no problem; the first time you boot up Windows 10 IoT Core you'll have an opportunity to choose an SSID and provide the passphrase.
On first boot, you'll be prompted to choose a Wi-Fi network
With this done, it's time to insert your SD card into your PC. A potential practical hurdle is that the Raspberry Pi uses a microSD card, while many laptops only have a full-sized SD card slot. To get around this, you might need to invest a few pounds in a cheap microSD adapter. It also goes without saying that if there's anything on your microSD card that you want to keep, you should back it up before going any further, as the setup process will completely wipe the card.
For the same reason, once you've inserted your card, you should double check that it's been correctly selected by the IoT Dashboard as the installation destination. Check that both the name and capacity are shown as expected, and if you're in any doubt click the dropdown menu and review all the options to find the right one.
Tick the box to accept the software licence terms, then click "Download and install" to complete the process. The IoT Dashboard will now download the latest build for your device. It's a large file, which may take an hour or more to come down the line on home broadband, but you should only need to do this once. After that, the image is stored locally, so you won't need to download it again if you want to reflash the microSD card in the future.
Once the installation has completed, you may come across a scenario where the Dashboard says it needs to format a different drive to make it readable. Don't worry: you can cancel this, eject the SD card, insert it into your Raspberry Pi and turn on the power to boot into Windows 10 IoT Core.
Booting into IoT Core
The first boot can take a while so don't be concerned if you spend some minutes staring at the Windows logo or a blank screen. Eventually, you'll be asked to select a Wi-Fi network - you can skip this if you have already chosen a network while creating your image - and then you'll be taken to the device overview. This brief rundown of your hardware's spec includes its IP address, which you should note down.
The device homescreen has an overview of your hardware and your network address
Once you're into the OS proper, it's a good idea to check if any updates are available. Log in to your Microsoft account by clicking the red person icon on the sidebar, then click the cog icon to open Settings, followed by App Updates in the sidebar.
While it's possible to use a Raspberry Pi like a regular desktop PC, its compact, low-power design is perfect for headless operation, with no monitor, keyboard or mouse. And Microsoft has built a remote-access feature right into the IoT Dashboard.
To use it, return to your PC and click My devices on the IoT Dashboard sidebar. Right-click your Raspberry Pi and select Open in Device Portal. This opens your default browser showing all sorts of details about your IoT Core system. To log in, use "Administrator" for the username, along with the password you specified during the setup process. If you didn't enter a password, the default is "p@ssw0rd" (without the quotation marks).
If your Pi isn't visible in the "My devices" pane, check that the connection isn't being blocked by Windows. On your PC, search the Start menu for "Allow an app through Windows Firewall". Open the firewall control panel, scroll down the list of applications and make sure that WINDOWS10IOTCOREDASHBOARD.EXE is ticked for access to private networks.
Device Portal lets you perform a variety of management tasks, such as changing your password, setting the time on the remote device and monitoring the Pi's performance and resource usage. It also lets you deploy your applications to the device: to do so, expand the Apps section in the sidebar and click "Apps manager", then click "Choose file" to upload a package from your desktop.
Microsoft maintains extensive documentation for developing IoT apps using Visual Studio. Often, though, the best way to learn is to pick apart somebody else's code, so it's also created a repository of samples on GitHub.
Running PowerShell remotely
From the Dashboard it's also possible to access the Pi's file system and run commands on it directly. Right-click its entry in IoT Dashboard's My Devices list and pick Launch PowerShell. Confirm that you're happy for Windows to make changes to your PC, then enter your login details. You should now see a PowerShell prompt that works exactly as if you were typing directly into the Raspberry Pi.
For remote PowerShell access, make sure your Raspberry Pi is registered as a trusted device
If you have problems connecting, first check that you're entering your credentials in the right format. The username should be prefixed by your Pi's IP address and a backslash, so in our instance, the full username is "192.168.1.77\Administrator". If this doesn't solve your problem, your Pi might not be in your list of trusted devices. To fix this, quit the remote PowerShell session, then type PowerShell into the Windows search box, right-click the result and select "Run as Administrator."
Type "new start WinRM" and hit return to make sure Windows Remote Management is running. Now type "Set-Item WSMAN:\localhost\Client\ TrustedHosts -Value 192.168.1.77" - replacing "192.168.1.77" with the address you copied down from your device overview screen. You should now be able to open a PowerShell session on your Pi, and interact with it as if you were sitting in front of it.
Deploying your IoT applications
IoT applications aren't installed like normal Windows apps: there is no SETUP.EXE file to double-click on, since frequently the target system won't even have a monitor or a mouse.
Rather, once you have developed an application using IoT Core, it needs to be packaged up into a bootable image, which contains both your code and the required operating system and device driver files. This can then be flashed onto a microSD card for distribution. The card will start up an IoT-ready device such as the Raspberry Pi or Arduino board and launch a single application, which could be a machine controller, voice assistant, time-lapse camera, or anything else you might care to build.
If you fancy getting into IoT development, be aware that the free IoT Core distribution that we're using here can only create what are called "test images", which are targeted at hobbyists and developers who are wanting to prototype new designs.
Retail images are compiled for live use by consumers, or on corporate networks, and can be appropriately hardened to make sure they are secure. These can only be generated with a Core Pro licence - although you can still do all of the testing and development on a regular IoT Core system and then simply upgrade when it's time to build your final media.
Managing security risk and compliance in a challenging landscape
How key technology partners grow with your organisationDownload now
Evaluate your order-to-cash process
15 recommended metrics to benchmark your O2C operationsDownload now
AI 360: Hold, fold, or double down?
How AI can benefit your businessDownload now
Getting started with Azure Red Hat OpenShift
A developer’s guide to improving application building and deployment capabilitiesDownload now