Get the DragonBoard Running Windows 10 IoT Core

Dragon Board 410c

The DragonBoard 410c from Qualcomm is available and now it’s time to get it up and running with Windows 10 IoT Core and Universal Windows Platform apps.

The DragonBoard is based on the 64-bit, quad-core Snapdragon 410 processor running at 1.2 GHz with 1 GB of RAM and 8 GB of of internal storage. You get 1 micro USB and 2 USB 2.0 ports along with full sized HDMI and a micro SD card slot. Onboard connectivity and location support are provided by Wi-Fi 802.11 b/g/n, Bluetooth 4.1, and GPS. The Adreno 306 GPU with support for OpenGL ES 3.0 and DirectX will accelerate the graphics of your Universal Windows Platform apps. A 40-pin, low speed and 60-pin, high speed expansion connector will power your projects.

Let’s put together a quick shopping list:

  • DragonBoard 410c from Arrow Electronics $75.00
  • 12 Volt 2 Amp power supply with a cylindrical female output (1.75 x 4.75) from Arrow Electronics $12.67
  • USB to Micro USB cable from Amazon $4.79
  • HDMI cable from Amazon $6.49
  • USB keyboard and mouse from Amazon $14.99
  • HDMI capable monitor
  • Windows 10 PC
  • Visual Studio 2015 Update 1

DragonBoard

Once the items in your shopping list have arrived, head over to the Qualcomm Developer Network Tools and Resources page for the DragonBoard and download either the x86 or x64 Update Tool for Windows 10 IoT Core. Extract the zip file and double click DragonBoardUpdateTool_X64.msi to launch the installation wizard. Navigate through the wizard to install the Qualcomm device driver.

Qualcomm Driver

Next up, navigate your browser to the Windows IoT Downloads and Tools page and click the DragonBoard button to download the ISO file:

Download

Once the ISO file has downloaded, turn it into a virtual CD-ROM (remember those?) drive by double-clicking it. A file called Windows_10_IoT_Core_QCDB410C.msi will appear. Double-click the file to launch the installation wizard shown below:

DragonBoard Setup Wizard

When the wizard has finished, an image file called flash.ffu will be placed in the C:\Program Files (x86)\Microsoft IoT\FFU\QCDB410C\ directory.

Now it’s time to connect your Windows 10 PC to the DragonBoard to upload the Windows IoT Core image. The cool thing is you won’t have to boot off an SD card like you’re accustomed to with Arduino or the Raspberry Pi. I need you to flip the DragonBoard over and switch the the USB BOOT switch to ON while leaving the other three switches OFF. Use a paper clip to flip the switch as shown below:

DragonBoard USB Boot

Connect the big end of your USB cable to your Windows 10 PC and the micro end to the DragonBoard and connect the power supply to bring it to life. Launch the DragonBoard Update Tool from the shortcut on your desktop:

DragonBoard Shortcut

When the Update Tool launches, verify the Connection Status light is green. Click the Browse button and navigate to the flash.ffu file as shown below:

DragonBoard Update Tool

Click the Program button to upload the image to the board. This will overwrite the pre-installed Android image. If you get an error, just retry the process. Give the programming a minute or two and wait for a Programming successful dialog to pop up to let you know you’re finished.

DragonBoardUpdate Tool Progress

With the board programming complete, disconnect the power supply and use your paper clip to switch USB BOOT back to the OFF position.

Now it’s time for the moment of truth. Connect the HDMI cable from the DragonBoard to your monitor and then connect the USB keyboard and mouse and plug in the power supply to boot Windows IoT Core. I booted mine on my TV. It starts with a SnapDragon boot just to remind you what you’re probably running in your smartphone.

SnapDragon Boot

Next up, you get a generic picture of a single board computer.

Board Picture Boot

Last but not least, you boot into a default Universal Windows Platform (UWP) app just like the Raspberry Pi. If you find yourself having trouble getting Windows 10 IoT Core to boot, try re-seating all your connections on your board and flip the USB BOOT setting back and forth from ON to OFF. Worst case scenario, use the Update Tool again to re-flash your board.

