ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

STICKY: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 12:03 pm

The unofficial list of things people ask about Windows 10 Core IoT on the Raspberry Pi2 or might like to know.

Please keep any additions to facts only. Opinions, questions and comments are best left for the Forum. I'll try and remove any such of mine from below. This FAQ is migrating to a new, supposedly better, organisation. WIP.

How do I:-

Page 1
1. Get started on Windows 10 Core IoT on the Raspberry Pi2
2. Download code samples and docs to get really started with Windows 10 Core IoT on the Raspberry Pi2
3. Find the code samples themselves!
4. Find out which APIs are not supported (currently) on Windows 10 Core IoT on the Raspberry Pi2
5. Find out if the hardware I want to use is supported (currently) on Windows 10 Core IoT on the Raspberry Pi2
6. Find out which pins on the header are available for use and for what purposes
7. Find out if the project I am thinking of has already been implemented (or maybe something similar to it anyway)
8. Find Microsoft's IoT Developer Portal
9. Find Forums to chat on about things to do with Windows 10 Core IoT on the Raspberry Pi2
10. Control my Pi from my Desktop
11. Find out what I can run from a Command Line (PS or SSH) on my Desktop
12. Find Microsoft's FAQ lists for Windows 10 Core IoT on the Raspberry Pi2
13. Map the USB drive on my Pi so that I can see it from my Desktop
14. See that drive I have now mapped (and the C: drive as well :-) )
15. Use those shares as logical drives from my Desktop
16. Change the startup boot config.txt
17. Setup the HDMI video port so that it supports my screen
18. What exactly is the Arduino Wiring Project System for Visual Studio ?
19. Open a file in C# for access to read/write it
20. Why can't I open c:\something.txt
21. How do I capture the screen on my Pi
22. How do I view the screen on the Pi remotely (RDP)
23. I have written a server application running on my Pi. Why cannot I not access it from elsewhere?
24. What development languages are supported on Windows 10 Core IoT?
25. My C#, multi page application leaks memory - #1
26. My C# application leaks memory - #2
27. How can an 800*480 IoT target be added to the dropdown list box at the top left of the editing area in Visual Studio 2015 to accommodate the typical small LCD screens that are used with the Raspberry Pi IoT?
28. How do I create an xxxxx Application in Visual Studio 2015?
29: Can I port an existing Visual Studio project that I have written into Windows 10 Core IoT
30: Can I port an existing non Visual Studio project that I have written into Windows 10 Core IoT
31. How do I get really detailed information on the TCP/IP configuration of my Pi
32. Why cannot I 'see' \\{myservername}\{myshare} on my local network from my Pi
33. What version of Windows 10 Core IoT are there and which is most recent
34. Is there an easier way to convert Windows Store 8.1 or Windows Phone 8.1 (not Silverlight) projects into Windows 10 UAP applications
35. When will support for xxxxxx be added to Windows 10 Core IoT
36. Is the Official Raspberry 800*480 screen supported by Windows 10 Core IoT
37. What is the simplest way to GET 'stuff' from a remote Web or REST server in C#
38. What is the simplest way to POST 'stuff' to a remote REST sever in C#
39. My C# application leaks memory #3
40. How do I write an application to play music on Windows 10 Core IoT
41. How do I find worked out examples with explations of how to...
42. Which GPIO pins can I use

Page 2
43. How do I stay up with the very latest software examples being written for Windows 10 Core IoT
44. How do I get some really detailed information on how the NT Kernel at the heart of Windows 10 Core IoT is setup
45. Find out what 'Command Line'/'MSDOS Command'/'Linux like Command' are there in Power Shell
46. Where can I find a Developer’s Guide to Windows 10 (including Core IoT - even features a Raspberry Pi, briefly)
47. Does Windows 10 Core IoT support SQL
48. Why is it that writing applications that contain 'async void' can be such a bad idea
49. Test if my I2C device connected to the Pi is working correctly
50. How do I sample a GPIO input pin at a fast rate with simple code
51. I have this really cool Win32 C/C++ service application I would like to port to Windows 10 Core IoT. Is it possible
52. Why does my WiFi/Ethernet adapter keep getting a 169.254.0.x IP address
53. What executables (*.exe) exist on Windows 10 Core IoT
54. What version and other info exists about these .exe, etc. on the Pi
55. Where are the Known Folders stored on the Pi at Core IoT Kernel level
56. Where is my apps local data/roaming data stored on the Pi at Core IoT Kernel level
57. So which Known Folders ARE supported in Windows 10 Core IoT
58. Can I just drag and drop an .exe/.sys/.whatever that I have on my Desktop/Internet source/Attic over onto the Pi
59. My Pi has occasional power loss, will the SD card get corrupted
60. How do I deploy my UWP application to the Pi
61. How do I get a Win32 application to run on startup
62. How do I find an example of how to talk to I2C and SPI peripherals that are on my Pi
63. Can I make a hardware watchdog or reset switch for Windows 10 Core IoT on the Pi
64. I want to use the Arduino Wiring Project but the Guide says Serial Rx/Tx cannot be used and I need Serial Rx/Tx
65. What is this telemetry SDK I hear about (aka Application Insights)

