IoT

My SQL Relay 2016

sqlrelayIn 2015 I attended a SQL Relay day in Birmingham, as a humble attendee with a colleague. I sat on the edge of my seat in every session soaking up all I could from the speakers. I remember being in awe of these technical rock stars that gave their knowledge to the community. A community that was strongly bonded and recognised by many sponsors.

In 2016 the humble attendee was long gone. I was now heavily involved supporting operational elements of the conference. I was now a speaker, giving back my knowledge in every city throughout the week talking about IoT using Raspberry Pi’s and Azure. I believe I completed my initiation into the community (the SQL Family). I accompanied friends and colleagues on the #FunBus each day as we travelled to new locations. I organised other speakers as they arrived at venues and helped with the event in a totally flexible capacity, dealing with whatever was needed. From attending a one day event last year I was now amongst a handful of people that would be at every SQL Relay day throughout the week. As a sponsor, speaker, helper, go to guy.

This blog post is my brief and informal account of SQL Relay 2016 from an insiders’ perspective.

Before Monday

photo-12-10-2016-13-13-20As Purple Frog Systems were a silver sponsor this year and heavily involved in the overall setup of the SQL Relay event, time before the first day with delegates was spent sorting everything out from graphics to sponsor swag, bags, leaflets, transport, hotels and everything in between. Organising a conference in five cities in five days with zero time and little budget takes a phenomenal amount of effort. The picture to the right was the scene in the Purple Frog conference room leading up to Relay.

This little lot had to be sorted, condensed, part sent to Nottingham for the second half of the Relay week and most importantly Tetris’d  into the back of a 17 seat minibus aka the #FunBus. Not just once, but five times in a repeatable way.

Monday 3rd Oct – Birmingham

I was up and out the house for 6:15am, yes, this time does exist! Much to the disgust of my other half who reluctantly gave me a lift to Stafford train station, I bound for Birmingham New Street. Upon arrival I filled up with coffee and met up with Microsoft’s Andrew Fryer, David Postlethwaite and Purple Frog’s Hollie Whittles. We then a short car journey to the Midlands Art Centre (MAC) this was the calm before the storm.

Upon arrival an army of helpers, speakers, sponsors and volunteers unloaded the mini bus and setup for the first day of the conference. Spirits were high and enthusiasm in abundance. The doors opened on time and delegates poured in.

At 12pm I delivered my first talk of the week on building an IoT solution end to end in the MAC’s Hexagon theatre, this went well and I received positive feedback. This was a great start to SQL Relay for me as I am a fairly new community speaker.

photo-04-10-2016-14-12-43 photo-04-10-2016-14-12-31 photo-04-10-2016-14-12-53

Thanks Terry (@SQLShark) for the terrible picture of me 🙂

After the prize giving, a select few loaded up the #FunBus and we set off for Cardiff. Alex Yates from DLM Consultants had turned 30 the day before, so as a SQL Family it was necessary to have a party aboard the #FunBus between Birmingham and Cardiff. This included party hats, balloons, banners, singing and birthday cake! The atmosphere aboard the mini bus was brilliant and perfectly fitting of the SQL Family.

photo-03-10-2016-17-55-01The terrible picture was my fault this time!… But you get the idea.

We arrived in Cardiff, with the first leg of the journey complete. We checked into our respective hotels and met up with the Cardiff massive for a beer or three led my Steph Locke.

Tuesday 4th Oct – Cardiff

photo-05-10-2016-06-31-55A slightly more civilised start today, we met at 7am in the hotel for breakfast before taking a short walk across the road to the Cardiff Motorpoint Arena. The oiled machine of helpers sprung into action again, setting up the event with time to spare before delegates arrived.

The Cardiff peeps really spoilt us at lunch time. We were given lamb tagine, couscous and salad. It was lovely, especially the second time round 😉

The demo gods were once again kind and my IoT talk went without a hitch.

Later in the day we learned that Jean Michel Jarre had also come to the Motorpoint Arena for SQL Relay, providing a great backing track whilst we packed away.

