Thursday, August 7, 2014

Windows IoT on Galileo – The Beginning


As many of you know Microsoft is focusing on Internet of Things (IoT) and it has started developing an IoT version of Windows OS. It was announced in the Build 2014 conference. As a first step, Microsoft open a Web site and encourage developers (Professionals, Students and Hobbyist) to register here in order to receive a worthy Intel Galileo development kit with Windows IoT on it. You can see more information about Windows Developer Program for IoT in the below link.
http://dev.windows.com/en-us/featured/Windows-Developer-Program-for-IoT

As a Microsoft MVP, I am privileged to receive the earlier shipment of Galileo kit. Thanks to Windows Embedded (IoT) team. Many of the registered developers will receive this package soon.

Windows IoT on Galileo

 
Windows IoT is booting from 16 GB Micro SDCard(Only 1GB is used for the OS), A Stripped off version of Windows 8.1 is running on the device. Since it is an Headless device, Ethernet is enabled and a PC tool named Galieo Watcher,Telnet service and Network file sharing enable us to interact with Galileo. To know more about this, Go through the below link,
http://ms-iot.github.io/content/SetupGalileo.htm
 

Now the setup is ready. I log in to the device through telnet and got the command prompt. I eagerly tried the first command to know the version of the OS and found it is the same Windows 8.1 running on my PC.


It raised my eagerness and kindle me to dig on the available things on it. Next I have installed the Windows IOT SDK from connect to start creating the first Windows IoT application on Visual Studio 2013. It is win32 based and support Arduinio wiring APIs. A simple LED blinking application is given as a hello world application. Of course, the kernel is not a Real time kernel like Windows CE, the delays given in the LED blinking are not perfect in timings. I build and run the application with Windows Remote debugger option on Visual studio 2013 and it will ask access details to run the application on the device. Alternatively I tried to run a Win32 application build for PC rather than using Windows IoT SDK. I tried Manual deployment by simple copying the application to device and run it. Yes, I got the hello world message. Deploying from Visual Studio 2013 using remote debugger is succeeded with the following changes.

Changes made to deploy Win32 application using remote debugger
  • Change the local windows debugger to remote windows debugger in order to connect with Galileo
  • Build the application and press F5 to start the debugger. You will get the error message as shown in the below picture.

  • Go to Project -> Properties -> Configuration Properties-> debugging and set/modify the red marked items in the image

  • Go to Build -> Configuration Manager and select deploy option as shown below

  • Now press F5 to launch your application to Galileo, it will ask you access details to proceed further.

     
USB Mass storage support
I plugged in the USB pen drive to the device as shown in the above Galileo setup image, Surprisingly, i noticed that USB Mass storage driver support is included which provide additional storage support for this board. See the below image. 



You can also access through the Network sharing as shown below




 

Configuring Ethernet adapter
Next step is to configure Ethernet adapter to connect with world. You can use the command netsh from the telnet prompt to set Static IP Address and DNS server.
  • Type netsh and in the prompt netsh> type interface ipv4 as shown below

  • Type show interfaces to list out the adapters



  • Set the IP Address, subnet mask followed by gateway

  • Set the DNS server IP Address



  • Check with IPconfig /All command



  • Now Ping to Bing.com



The kick start went well, I am trying to do something interesting with the existing setup and soon you can expect some blogs on it.

On Continuation, Here is the next blog on Windows IoT on Galileo – Connecting Adafruit 10DOF IMU Breakout

4 comments:

vamsi krishna manchala said...

hi vinoth,

do you know how to remote debug a win32 console application which is based on third party .dlls. to be more precise i have a sensor which connects to windows x86 machine through a propitiatory wireless dongle and the company provides dlls to access the data and their functionalities. i have a win32 app which i am trying to deploy on to windows iot galileo. Any help would be appeciated.

Vinoth said...

Sorry Vamsi for the very late response. Some how i missed it. you can copy the dlls to the below directly of Galileo board.
C:\test\
Remote debugger will deploy your application to the above directory.
But my only concerns is, Windows running on Galileo is not like a PC OS. it is a stripped off version of the PC windows. I am not sure about support of all APIs and drivers. Again you have to install the driver for the Wifi before using there application DLLs.

Avula Satheesh said...

Hi Vinoth,
Your blog is really helped us, Thanks so much for your contribution and support.

I got problem with "cpprest\http_client.h" file, if i include this this causes error "Cannot find or open the PDB file"..

I have placed , "cpprest120d_2_2", "User32.dll","wastorage.dll"

forwarders and stubs also i have added and builded new "User32.dll"..i have kept all this dll inside the executable files in c$:test\

still it is saying to add me "api-win-core-debug" like wise dlls.. i have added almost windows api sets dlls , but still it is showing incorrect file" api-win-core-debug"...

I am running my machine on Windows 7 32 bit, i would like to expose C++ REST Full services..

Please kindly suggest us the way forward..

Thanks,
Sateeh Kumar Avula.

Vinoth said...

you are saying that the DLL is missing. But can you show what API is missing.
User32.dll, cpprest120d_2_2.dll and wastorage.dll are available in the binaries folder on the release package GalileoSensorsToSever-WinIoT\binaries folder. download it from the below codeplex link.
https://galileosensorstoserver.codeplex.com/