Page 3
66. Where can I find the GitHub extensions to Visual Studio 2015
67. Where can I find other 'stuff' that I can build and run on Windows 10 Core IoT
68. Can I use JavaScript frameworks from a C#/UWP application
69. I am comming from a Linux background, what do I need to know about the basic, inner, workings of Windows 10 Core IoT
70. All this GUI stuff in Windows 10 Core IoT is quite tricky. Are there any good design patterns out there that might make it easier
71. How can I use the hardware Serial Port Rx/Tx on the Pi under Windows 10 Core IoT (10556 and up)
72. How do I get a list of all the Win32 applications, tasks, etc. that run at startup or whatever
73. How do I get a list of all the Power Shell commands and functions I can run
74. How do I get further help on all those commands and functions
75. How do I get a (long) list of what is and is not being allowed through the Pi's TCP/IP Firewall
76. I was planning to store data onto the SD Card. But, I had heard/read that the SD Card will only support a number of write actions before it becomes corrupt/unusable.
77. Are there any examples of Generic Bluetooth Serial including Passkey Pairing
78. How do I get really detailed (and I mean detailed) information about how Core IoT is using threads, modules, etc. given that the Visual Studio tools don't work yet.
79. How do I get the MAC address of my Pi in C#
80. Why is My App Package Name a GUID?
81. Easily access the GPIO pins in a UWP C++ application
82. Easily access the GPIO pins in a UWP C# application
83. Easily access the I2C bus in a UWP C++ application
84. Easily access the I2C bus in a UWP C# application
85. Easily access the I2C bus in a node.js application
86. Easily access the I2C bus in a Python application
87. Easily access the I2C bus in a VB application
88. Easily access the SPI bus in a C# application
89. I'm having problems with my async code, sometimes it works and sometimes it doesn't. Any good tools out there to help with this problem
90. I'm having occasional problems with async code in my buttons 'click' (or wherever)
91. Build a Breathalyser on Core IoT Pi !!!
92. Connect a flock of Core IoT devices to the Cloud in a manageable way
93. A Raspberry PI 2, Azure Service Bus and Microsoft Band walk into a...
94. Intro to ADCs and Analog Sensor with Light Sensor Hands-On-Lab for Windows IoT Core
95. Use my Pi as a servo controller
96. Find lots of recent videos about using Windows 10 Core IoT

Page 4
97. Find the Twitter feed from Microsoft about Windows 10 Core and Core IoT
98. So what version of Windows 10 are there and who are they aimed at/expected to be bought by
99. Find the UK TechNet Blog
100. The Windows 10 Core API I want to use doesn't exist in UWP Core IoT API space. What shall I do.
101. I am still having problems setting up my HDMI screen. Can someone explain all those resolutions, etc. in config.txt
102. Where can I find a Pictorial Buying Guide for the Raspberry Pi
103. Windows vs Linux: what's the best operating system?
104. I am having problems with interfacing stuff to the GPIO pins
105. Common Pitfalls for Beginners
106. What's the UK governments take on IoT
107. Where can I find a C# application that can get more info from the OS than standard APIs
108. Find StackOverflow's 'Questions that have been asked about Windows Core IoT'
109. How do I create an appx file ? When I build the project, there are no appx files in the bin folders.
110. What's that little multi-coloured icon that keeps popping up in the top right of my display
111. What are those Mysterious Numbers being displayed in upper left and right corners of the screen
112. How much current will the GPIO pins supply.
113. How do I connect 5v circuitry to the Pi.
114. How do I find a detailed list of what devices the OS knows about on the Pi
115. What's the difference between I²C and SPI busses
116. Why does Visual Studio fail in deployment asking about a phone
117. What is the 'right' order to install VS etc.


1. Get started on Windows 10 Core IoT on the Raspberry Pi2