The force was strong in Cardiff so rather than hitting the road straight away we stayed for another SQL Family gathering at Five Guys. It was a great end to the second day. Spirits and enthusiasm were still high.
photo-05-10-2016-06-33-59

Left to right the people I know, sorry if I missed you; David Postlethwaite, Alex Yates, Steph Locke, Ryan Yates, Rob Sewell, Alex Whittles, Richard Douglas, Stuart Moore, Me, John Martin and Andre Melancia. Photo by Andrew Fryer.

After burgers and chips most of us we were aboard the #FunBus again heading for Reading. After getting lost in the Reading traffic, we dropped people off at there hotels and had a relatively early night.

Wednesday 5th Oct – Reading

Sadly there was no breakfast provided in the minimal Reading digs, but I didn’t mind as todays SQL Relay was being hosted at Microsoft’s shiny UK offices at Thames Valley Park, complete with in-house Costa Coffee and Starbucks! SQL Sentry’s John Martin welcomed us into the building and provided the caffeine while we waited in the lobby… It was massive and luxuriously furnished. The Microsoft buildings were superb, even though the SQL Relay conference only occupied a small corner in building 3.

Data_Cul_MFSTHQ

12pm came around again and I presented my talk in a state of the art theatre. The venue made the buzz of speaking even more exhilarating.

photo-06-10-2016-06-57-24 photo-06-10-2016-06-57-32

In the afternoon we were greeted by Claire Smyth, Microsoft’s MVP Programme Organiser. Claire spent a lot of time learning about the wider community and brought us another round of coffee, while we discussed how else Microsoft could help support local user groups.

Sadly, the day came to a close and we were kicked out of the pretty office. But we were over the hump of the week.

We boarded the #FunBus bound for Nottingham this time. This was the longest leg of our journey and travelling up the motorway, limited to 62mph drained a lot of my positivity. The new co-pilot/DJ didn’t help either :-). Fortunately, we had more cake on-board and conversation flowed freely which helped pass the time. Also a new game was created to get me more twitter followers, this offered much amusement discovering how many twitter accounts one person can have!

Upon arrival in Nottingham we made our usual rounds of local hotel drop offs and arranged to meet up at The Round House Pub at 9:30pm. This later resulted in 10 of us all going for curry at The Cumin. The restaurant owner was surprised and happy to accommodate our party on this Wednesday evening. With full stomachs SQL Relay paid the bill (thank you!) and we headed off to count sheep.

1
SELECT COUNT(0) FROM [Brain] WHERE [Thoughts] = 'Sheep'

Thursday 6th Oct – Nottingham

Another early start, the SQL Family met for breakfast at 7am. The St James Hotel was great, but the coffee machine was broken! Let’s just take a moment to reflect of the gravity of this issue. Two third party coffee vendors in house at the Microsoft offices to instant coffee today! Trip advisor shall hear about this! 🙂

Reflection over. Today we were at the Albert Hall! Not Thee Albert Hall, but good enough if anyone asks. An aged building with a beautiful main hall, complete with a massive pipe organ. Sadly, our conference suite was downstairs.

By day four, things were pretty automatic with Relay setup and the day flew by. My IoT talk went well and I even went the extra mile to setup the demo again in the venue lobby for delegates who missed my session.

photo-06-10-2016-14-30-45 photo-06-10-2016-09-44-10

Purple Frog’s Alex Whittles presenting on the right, as nobody took my picture today, well not that I’m aware of.

photo-06-10-2016-22-49-16We packed up and loaded the #FunBus heading for Leeds. We arrived to be greeted by a city light show with music and stunning visuals projected onto the side of our hotel. In addition, Microsoft’s Mike Boswell had booked us a private room at the local Fazenda – a Brazilian restaurant where huge amounts of meat get delivered to your table by gentlemen holding swords and very sharp knives. Yum yum! Wine flowed and the variety of meat were gorgeous.

By 10:30pm I was struggling to keep my eyes open so admitted defeat and headed back to the hotel. I was gone as soon as my head hit the pillow.

Friday 7th Oct – Leeds

The 7am breakfast routine continued, but none of us really had an appetite after the meat feast from the night before.

