Windows 10 IoT - Getting Started on the Raspberry Pi 2

Windows 10 IoT Insider Preview was released yesterday for various low cost hardware types - Raspberry Pi 2, MinnowBoard MAX, Intel Galileo and Arduino. It's available from here https://ms-iot.github.io/content/GetStarted.htm

In this blog post I'll be getting the IoT release up and running on one of those devices, the Raspberry Pi 2.

Download the Install

As stated on the IoT web site you will need the following to be able to set up Windows 10 on the PI:

  • A PC running Windows 10 Preview - this must be a physical PC as you need to write to a SD Card.
  • A Raspberry Pi 2
  • A copy of the Windows 10 IoT Core Insider Preview image

Go to the Connect web site to sign up for the Core Insider image. https://connect.microsoft.com/windowsembeddediot/SelfNomination.aspx?ProgramID=8558

If you haven't signed up with Connect previously you will be prompted to register.

Once registered you will need to accept the EULA's. Click on each link and Accept the EULA.

After you have accepted, click the Downloads link and all the IoT downloads will be available. Download the Windows 10 IoT Core Insider Preview Image for Raspberry Pi 2

Extract the Flash file, set up the SD Card and apply the image

Once the Windows_IoT_Core_RPI2_BUILD.zip has downloaded, extract the files from the zip file.

Insert your SD Card into the reader. If you need to format the disk then I recommend grabbing a copy of the excellent SDFormatter from here

Run CMD and type in:

diskpart

list disk

You can then find the drive number for your SD Card - in my example below it is Disk 1

There are two ways you can apply the image to the SD Card. You can use DISM or WICD.

To use DISM use the following command from an administrator CMD prompt:

dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDriveN /SkipPlatformCheck  (PhysicalDriveN being the number of the drive - in my example 1).

To use WICD, download and install the Windows 10 ADK using the instructions on my blog post 'Implementing Windows Image and Configuration Designer' - Note that you need to install the Flashing Tools feature alongside other components for this particular task.

Once installed load Windows Imaging and Configuration Designer. Choose the Deploy menu and select 'To removable drive'

Browse to the Flash.ffu file.

Click Next and then select the target disk and click Next.

Select Flash to write to the SD Card.

Click Finished when complete

Once the flash.ffu file is applied you will have an imaged SD Card.

Boot the Raspberry Pi

Insert the SD Card into the Raspberry Pi and power on. Give the OS time to set up. The screen will go black for a while (a couple of minutes). You will then be presented with an information screen that tells you the IP address of the Pi.

The Pi will restart and you will then be presented with the DefaultApp screen.

Configure the Raspberry Pi

Now that the Pi 2 is up and running it's time to do some basic config using PowerShell from your Windows 10 PC.

Launch PowerShell as an administrator. You may need to start the Windows Remote Manager service on your device. To do this enter the following command

 net start WinRM

Now a trust relationship between the PC and the Pi needs to be established. To do this enter the following command.

 Set-Item WSMan:\localhost\Client\TrustedHosts -Value <machine-name or IP Address of the Raspberry Pi>

For my set up I need to enter the IP address 192.168.1.135.

Enter 'Y' when prompted.

Next you need to start a remote session on the Pi. To do this use the PowerShell command Enter-PSSession.

Enter-PsSession -ComputerName <machine-name or IP Address of the Pi> -Credential <machine-name or IP Address or localhost of the Pi>\Administrator

So for my connection I would use

Enter-PsSession -ComputerName 192.168.1.135 -Credential 192.168.1.135\Administrator

Once those details are entered you will presented with an authentication window to enter the password for Administrator. The default password to use is - p@ssw0rd. Note that this should be changed as soon as possible for security reasons.

The connection can take up to half a minute so be patient here.

You should now be running a remote PSSession to Windows 10 IoT on the Raspberry PI 2.

I can type in a net user Administrator command to get some information back about the Administrator account.

I can also make the password change for the Administrator using the net user Administrator <password> command.

For some starter commands within PowerShell check out the 'Commonly used utilities' section here but for now it's time to learn and play. Have fun!

Now that the Pi is set up you need to configure your desktop PC with Visual Studio 2015 Preview so you can start to develop with the Windows IoT device. Check back soon for details on how to do that.

Read Part 2 - Windows 10 IoT Part 2 - Time to set up the PC