Get Connected to Windows 10 IoT Core on Your Raspberry Pi

USB Ports

Connect to Windows 10 #IoT Core on Your Raspberry Pi with Secure Shell, the Web and Visual Studio.

In my last article, I showed you how to get Windows 10 IoT Core installed on your Raspberry Pi 2. In order to remotely configure, monitor and push Universal Windows Platform apps to your Pi, your Windows 10 PC must be able to connect. A critical element in making all this work is to ensure your PC is on the same network and subnet as the Raspberry Pi 2. Lets get to work.

A quick glance at your Raspberry Pi’s home screen will show you its name and IP address.

Windows Home

From the command prompt of your Windows 10 PC, run ipconfig to verify that it is on the same network and subnet. Sending a ping to your Raspberry Pi to ensure you can reach it is a good idea as well. If your connectivity is good, then it’s time to remotely connect via Secure Shell (SSH) so you can run commands on your Raspberry Pi.

In order to connect with Secure Shell, you’ll need need a remote shell client for Windows. PuTTY is a commonly used, open source terminal emulator that can be downloaded here. Once it’s downloaded, launch the app, type in the IP address of your Raspberry Pi, select the SSH radio button and click the Open button.

PuTTy

The first time you connect, you may experience a slight delay and a Security Alert dialog below might popup. Just click the Yes button to proceed.

Security Alert

Once you connect, type the default value of Administrator at the login as: screen and hit enter. Next, type the default password of p@ssw0rd and hit enter.

SSH Login

Welcome back to DOS! No Edlin jokes…

SSH

Let’s try a few commands. If you don’t like the default device name of minwinpc, you can change it by typing setcomputername <new name>. I changed mine to houseofpi in honor of the Houston restaurant where Rod Canion and the other founders of Compaq hatched their plan for a new computer company on a paper placemat. Type hostname to make sure you got it right.

One thing I absolutely want you to change is the Administrator password since your new IoT device is currently in a vulnerable state.  Type net user Administrator <new password>to make this happen. Please take IoT security seriously so you don’t contribute to creating the largest attack surface in the history of computing. A good list of Windows 10 IoT Core command line utilities can be found here.

Now lets move on to see how you can connect to your Raspberry Pi via the web.

Looking back to the installation of Windows 10 IoT Core for Raspberry Pi 2 from the previous article, it installed an app called Windows IoT Core Watcher which can be found from the Windows Start menu at All apps | Microsoft IoT. When you launch this app, it should display your Raspberry Pi in a list as shown below:

Windows IoT Core Watcher

Right-click on your device and select Web Browser Here from the context menu. Since you just changed your password, the browser will prompt you for it before displaying the page. As you can see below, the Home page just shows you some minimal information about your Raspberry Pi.

WebHome

The App page shows you a dropdown list of installed apps that you can run, uninstall or set as the default app at the top. Remember, only one app can run in the foreground at a time on Windows IoT Core. The Install app section is interesting in that it lets you remotely install your app (.appx), associated certificate (.cer) and any other dependencies your app may have.

AppX

The Process page works similarly to the Task Manager on your PC and displays a list of running processes along with associated CPU and memory usage. Clicking the X next to any of the processes will kill it.

Processes

Also like the Task Manager on your PC, the Performance page displays real-time CPU and file I/O utilization and memory usage.

Performance

There are a lot of other pages to explore that deliver helpful information and diagnostics to help you be successful with Windows 10 IoT Core on the Raspberry Pi 2. Definitely check them out.

As you might imagine, the whole point of having Windows 10 IoT Core is to run apps. This is where Visual Studio 2015 and the Universal Windows Platform comes in.

RTM versions of Visual Studio 2015 Community, Professional or Enterprise are required to get started. Make sure Universal Windows App Development Tools -> Tools and Windows SDK are installed during the setup procedure. After installation, download the Windows IoT Core Project Templates from the Visual Studio Gallery to make your File | New Project experience more productive. Last but not least, make sure developer mode is enabled by following these instructions.

If the Raspberry Pi devices you’re targeting are deployed with a connected monitor that a person can interact with, create a Windows Universal Blank App project in Visual Studio to deliver a user interface. On the other hand, if you’re targeting headless Raspberry Pi devices, create a Windows IoT Core Background Application in Visual Studio.

Once your headless or GUI IoT app project is loaded, you’ll have to make some adjustments to Visual Studio in order to deploy and debug against your Raspberry Pi. You’ll need to select ARM to support the Broadcom CPU and Remote Machine to debug over Ethernet.

ARM x86 Remote

It’s possible that a Remote Connections dialog will popup when you select Remote Machine for the first time. If Visual Studio cannot find your Raspberry Pi automatically, type in its IP address in the Address text box. Select none instead of Windows for Authentication Mode and click the Select button.

Remote Connections

Next, I want you to go to the Solution Explorer and double-click on the Properties icon of your IoT project. Click Debug on the left side of the screen and ensure that Target device is set to Remote Machine and the IP address of your Raspberry Pi is displayed in the Remote machine text box. Click the Find button to verify that Visual Studio can connect. If your Pi cannot be found, it’s possible that Visual Studio’s remote debugger on the Pi has shut down after a long time of inactivity. Try restarting your Raspberry Pi and give it another shot.