thankrayToday we were at the Thackray Medical Museum for the last day of SQL Relay. The venue was in a lovely old hospital building complete with exhibitions on how leg amputation used to be performed!

The local SQL community helpers sprang into action once more providing fresh hands to make light work of the conference setup. I confess by day 5 I wasn’t feeling very fresh or enthusiastic. Despite this I was honoured with a midway clap from the audience in my IoT session after the first Raspberry Pi demo worked like a dream, feeding its sensor values into Azure in real-time. It was a proud moment. I may have even cracked a smile myself, which a member of the audience caught on camera 🙂 … because I’m not a grumpy person *cough*

photo-07-10-2016-14-26-13

The last prize giving was done and SQL Relay was closed to delegates for another year.

After Friday

Now it’s back to normality for most people however the SQL Relay drum beats on.

This morning was spent sorting out the Purple Frog conference room again after all the SQL Relay stuff was unloaded on Saturday. Then it’s a case of finishing this blog post and sorting out sponsor attendee slips before we can get things closed off.

It’s been brilliant being part of SQL Relay this year. The people that give their time to make the event run are gods amongst men. In each city, having that fresh wave of helpers really made the difference. Thank you all.

In short; it was an incredible, but exhausting week. One which I hope I’ll be lucky enough to repeat next year.

Many thanks for reading.

Edited by the future Mrs Andrew.


Changing the Start Up App on Windows 10 IoT Core

Changing the start up application on your IoT device running Windows IoT Core seems to be a common requirement once the device is out in the field so I hope this post exploring a few different ways of doing this will be of value to people.

To clarify the behaviour we will achieve below is from device power on our Windows 10 IoT Core operating system will boot up. But instead of starting the default application which is originally named ‘IoTCoreDefaultApp’ we will load our own custom created UWP app executable file. I will not talk about deploying your UWP app to the device, the assumption here is that has already been done and a complied .EXE file is living on the devices local storage.

Application & Package Name

Before diving into any changes it’s worth taking a moment to figure what our UWP application is called. This might seem obvious but depending on how you make this change (via the web portal or PowerShell) it’s referred to by different names. Both are configured in Visual Studio under the Package.AppxManifest and do not have to be the same. See below with screen shots from a new vanilla UWP project.

  • Firstly, the application name which is the friendly display name given to solution on creation and the EXE file presented in the settings web portal.

UWPAppName

 

  • Secondly, the package name which is the not so friendly value (defaulted as a GUID) is used as a prefix for the package family name. This is what PowerShell uses and needs to be exact.

UWPPackName

Assumed you’ve navigated that mine field and you know what your UWP app is called depending on the context where its used lets move on.

Headed vs Headless

Sorry, a tiny bit more detail to gain an appreciation of before we actually do this. Start up apps here can take 2x different forms; headed or headless. The difference between them is best thought of as running in the background or running in the foreground. With the foreground apps being visual via the devices display output.

  • Headed = foreground. Visible via display.
  • Headless = background. Not visible, like a Windows service. Also you have no head 🙂

Choose as required and be mindful that you can only have one of each running.

Web Portal

Ok, the easy way to make this change and make your app start up post OS boot: navigate to your devices IP address and authenticate against the web portal. Here in the Apps section you’ll find anything currently deployed to your Windows IoT Core system. Under the Startup field in the Apps table simply click the application you now want to start after the operating system has booted up using the Set as Default App link.

UWPPortalStartupAPP

At the point of making this selection the table content will refresh to reflect the change and the application will also start running.

You can now restart you device and your app will load without any further intervention.

PowerShell

Given the ease of the above why would you want to use PowerShell Paul? Well if you’ve got to do this on mass for 30x devices you’ll want to script things. Or, as I found out when Windows 10 IoT Core was still in preview for the Raspberry Pi 3 the App panel in the web portal above had a bug and just didn’t display anything!

Moving on, create yourself a remote management session to your IoT device. If your unfamiliar with doing this the IoT Dashboard can help. Check out my previous blog post Controlling Your Windows 10 IoT Core Device for guidance.