https://ms-iot.github.io/content/en-US/ ... pPCRPI.htm


2. Download code samples and docs to get really started with Windows 10 Core IoT on the Raspberry Pi2

https://ms-iot.github.io/content/en-US/ ... Coding.htm


3. Find the code samples themselves!

https://github.com/ms-iot/samples


4. Find out which APIs are not supported (currently) on Windows 10 Core IoT on the Raspberry Pi2

https://ms-iot.github.io/content/en-US/ ... leApis.htm

For Win32 APIs see
https://ms-iot.github.io/content/en-US/ ... ngTool.htm


5. Find out if the hardware I want to use is supported (currently) on Windows 10 Core IoT on the Raspberry Pi2

https://ms-iot.github.io/content/en-US/ ... rfaces.htm


6. Find out which pins on the header are available for use and for what purposes

https://ms-iot.github.io/content/en-US/ ... gsRPi2.htm


7. Find out if the project I am thinking of has already been implemented (or maybe something similar to it anyway)

https://microsoft.hackster.io/en-US


8. Find Microsoft's IoT Developer Portal

https://dev.windows.com/en-us/iot


9. Find Forums to chat on about things to do with Windows 10 Core IoT on the Raspberry Pi2

Raspberry Foundation
viewforum.php?f=105

Microsoft
https://social.msdn.microsoft.com/Forum ... WindowsIoT


10. Control my Pi from my Desktop

Web
http://ms-iot.github.io/content/en-US/w ... s/Webb.htm

Power Shell
http://ms-iot.github.io/content/en-US/w ... rShell.htm

SSH
http://ms-iot.github.io/content/en-US/w ... es/SSH.htm


11. Find out what I can run from a Command Line (PS or SSH) on my Desktop

http://ms-iot.github.io/content/en-US/w ... eUtils.htm


12. Find Microsoft's FAQ lists for Windows 10 Core IoT on the Raspberry Pi2

http://ms-iot.github.io/content/en-US/Faqs.htm
https://social.msdn.microsoft.com/Forum ... WindowsIoT


13. Map the USB drive on my Pi so that I can see it from my Desktop

From Power Shell or SSH

Code: Select all