Debug

If all goes well, the Remote Connections dialog should popup and the name of your Pi should be displayed beneath the Auto Detected section. Click the Select button.

Remote Connections Success

After the dialog closes, make sure that the Use authentication check box is unchecked and then click the Save icon. At this point, you should be able to hit F5 and remotely debug against your Raspberry Pi.

As you can see, there’s no shortage of ways to connect, configure, control and debug against your Raspberry Pi running Windows 10 IoT Core. Now start building those IoT apps using the development tools and programming languages you’re comfortable with.

Get Windows 10 IoT Core Running on the Raspberry Pi

Board

You’ve been using Raspbian for your Internet of Things projects and now you’re ready to get up and running with Windows 10 #IoT Core on the Raspberry Pi.

To get started, make sure you’re running build 10240 of Windows 10 or later on your computer. You also need the following hardware components:

  • A Raspberry Pi 2
  • An 8 GB or larger class 10 micro SD card
  • A micro USB power supply running with 5 volts and 2 amps of current
  • A monitor with an HDMI connector
  • An HDMI cable
  • An Ethernet cable to connect to the network
  • A USB keyboard
  • A USB mouse

Navigate your browser over to the Windows Dev Center to download the Windows 10 ISO image for the Raspberry Pi 2 to a folder on your computer.

Windows 10 ISO Image

Double-click the ISO image to mount it as a virtual drive so you can see its contents.

ISO Contents

Double-click the MSI file to kick off the installation of Windows 10 IoT Core for Raspberry Pi 2.

Windows 10 Core Installer

With the installation complete, insert your micro SD card into your computer’s SD card reader. From the Windows 10 Start menu, navigate to All apps | Microsoft IoT and launch WindowsIoTImageHelper. You should see your micro SD card listed in the listbox at the top. If you don’t, click the Refresh button. Click the appropriate card in the listbox. Click the Browse button and navigate to C:\Program Files (x86)\Microsoft IoT\FFU\RaspberryPi2. Click the Flash button and keep in mind that this process will erase everything stored on your card.

Windows IoT Image Helper

The Deployment Image Servicing and Management tool (DISM) will launch in a command window and display the status of applying the image.

Apply Image

When the process is complete, close the Windows IoT Image Helper app, click on the Safely Remove Hardware icon in your task tray and select your SD card to safely remove it without corrupting the image.

Now it’s time to bring everything to life with your Raspberry Pi.

Looking at the picture below, connect your network cable to the Ethernet port on the bottom | right and then connect the other end to the same local network that your Windows 10 computer is connected to. Connect your HDMI cable to the port just below where HDMI is printed on your board and then connect it to your monitor. Connect your power supply to the micro USB port just to the left of the HDMI port but don’t plug it into the wall socket yet. On the left side where you see the micro SD card, flip the board over and put it into the SD card slot with a click.

Raspberry Pi 2

Since the Raspberry Pi 2 has four USB ports, you have a lot of options when it comes to peripherals. This is where you’ll plug in a USB keyboard and mouse. If you have the Official Raspberry Pi WiFi dongle, you can configure and use it too.

USB Ports

Now you can plug the power supply into the wall socket which will cause Windows 10 IoT Core to boot up with the familiar Windows logo and progress ring displayed on your monitor.

Windows Boot One

Before the boot process is complete, your monitor should display a visualization of a single-board computer.

Windows Boot Two

Once your device has booted, the DefaultApp will launch and display the IP address, connected network status and list of devices connected to the Raspberry Pi 2.

Windows Home

With your connected mouse, you can click the Tutorials icon on the upper | left part of the screen to get started with development projects.

Tutorials

On the upper | right part of the screen you can access Device Settings where you can configure the system language as well as Ethernet and Wi-Fi networking. You also get the familiar Power icon that lets you shut down or restart your Raspberry Pi instead of pulling the power plug.

Restart

Your Microsoft IoT journey has begun as you are now officially up and running with Windows 10 IoT Core on the Raspberry Pi 2! Check out my next article where I show you how to connect to your Raspberry Pi from a Windows PC via secure shell (SSH), the web and Visual Studio.

Speaking at VSLive! Redmond on Azure IoT

VSLive

If you’re attending Visual Studio Live! Redmond 2015, come check out my session on Making the Internet of Things Real with Azure #IoT Services.

At Microsoft, we believe that the Internet of Things starts with your things by building on the infrastructure you already have and using the devices you already own. Microsoft has played a central role in facilitating Internet of Things (IoT) forerunners including SCADA (Supervisory Control and Data Acquisition) and M2M (Machine to Machine) since the 1990s. We’ve provided real-time, embedded platforms to power sensors that no one ever sees plus advanced robotics, medical devices and human machine interfaces (HMI) just to name a few. Today, Microsoft Azure IoT services delivers hyper-scale telemetry ingestion, streaming analytics, machine learning and other components to unlock insights from the Internet of Your Things in order to transform your business.

Hope to see you there!