Default App

The default app should display information about your board, the operating system, connected devices and network status. Since the DragonBoard has onboard Wi-Fi, use your mouse to click the Device Settings icon on the top-right part of the screen next to the Power icon. Select Network & Wi-Fi and then select the appropriate SSID displayed from your Wi-Fi access point.  Click the Connect button and type in your network security key and click Next.

Wi-Fi

The last step in the process is to ensure you can connect to the DragonBoard from your Windows 10 PC. From the Start menu, navigate to All apps | Microsoft IoT and launch the Windows IoT Core Watcher. It will scan the network and list any boards running Windows IoT Core as shown below:

Windows IoT Core Watcher

Right-click on your listed device and select Web Browser Here from the context menu to connect to your DragonBoard from your browser. You will be prompted for device credentials so enter Administrator for the username and p@ssw0rd for the password.  You’ll be presented with the Windows Device Portal as shown below:

Windows Device Portal

From here, you’ll be able to remotely monitor, configure and deploy software to your DragonBoard. I highly recommend you start out by changing the Administrator password. You also have the option to remotely connect via SSH and PowerShell.

You are now up and running with Windows 10 IoT Core on the Qualcomm DragonBoard and ready to build and deploy Universal Windows Platform apps so go ahead and launch Visual Studio 2015 Update 1. Once your IDE has loaded, click  File | New | Project | Blank App (Universal Windows). Once your app project has loaded, you’ll have to make some adjustments to Visual Studio in order to deploy and debug against your DragonBoard. You’ll need to select ARM to support the Qualcomm CPU and Remote Machine to debug over Wi-Fi as shown below:

Remote Machine

The first time you switch to Remote Machine, a Remote Connections dialog will popup. Using the information from the Windows IoT Core Watcher app, type in the IP address of the DragonBoard in the Address text box and click the Select button as shown below:

Remote Connections

To perform a quick smoke test, I want you to remotely run a sample app to verify everything is working properly. Open MainPage.xaml in the IDE, click the combo box at the top and select 10″ IoT Device (1024 x 768) 100% scale. Throw a TextBlock control in the center and type Hello DragonBoard as shown below:

Visual Studio

Run this simple app against your remote machine. This first time out, Visual Studio must deploy appropriate .NET assemblies to the DragonBoard. If you experience a deployment failure, it may be because your DragonBoard has been running for a while and the remote debugger has shut down. If this is the case, restart the DragonBoard and try again. A successful smoke test will look something like this:

Hello DragonBoard

Congratulations on getting Windows IoT Core to run on the Qualcomm DragonBoard and deploying a Universal Windows Platform app! With its fast graphics and CPU performance coupled with onboard wireless networking, I think you’ll find the DragonBoard to be a great IoT device to work with the Azure IoT Suite.

Sharing my knowledge and helping others never stops, so connect with me on my blog at http://robtiffany.com , follow me on Twitter at https://twitter.com/RobTiffany and on LinkedIn at https://www.linkedin.com/in/robtiffany

Get Connected to Windows 10 IoT Core on Your Raspberry Pi 2

USB Ports

Connect to Windows 10 IoT Core on Your Raspberry Pi 2 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.

Sharing my knowledge and helping others never stops, so connect with me on my blog at http://robtiffany.com , follow me on Twitter at https://twitter.com/RobTiffany and on LinkedIn at https://www.linkedin.com/in/robtiffany

Getting Started with Azure IoT services: Securing Event Hub Telemetry with SAS Tokens

Azure Security

To prevent the Internet of Things from becoming the largest attack surface in the history of computing, security at scale is paramount.