Within the remote management session you’ll need the command IoTStartUp. When using a new command for the first time I always like to add the help switch /? to check out what it can do.

Next work through the following commands in your PowerShell session.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## 1.
## Review the list of apps currently available on your device.
IoTStartUp List
## If your expected app isn't there then it hasn't been deployed to the device.
 
## 2.
## Copy the package family name from the list or from Visual Studio if you still have it open.
 
## 3.
## Set the app as headed using the following command.
IoTStartUp Add Headed YOURAPPFAMILYNAME
 
## 4.
## To confirm which apps are now set for startup use:
IoTStartUp Startup

Here’s the same thing in a PowerShell window just to be clear.

UWPPowerShellStartupApp

Again to prove this you can now restart the device. From PowerShell use shutdown -r.

Restoring the Start Up Default

To change this back to the default application either repeat the above PowerShell steps for the package family name IoTCoreDefaultApp_1w720vyc4ccym!App or in the web portal set the app name IoTCoreDefaultApp as the default.

Many thanks for reading


Installing Windows 10 IoT Core On Your Raspberry Pi

At a recent SQL Server User Group in Birmingham I presented an end to end IoT solution streaming data from sensors on a Raspberry Pi 3. What followed the talk was a very simple question from an audience member asking basically; how do you get started with doing this? It then occurred to me that I had missed out the vital information for getting the Windows 10 IoT Core operating system (OS) onto the device. In the following article I hope to redeem myself from this error of assumption. This has fallen quiet nicely as well because for the Raspberry Pi 3 the OS only came out of preview a couple of weeks ago. This means you no longer need to be an “insider” to get hold of this.

The SD Card

SDCardVsThumbNo assumptions now, lets be explicit. The Raspberry Pi 2 & 3 require micro SD cards, if your ensure which they are, these are approximately the size of your thumb nail. As well as the physical size the other important thing for Windows 10 IoT Core is you’ll need a Class 10 micro SD card. The class indicates the speed at which you can read and write from the storage, anything less than a Class 10 card will not be fast enough for this OS and it fail to boot up on the device.

In terms of capacity, so far I’ve been working with 16Gb SD cards without any issue or limits on storage. As you’ll see below once the card has been imaged is gets partitioned and on a 16Gb card a chunk of that is left unallocated.

Lastly to get the micro SD card available in your Windows desktop machine I use the following adaptors which have served me well for many years. All the micro SD cards I’ve purchased have always come with the standard SD card shell and are only pence to purchase separately if required. The final USB reader is just in case the machine doesn’t already have such a thing. All my laptops have a slot on the side, but not my desktop machines.

SDCardAdaptors

IoT Dashboard

Assuming you now have the right size, shape and smell of SD card available in Windows by far the easiest tool I found to flash the card is Microsoft’s IoT Dashboard. This is available to download and install from here: https://developer.microsoft.com/en-us/windows/iot/Docs/GetStarted/rpi3/sdcard/stable/GetStartedStep1.htm. Helpfully the IoT Dashboard is a ClickOnce install and frequently receives updates to it’s options.

On the ‘Set Up A New Device’ panel you have everything you need to install the Windows IoT Core OS image on your card.

IoTDashFlashSDCard

After selecting your required combination of board you can even now configure the hostname and admin password for the target device. Something which previously had to be done post install with PowerShell or via the settings web portal. See my previous blog post on controlling your device if you require assistance with this >>>.

Next you just need to accept the usual T&C’s and flash the card. If your chosen OS image hasn’t already been downloaded this will also be done for you as well. Lovely!

Note; elevated permissions will be required when the process comes to partition and write to the card so expect a prompt if you aren’t already a local administrator.

After the process has completed I’d strongly recommend a safe eject of the device via normal Windows methods to avoid any corruption and ultimately needing to repeat the process.

You can now insert the card into your Raspberry Pi and boot it up.

Disk Management & Card Contents

This is just extra information should you be interested in what the IoT Dashboard imaging process did to your SD card. I was certainly concerned to discover that Windows now thought my SD card was only 64Mb in size after the flashing processes!