net share e$=e: /GRANT:EVERYONE`,CHANGE /REMARK:"USB Drive"

14. See that drive I have now mapped (and the C: drive as well :-) )

On the Desktop use File Explorer. Enter

Code: Select all

\\{PiNameOrIpAddress}\e$
and logon with Pi Admin Username and Password (for c: use c$)

https://ms-iot.github.io/content/en-US/ ... es/SMB.htm


15. Use those shares as logical drives from my Desktop

Use File Explorer and Map Network Drive. Enter the same details as above.


16. Change the startup boot config.txt

Desktop
Before you remove the SD card and after loading the OS, navigate to the root of the SD card using File Explorer and edit it there
If the Pi is running then access c:\EFIESP through File explorer on the Desktop (see above) and edit it there

Raspberry Pi
Navigate to c:\EFIESP (PS or SSH) and edit it there


17. Setup the HDMI video port so that it supports my screen

Edit config.txt as required

e.g. (800*480@60Hz)

Code: Select all

gpu_mem=32                  # set ARM 1Gb less 32Mb, VC to 32Mb DRAM
framebuffer_ignore_alpha=1  # Ignore the alpha channel for Windows.
framebuffer_swap=1          # Set the frame buffer to be Windows BGR compatible.
disable_overscan=1          # Disable overscan
init_uart_clock=16000000    # Set UART clock to 16Mhz
arm_freq=900
arm_freq_min=900
force_turbo=1
hdmi_group=2                # Use VESA Display Mode Timing over CEA
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
max_usb_current=1
...
...
Last edited by ricl on Mon Dec 21, 2015 12:42 am, edited 62 times in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 12:12 pm

18. What exactly is the Arduino Wiring Project System for Visual Studio ?

https://ms-iot.github.io/content/en-US/ ... tGuide.htm

...
...
Last edited by ricl on Mon Oct 26, 2015 12:29 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 12:23 pm

19. Open a file in C# for access to read/write it

Code: Select all

    // create a file with the given filename in the local folder; replace any existing file with the same name
    StorageFile file = await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
20. Why can't I open c:\something.txt

UWP applications can only use the Well Known Folders for storage, no access is allowed to the wider core file system
...
...
Last edited by ricl on Mon Oct 26, 2015 12:30 pm, edited 2 times in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 12:35 pm

21. How do I capture the screen on my Pi

There is no way to get at the screen buffer or to 'look over the shoulder' at it either. In either C++ or C# (or any other language).

By design.


22. How do I view the screen on the Pi remotely (RDP)

You can't. Again by design. Make the application serve the data directly itself, don't try and peek over its shoulder without asking
...
...
Last edited by ricl on Mon Oct 26, 2015 12:31 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 12:48 pm

23. I have written a server application running on my Pi. Why cannot I not access it from elsewhere?

You need to open the port required in the Pi's IoT Firewall

From PS or SSH

Code: Select all

netsh advfirewall firewall add rule name="Open Port dddd" dir=in action=allow protocol=TCP localport=dddd
...
...
Last edited by ricl on Mon Oct 26, 2015 12:31 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 12:59 pm

24. What development languages are supported on Windows 10 Core IoT?

https://ms-iot.github.io/content/en-US/ ... Coding.htm

Supported languages at present are

C
C++
C#
Python
Node.js

(VB also works but is not officially supported)
...
...
Last edited by ricl on Mon Oct 26, 2015 12:32 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 1:14 pm

25. My C#, multi page application leaks memory - #1

Add

Code: Select all

...
 this.InitializeComponent();
 this.NavigationCacheMode = NavigationCacheMode.Enabled;
 ...
to all the pages to allow for correct BackStack implementation on IoT Core.
...
...
Last edited by ricl on Mon Oct 26, 2015 12:32 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 1:16 pm

26. My C# application leaks memory - #2

Make sure you are correctly using events

Code: Select all

    DispatcherTimer timer;

    public MainPage()
    {
        this.InitializeComponent();
        this.NavigationCacheMode = NavigationCacheMode.Enabled;

        timer = new DispatcherTimer();
        timer.Interval = TimeSpan.FromSeconds(30);

        this.Loaded += (sender, e) =>
        {
            timer.Tick += timer_Tick;
            timer.Start();
        };

        this.Unloaded += (sender, e) =>
        {
            timer.Stop();
            timer.Tick -= timer_Tick;
        };
    }

    private void timer_Tick(object sender, object e)
    {
        UpdateDateTime();
    }
...
...
Last edited by ricl on Mon Oct 26, 2015 12:32 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 1:20 pm

27. How can an 800*480 IoT target be added to the dropdown list box at the top left of the editing area in Visual Studio 2015 to accommodate the typical small LCD screens that are used with the Raspberry Pi IoT?

Add a file to

C:\Program Files (x86)\Windows Kits\10\DesignTime\UAP\Devices\1033\603_iot_7_800x480.xml

with the contents

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
 <Device name="IoT Device" width="800" height="480" scale="100" size="7" default="true" resize="false" icon="Assets/box_icon.ico" generic="Generic/generic.xaml" MinVersion="10.0.0.0">
  <Device.Qualifiers>
   <Qualifier Name="DeviceFamily">IoT</Qualifier>
  </Device.Qualifiers>
 </Device>
...
...
Last edited by ricl on Mon Oct 26, 2015 12:33 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 2:58 pm

28. How do I create an xxxxx Application in Visual Studio 2015?

UWP C# Foreground Application
File: New: Project: Templates: Visual C#: Windows: Universal: Blank App (Universal Windows)

UWP C# Background Application
File: New: Project: Templates: Visual C#: Windows: Windows IoT Core: Background Application (IoT)

UWP Visual Basic Foreground Application
File: New: Project: Templates: Visual Basic: Windows: Universal: Blank App (Universal Windows)

UWP Visual Basic Background Application
File: New: Project: Templates: Visual Basic: Windows: Windows IoT Core: Background Application (IoT)

UWP C++ Foreground Application
File: New: Project: Templates: Other Languages: Visual C++: Windows: Universal: Blank App (Universal Windows)

UWP C++ Background Application
File: New: Project: Templates: Other Languages: Visual C++: Windows IoT Core: Background Application (IoT)

C/C++ Win32 Background Application
File: New: Project: Templates: Other Languages: Visual C++: Windows IoT Core: Blank Windows IoT Core Console Application

UWP JavaScript Foreground Application
File: New: Project: Templates: Other Languages: JavaScript: Windows: Universal: Blank App (Universal Windows)

UWP JavaScript BAckground Application
File: New: Project: Templates: Other Languages: JavaScript: Windows: Windows IoT Core: Background Application (IoT)

Python Foreground Application
File: New: Project: Templates: Other Langauges: Python: Python Application

Python BAckground Application
File: New: Project: Templates: Other Langauges: Python: Windows IoT Core: Background Application (IoT)
...
...
Last edited by ricl on Mon Oct 26, 2015 12:33 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 3:18 pm

29: Can I port an existing Visual Studio project that I have written into Windows 10 Core IoT

Maybe.

The first step is to create a new project of the appropriate type (see FAQ 27) and then add any source files you need into that

If your code uses any non UWP code or accesses any of the Unsupported APIs (see FAQ 4) then it will not work
If coding in C/C++Win32 then change the source code where required, i.e. no fopen(...) only fopen_s(...), etc.

For Win32 APIs see
https://ms-iot.github.io/content/en-US/ ... ngTool.htm

If your code requires external libraries that are not (yet?) supported on IoT (see FAQ 4) then it will not work

Otherwise it should/may just run! Hit Build & Run and find out
...
...
Last edited by ricl on Mon Oct 26, 2015 12:34 pm, edited 2 times in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 3:37 pm

30: Can I port an existing non Visual Studio project that I have written into Windows 10 Core IoT

Possibly.

Same answer as FAQ 28
...
...
Last edited by ricl on Mon Oct 26, 2015 12:34 pm, edited 2 times in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 9:15 pm

31. How do I get really detailed information on the TCP/IP configuration of my Pi

Run from the following using PS or SSH

Code: Select all

ipconfig /all
netstat /a
route print
...
...
Last edited by ricl on Mon Oct 26, 2015 12:34 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 9:33 pm

31. How do I check if the server port I opened (FAQ 22) is really there

Code: Select all

netsh advfirewall firewall show rule name="Open Port dddd"
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Thu Oct 22, 2015 10:02 pm

32. Why cannot I 'see' \\{myservername}\{myshare} on my local network from my Pi

Check that the Username, Password and Permissions on the share correctly reflect a view from the DefaultAccount on the Pi

Try using \\{myserveripaddress}\{myshare} instead.

If this works then the Pi is having trouble resolving {myservername} (possibly a Domain issue), use the IP Address instead or fix the problem.

P.S. You can always add entries to the hosts file at

c:\Windows\System32\drivers\etc

i.e.

192.168.x.y {myservername}
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 9:01 am

33. What version of Windows 10 Core IoT are there and which is most recent.

There are three versions of the OS out to date

10240 - The fully released version
10531 - Added support for 17 GPIO pins - not available for download now
10556 - Added support for the Official Screen, Serial Rx/Tx and more - only available from the Microsoft Insiders web site

https://ms-iot.github.io/content/en-US/Downloads.htm

Release notes 10240
https://ms-iot.github.io/content/en-US/ ... tesRTM.htm

Release notes 10556
http://ms-iot.github.io/content/en-US/w ... eNotes.htm
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 10:11 am

34. Is there an easier way to convert Windows Store 8.1 or Windows Phone 8.1 (not Silverlight) projects into Windows 10 UAP applications

https://canbilgin.wordpress.com/2015/04 ... indows-10/
Retarget Projects to Windows 10

"Following the changes to the project structure and the appxmanifest schema changes, I decided to put together a little Visual Studio 2015 Extension to upgrade the existing Windows Store 8.1 or Windows Phone 8.1 (not Silverlight) projects to Windows 10 UAP applications."
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 10:25 am

35. When will support for xxxxxx be added to Windows 10 Core IoT?

Sooner, Later, Sometime, Never.

The only people who actually know what is on the schedule for the next release of the OS is Microsoft (and they are not saying).

Keep pushing them to add in support for whatever it is you wish them to add sooner rather than later (and stay up with the Insiders program). Otherwise wait until support for your particular request arrives in the released version.
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 10:39 am

36. Is the Official Raspberry 800*480 screen supported by Windows 10 Core IoT

Microsoft added support for the screen in Insider Preview 10556

viewtopic.php?f=105&t=123420&p=831416#p831416

No Touch yet though :-(
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 10:57 am

37. What is the simplest way to GET 'stuff' from a remote Web or REST server in C#

Code: Select all

//using System.Net.Http;
using Windows.Web.Http;
...
...
            // Create a New HttpClient object and dispose of it when done.
            using (HttpClient httpClient = new HttpClient())
            {
                // Call asynchronous network methods in a try/catch block to handle exceptions
                try
                {
                    Uri uri = new Uri("http://www.contoso.com/");
                    HttpResponseMessage response = await httpClient.GetAsync(uri));
                    response.EnsureSuccessStatusCode();
                    string responseBody = await response.Content.ReadAsStringAsync();
                    //var buffer = await response.Content.ReadAsBufferAsync();
                    //var stream = await response.Content.ReadAsInputStreamAsync();
                    // TODO: Do something with the responseBody
                }
                catch (Exception ex)
                {
                    // TODO: Deal with exception - could be a server not found, 404, etc.
                }
            }
Last edited by ricl on Fri Oct 23, 2015 2:21 pm, edited 6 times in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 11:18 am

38. What is the simplest way to POST 'stuff' to a remote REST sever in C#

Code: Select all

//using System.Net.Http;
using Windows.Web.Http;
...
...
            // Create a New HttpClient object and dispose of it when done.
            using (HttpClient httpClient = new HttpClient())
            {
                httpClient.DefaultRequestHeaders.Add("Cache-Control", "no-cache");

                // Call asynchronous network methods in a try/catch block to handle exceptions
                try
                {
                    //HttpStringContent stringContent = new HttpStringContent("test data");
                    //HttpStreamContent streamContent = new HttpStreamContent(new InMemoryRandomAccessStream());
                    //HttpBufferContent bufferContent = new HttpBufferContent(new Windows.Storage.Streams.Buffer(100));

                    Uri uri = new Uri("http://{myRESTserver}/{myRESTservice}?{parameters}");
                    HttpResponseMessage response = await httpClient.PostAsync(uri, null); 
                    // or add content (see above) as required in place of the null
                    response.EnsureSuccessStatusCode();
                    string responseBody = await response.Content.ReadAsStringAsync();
                    // TODO: Do something with the responseBody
                }
                catch (Exception ex)
                {
                    // TODO: Deal with exception - could be a server not found, 401, 404, etc.
                }
            }
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 2:53 pm

39. My C# application leaks memory #3

Code: Select all

            // For objects that use .Dispose()
            // https://msdn.microsoft.com/en-us/library/b1yfkh5e(v=vs.110).aspx
            // like
            // HttpClient riskyObject = new HttpClient();
            // ...
            // riskyObject.Dispose();
            //
            // replace with the below where possible as .Dispose() will then be called 
            // automatically if Exceptions occur

            using (HttpClient httpClient = new HttpClient())
            {
                //...
            }
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Fri Oct 23, 2015 10:29 pm

40. How do I write an application to play music on Windows 10 Core IoT

For local files in the Music Library then (assuming you have a MediaElement mediaElement declared in your xaml)

Code: Select all

            var storageFile = await KnownFolders.MusicLibrary.GetFileAsync("Test.mp3");
            var stream = await storageFile.OpenAsync(FileAccessMode.Read);

            mediaElement.SetSource(stream, storageFile.ContentType);
            mediaElement.Play();
For network files then use something like

Code: Select all

           mediaElement.Source = new Uri("http://some_path_to_some_music/music.mp3"); //See docs for file types
           mediaElement.Play();
...
...
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Sat Oct 24, 2015 12:01 am

41. How do I find worked out examples with explations of how to...

Build a WeatherStation
https://microsoft.hackster.io/en-US/win ... -10-5b818f

Use Windows Remote Arduino
https://microsoft.hackster.io/en-US/win ... ino-47eeb9

Make an FM radio
https://microsoft.hackster.io/en-US/jav ... 767-029377

Run a PowerShell Script on Startup
https://microsoft.hackster.io/en-US/fal ... tup-0aa534

Build a Quadcopter
https://www.hackster.io/Biscuits24_/pil ... &offset=13

those and and many, many more at
https://microsoft.hackster.io/en-US
...
...
Last edited by ricl on Tue Oct 27, 2015 10:21 pm, edited 1 time in total.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Windows 10 Core IoT FAQ (Unofficial)

Sat Oct 24, 2015 12:19 am

42. Which GPIO pins can I use

Running a slightly modified version of https://github.com/ms-iot/samples/tree/ ... ioTestTool to output to a file

On Insider Preview 10556 it reports

The default GPIO controller has 54 pins:
Pin 4 is available
Pin 5 is available
Pin 6 is available
Pin 12 is available
Pin 13 is available
Pin 16 is available
Pin 17 is available
Pin 18 is available
Pin 19 is available
Pin 20 is available
Pin 21 is available
Pin 22 is available
Pin 23 is available
Pin 24 is available
Pin 25 is available
Pin 26 is available
Pin 27 is available
Pin 35 is available
Pin 47 is available
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

Return to “Windows 10 for IoT”

Who is online

Users browsing this forum: No registered users and 7 guests