Any company that wants to be taken seriously as an IoT platform player has to provide cloud-scale telemetry ingestion while also delivering security to millions of events per second without skipping a beat. This is no easy task and therefore narrows down the field in this space dramatically. Microsoft Azure IoT services accomplishes this task through the use of Shared Access Signatures (SAS). They provide delegated, limited access to resources such as Event Hubs for a specified period of time with a specified set of permissions. Of course it does this without having to share the account access keys you created in the previous Event Hub article. You might remember creating a Shared Access Policy with Send permissions. You gave that policy a name and were given a connection string that includes the account access key which you used to test out a .NET IoT client. Good for testing. Career-limiting for production. That’s why you’re reading this article.

In regards to securely sending telemetry to Event Hubs, IoT devices and field gateways claim access to the Event Hub by presenting a SAS token. This token consists of the resource URI being accessed, and an expiry signed with the account access key. Basically, a URL-encoded string that is passed along every time telemetry is sent. Each IoT device needs its own distinct SAS token and that’s what you’re going to learn today.

To more easily create SAS tokens for your IoT clients, I want you to create a simple app to do the work for you. Launch Visual Studio and create a new C#, Windows Forms application and call it SASToken. From the Solution Explorer, right-click on References and select Manage NuGet Packages…

In the Search Online box type Azure Service Bus and install version 2.7.5 or later. Since you’ll be using the SharedAccessSignatureTokenProvider class to create a shared access signature for your publisher, add using Microsoft.ServiceBus; above the namespace with all the other using statements in the default Form class.

The next thing I want you to do is create a function called CreateSASToken() inside the Form class as shown below:

Create SAS Token

This function simplifies the creation of a SAS token by inputting values found on the Azure portal for your Event Hub. Let’s walk through the parameters of this function and where you can find the required values:

  • EventHubUri: This is found on the Dashboard page of your Event Hub under Event Hub URL. Don’t include the last part of the URL after the final dash /
  • EventHubName: This is found at the top of your Event Hub Dashboard page.
  • Publisher: This is a unique name you get to create for the IoT device that’s sending the telemetry to the Event Hub.
  • PolicyName: This is found on the Configure page of your Event Hub and is the name of the shared access policy you created with Send permissions.
  • PolicyKey: At the bottom of your Event Hub’s Configure page is a section called shared access key generator. Select the correct Policy Name from the dropdown box and copy the Primary Key in the text box below it.
  • Expiration: Enter the number of minutes you want your token to be valid. This TimeSpan code can be changed so you can use days or hours as well.

With the function up and running, you can now create unique tokens for each of your Publishers rather than insecurely using the same connection string for all of them. This also means that your Event Hub can prevent individual Publishers from sending telemetry if any of them have been compromised. To make better use of this function, follow along and build a simple data entry form.

Load the default Form in the Visual Studio and add the following UI controls and associated properties:

  • Label: Text = Event Hub Uri:
  • TextBox: Name = txtEventHubUri
  • Label: Text = Event Hub Name:
  • TextBox: Name = txtEventHubName
  • Label: Text = Publisher:
  • TextBox: Name = txtPublisher
  • Label: Text = Policy Name:
  • TextBox: Name = txtPolicyName
  • Label: Text = Policy Key:
  • TextBox: Name = txtPolicyKey
  • Button: Name = btnCreateSAS  Text = Create SAS Token
  • Label: Text = SAS Token:
  • TextBox: Name = txtSASToken

In order to bring things to life, create a click event for the Button and add the following code:

Create SAS Code

The code calls the CreateSASToken() function you created and passes in the values you type or paste into the TextBoxes. I hard-coded in 60 minutes but you can make that any number you like and you could even add a NumericUpDown control. The function returns a SAS token as a string and displays it in the TextBox at the bottom of the Form.

At this point, go ahead and run the app you just built. Type in or paste the appropriate values from the Azure portal into the TextBoxes. I called my Publisher 007 but you can call it anything you want. Click the button and you should get a SAS token as shown below:

SAS Form

While you now have an easy way to create SAS tokens, this won’t suffice at large scale. You’ll need to use what you’ve learned here to build a secure, on-premises or cloud-based token service to support deployment to thousands or even millions of individual IoT devices.