In Windows Disk Management you will now have something that looks like the following. As mentioned above the card actually gets partitioned with only one of those partitions being a FAT file system that Windows can read and present.

WinIoTDiskManagment

To further confuse things if you boot the device and mount the admin share C$ from a UNC path of the IP address as a mapped network drive it’ll appear like you have accessed the 1.31Gb block of the partitioning. Here your Windows desktop machine will probably report something like 571Mb of the space at the network location has been consumed. So far so good right?

WinIoTUNCPathMapDrive

But, if you enter the mapped drive Select All and Right Click > Properties you’ll then find files and folder totally 1.57Gb!

WinIoTUNCProps

The shortcuts you see in the above screen shot for ‘CrashDump’, ‘Data’ and ‘EFIESP’ report the target as an “Unlabelled Volume” if you view there properties. But you can navigate to them and browse the contents.

In an attempt to work out what folders physically existed where on the SD card I took a random 2Gb ISO file and started copying it into different directories. Sadly this led to even more confusion. The only thing I think we can be sure of is that the ‘Data’ shortcut above represents the 12.86Gb partition seen in Disk Management. But even that I didn’t manage to prove because it contains a nest of other Program Files directories as well.

In conclusion we might have a 16Gb SD card, but finding out what the operating system has used and what we still have available for apps or camera pictures remains a mystery for another day.

Many thanks for reading


Windows IoT UWP Tasks Tickers and Threading

Upon entering the IoT revolution a few things immediately became apparent;

  • We now had the ability to collect and handle more sensor data than we’d ever before possibly conceived.
  • These sensors and there data will/are going to change the very way we live… Not convinced by this one? Talk to anybody that has a Fitbit attached to their wrist about how many steps they do each day!
  • More relevant to this article. The procedural tools we know and love like T-SQL and PowerShell are no longer going to be enough to deliver these new world real-time data requirements.

Moving on from the philosophy lets focus on my third point and the acceptance that we need to enter the realm of object orientated programming (OOP), specifically in the article C# .Net. Now I will state from the outset that I still consider myself to be a C# novice, but through IoT development the learning continues thick and fast. Although if you ask me directly to explain polymorphism I’ll still be running for Google 🙂

For procedural people already working with Microsoft products this learning and development can be fairly nice and sometimes even natural. However I expect people already involved in hard-core OOP software development and not very procedural this might seem a little backwards or just very obvious. Just a speculation at this point. At the moment I’m the former and if your reading this I hope you are too.

So why do we need OOP  for our data? What’s your point Paul?

Well being a Microsoft aligned person more and more I find myself working on Windows 10 IoT Core with C# based on the Universal Windows Platform (UWP) framework to develop apps and drive my sensors collecting that very precious data. For those of you that haven’t encountered the UWP concept yet I recommend visiting these Microsoft pages: https://msdn.microsoft.com/en-gb/windows/uwp/get-started/whats-a-uwp

Assuming you are familiar with a little UWP dev lets continue and dive straight into the first problem you’ll encounter, or may have already encountered.

Threading

In reverse order to my article title I know, but threading is basically the issue that we first need to work around when developing an IoT application. The UWP framework is great and very flexible however it only offers a cut down version of the full fat .Net library (at present). Or to be more accurate when working with a UWP solution the number of SDK’s available in your references will be very limited compared to what you might normally see.

UWPRefManager

This limit includes the well known System.Threading and classes like the following example from MSDN.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Threading;
 
public class MonitorSample
{
   public static void Main(String[] args)
   {
      int result = 0;
      Cell cell = new Cell( );
 
      CellProd prod = new CellProd(cell, 20);
      CellCons cons = new CellCons(cell, 20);
 
      Thread producer = new Thread(new ThreadStart(prod.ThreadRun));
      Thread consumer = new Thread(new ThreadStart(cons.ThreadRun));
 
         producer.Start( );
         consumer.Start( );
 
         producer.Join( );
         consumer.Join( );  
 
      Environment.ExitCode = result;
   }
}

Threading is simply not available on the Universal Windows Platform.

Tasks

Enter our new friends async and await tasks or asynchronous programming.

1
2
using System;
using System.Threading.Tasks;