With your unique SAS token in hand, it’s time to modify the the app you created in the previous Event Hub article. Load the ContosoIoTConsole solution in Visual Studio and get ready to make a few changes.

Just like you did with the SAS token app, add using Microsoft.ServiceBus; above the namespace with all the other using statements in the Program class. Next, delete the first two lines of code inside Main() where you previously created a connectionString and an EventHubClient. In place of the deleted code you’ll declare a string called sasToken and paste in the long SAS token string that was generated by the Windows app you just built. Next, you’ll declare a connectionString and use the ServiceBusConnectionStringBuilder along with your Service Bus URI, Event Hub name, Publisher name, and SAS token to create it instead of reading the account access key from App.config like the previous article. In the final, new line of code, you’ll create an EventHubSender based on this new connection string. Every other line of code below stays the same. Your updated ContosoIoTConsole app should look like the code below with your Event Hub values substituted for mine:

Event Hub Sender Code

All that’s left to do is try it out by running the console app and then checking your Event Hub Dashboard a few minutes later to see if a new message arrived.

By following the directions and code in this article, you’ve made the leap to getting an IoT client to send telemetry to Event Hubs more securely. While Event Hubs has always required transport via TLS, by presenting a SAS token, Event Hubs knows who the IoT client is and what permissions it has. A SAS token’s ability to gain access to Event Hubs doesn’t last forever due to the expiration limitations you place on it when creating a new token which is a good thing. Furthermore, Event Hubs give you device blacklisting capabilities by revoking individual publishers based on the unique name you gave them. Expired tokens and revoked publishers will result in errors being thrown in the client code when a publisher attempts to send telemetry to an Event Hub. Keep in mind that when you do a mass deployment, your IoT clients and field gateways won’t have this information hard-coded like the example we just walked through. It must be encrypted and will often be baked into the hardware silicon as the IoT devices are being manufactured. Stay secure!

Sharing my knowledge and helping others never stops, so connect with me on my blog at http://robtiffany.com , follow me on Twitter at https://twitter.com/RobTiffany and on LinkedIn at https://www.linkedin.com/in/robtiffany

Learn to Code and Discover your Superpower

Gabe

Learn about a new “superpower” that isn’t being taught in 90% of US schools. I learned my “superpower” of programming using BASIC on a Timex Sinclair 1000 when I was in 9th grade.


“Everybody in this country should learn how to program a computer because it teaches you how to think.” – Steve Jobs

New Jump Start for Developers! Build Windows Phone 8 Apps. Register Now.

Andy and Rob

Microsoft Learning is thrilled to announce a new Jump Start for developers focused on building apps for Windows Phone 8.

This special live online course is scheduled for two full days of fast-paced, demo-rich sessions led by Microsoft Technical Evangelist, Andy Wigley, and Microsoft Enterprise Mobility Strategist, Rob Tiffany. Andy and Rob are two of the most respected experts in mobile app development and are excited to help C#/XAML developers get the most out of the Windows Phone 8 platform.

What: Building Apps for Windows Phone 8 Jump Start Date: November 28-29, 2012 Time: 7:00am – 5:00pm PST Cost: FREE! Target audience: Application Developers who want a fast-paced, real-world understanding of how to leverage C# and XAML to build apps for Windows Phone 8

** REGISTER NOW **

Help us spread the word with a blog post or a tweet like this one: Building Apps for #WindowsPhone 8 #MSJumpStart w/ @andy_wigley & @robtiffany 11/28! #wpdev http://aka.ms/WP8-Apps-JS @MSLearning

What’s a “Jump Start” Course? Training specifically designed for experienced technologists whose jobs demand they know how to best leverage new, emerging Microsoft technologies. These advanced courses assume a certain level of expertise and domain knowledge, so they move quickly and cover topics in a fashion that enables teams to effectively map new skills to real-world situations.

Best Regards,

Rob