Now I’m not even going to try and give you a lesson on C# as I’d probably just embarrass myself, so instead I will again direct your attention to following MSDN pages:

https://msdn.microsoft.com/en-us/library/mt674882.aspx

However what I will do is try and to give you some context for using this new “threading” none blocking concept within your UWP IoT application. The example I like to call on is very simple. You have an IoT sensor device that needs to do two things:

  1. Send JSON messages containing your data to an Azure IoT Event Hub (Device to Cloud)
  2. Receive messages containing device management instructions (Cloud to Device)

These two fundamental bits of functionality have to happen asynchronously. We can’t be waiting around to send messages because we are working on what has just been received. To handle this we need something like the following example at the core of our UWP app.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace IoTSensor
{
    public sealed partial class MainPage : Page
    {
        private MainViewModel doTo;
        public MainPage()
        {
            this.InitializeComponent();
            doTo = this.DataContext as MainViewModel;
 
            Loaded += async (sender, args) =>
            {
                await doTo.SendDeviceToCloudMessagesAsync();
                await doTo.ReceiveCloudToDeviceMessageAsync();
            };
 
        }
    }
}

Now both send and receive can occur without any blocking behaviour.

Tickers

Lastly lets think about tickers created using something like DispatcherTimer(). The good old fashioned clock cycle if you prefer.

We might need a ticker to cycle/iterate over a block of code that is doing something with our IoT sensors. For example if you wanted to collect a temperature reading every 10 seconds. Using an async task with a ticker would be the way to achieve that. For example.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace IoTSensor
{
    using System;
    using System.Threading.Tasks;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using GHIElectronics.UWP.Shields;
 
    public sealed partial class MainPage : Page
    {
        FEZHAT hat; //THANKS https://www.ghielectronics.com/
        DispatcherTimer sensorCollection;
 
        public MainPage()
        {
            this.InitializeComponent();
        }
 
        private async Task SetupDevice()
        {
            this.hat = await FEZHAT.CreateAsync();
 
            this.sensorCollection = new DispatcherTimer();
            this.sensorCollection.Interval = TimeSpan.FromSeconds(10);
            this.sensorCollection.Tick += this.sensorCollection_Tick;
            this.sensorCollection.Start();
        }
 
        private void sensorCollection_Tick(object sender, object e)
        {
            //Get values and send to cloud etc...
        }
 
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            await SetupDevice();
        }
    }
}

I do hope this high level article has been of some use. I will attempt to follow up with a more deep dive look at the above once I’ve slept on the concepts and forced myself to leave the beloved SQL behind for another couple of weeks while we voyage every further into the Internet of Things!

Many thanks for reading


Controlling Your Windows 10 IoT Core Device

If like me you have a several Raspberry Pi’s doing different things and running different operating systems controlling them can sometimes be a bit of a challenge, especially with a wealth of remote control protocols and command line tools to choose from. In this post I’m specifically exploring the different ways to control your Raspberry Pi running Windows 10 IoT Core.

The thing that surprised me about Microsoft’s “core” flavour of operating systems is just how much they appear on the network like a normal workstation, this might sound silly and very obvious but for the longest time when installing servers in Hyper-V I would shy away from the minimalist core install because I very wrongly assumed this meant you only got a black CMD prompt and nothing more. With Windows 10 IoT Core I can assure you that this is certainly not the case. Apart from the lack of a pretty title Start Menu the operating system (OS) is feature rich and very easy to work with.

Lets look at what we can use to control our Pi and Core OS.

The Old Fashioned Physical Method

PiShot1Just for completeness its probably best to start with the traditional approach of using physical things like a HDMI cable plugged into the back of your monitor plus a keyboard and mouse connected via USB ports. This is obviously very basic and probably not why you’ve been drawn to this blog post. However even via this method you do get a graphical interface on screen with the ability to alter things like the WiFi settings and actually shutdown the device correctly without pulling the plug.

Windows Core Browser Console

Next and by far my favourite feature in Windows 10 IoT Core is the browser based console that can be connected to using the IP address of the device followed by port 8080. Eg: HTTP://192.168.1.2:8080.

If you navigate to the equivalent address of the device on your network you will be prompted for a set of admin credentials and then taken to a lovely bunch of pages which include a wealth of configuration options. When developing this satisfies almost all of my immediate needs for controlling the device and starting up deployed applications.


IoTSetup


The browser console even includes a Task Manager style page of running processes with some pretty real time performance graphs for CPU, RAM, I/O and Network usage. See slide 5 of 16 in the GIF above.

Lets move on before I turn this blog post into a page of screen shots!

Windows IoT Remote Client

IoTClientNext we have the IoT Remote Client app, which as I type is officially still in preview. However this is another really helpful way to control your device. The desktop application available from the Microsoft Store is basically the IoT Core operating system RDP client, so no need for VNC server licencing between Raspbian and Windows to worry about.

IoTRemoteClientStore link: https://www.microsoft.com/en-gb/store/apps/windows-iot-remote-client/9nblggh5mnxz

To get this running in the browser based console I mentioned above first go to the Remote page and tick the box to Enable Windows IoT Remote Server. AKA Terminal Services. Next install the app on and start it up. If all is well it will detect the IoT device on your network and allow you to connect, or just enter the IP address in the box provided. Post authentication you’ll then have a view of your IoT device matching exactly what the HDMI cable can offer. Plus the ability to interact with the device with a keyboard and mouse through the remote session. When starting apps that include something graphical it’s really useful to see the thing. Another use case might be when performing cloud to device messaging, having the received content on screen is nice to see.

This method of remote control is where I actually pulled the first screen shot above from, rather than taking a picture of the monitor displaying the HDMI output.

IoT Dashboard

Another really useful bit of software in the IoT device toolbox is the IoT Dashboard.

Download link: http://go.microsoft.com/fwlink/?LinkID=708576

This walks you through the setting up a new device SD card plus gives you a My Devices window for easily launching the next 2x features detailed below.
IoTDashboard

PowerShell

What can’t you do with PowerShell in the Microsoft world?

Before the IoT Dashboard connecting to the IoT Core device required starting the PowerShell remote commands service. Then setting the items address etc etc. Like this:

1
2
3
4
5
6
7
$MyDeviceIP = "192.168.1.2" #Example
 
Net start WinRM
 
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $MyDeviceIP
 
Enter-PSSession -ComputerName $MyDeviceIP -Credential "localhost\Administrator"

Now if using the IoT Dashboard above from My Devices you have the option just to right click on the auto detected device and select Connect using PowerShell. This handles all the above prerequisites for connecting and only prompts for credentials. Lovely!

PStoPi

Note; both PowerShell methods of connection to the device will require elevated permissions.

Admin File Share

Lastly and again really for completeness we have the traditional UNC path. From the IoT Dashboard this is made easily in My Devices this time by selecting Open Network Share. This brings up a file explorer window to the C$ admin share for browsing the file system on the SD Card.

PiShot5For anybody that is used to seeing the contents of the C drive on a Windows this folder structure will look very familiar. Program File etc.

Other

Sadly despite a few attempts things like Remote Registry access, remote connection to Services using your local snap-in console and Computer Management are not currently supported. The Service to enable Remote Registry simply isn’t there, along with other remote management services on Windows 10 IoT Core. If this changes I’ll be sure to update this post.

Many thanks for reading.


Paul’s Frog Blog

Paul is a Microsoft Data Platform MVP with 10+ years’ experience working with the complete on premises SQL Server stack in a variety of roles and industries. Now as the Business Intelligence Consultant at Purple Frog Systems has turned his keyboard to big data solutions in the Microsoft cloud. Specialising in Azure Data Lake Analytics, Azure Data Factory, Azure Stream Analytics, Event Hubs and IoT. Paul is also a STEM Ambassador for the networking education in schools’ programme, PASS chapter leader for the Microsoft Data Platform Group – Birmingham, SQL Bits, SQL Relay, SQL Saturday speaker and helper. Currently the Stack Overflow top user for Azure Data Factory. As well as very active member of the technical community.
Thanks for visiting.
@mrpaulandrew