Configuring Windows IoT Development Environment

 General audience classification icon  General audience classification icon  General audience classification icon
This chapter describes the typical programming technics used in Raspberry Pi board development projects.

Raspberry Pi Under Windows 10 IoT Core

To create and develop control applications on the Raspberry Pi boards, one needs the following development components:

  • PC with Windows 10 System installed,
  • Visual Studio 2015 or higher,
  • Raspberry PI 2 or 3 board with Windows 10 IoT Core installed,
  • configured TCP/IP network for Raspberry Pi and Windows 10 Desktop computer (Local LAN or WiFi subnet),

A list of programming skills necessary to seamlessly develop for Windows IoT is listed below:

  • C# language knowledge,
  • XML/XAML language knowledge,
  • Windows API understanding.

The Windows IoT Remote Client is welcome for a better development experience of Raspberry applications. This application is available for download from the Microsoft Store. This application captures the keyboard, mouse and screen from the Raspberry Pi board running the Windows 10 IoT Core system on the desktop PC. It allows developers to use a standalone Raspberry board without a connected mouse, keyboard or monitor (figure 1).

 Microsoft Store -- Windows IoT Remote Client
Figure 1: Microsoft Store – Windows IoT Remote Client

To write and develop applications under Windows 10 IoT Core, developers must know how the Windows operating system interacts with User applications. The advantage of using Windows 10 IoT Core is that Microsoft's concept uses the same Kernel API available on different hardware platforms – desktop PCs, IoT boards suitable to run Windows Core, tablets, etc. It reduces development costs due to the unifying system environment, and the only difference is in the display view of the same application code written in C#/C++. Windows 10 Core is specially designed to handle applications working as standalone on the IoT platforms in a 24/7 time model.

Configuring the Windows 10 IoT Core Platform

After installing the Windows 10 IoT Core, the developer must configure the IoT platform using Windows Device Portal (WDP, figure 2).

 Windows Device Portal view
Figure 2: Windows Device Portal view

IoT board can be managed using Chrome, Microsoft Edge, Firefox, and any Internet browser. To open the WDB portal on the IoT board, the user must enter the board IP address – IPaddress:8080/default.htm. The site is protected with a username/password. Default account credentials are: administrator/p@ssw0rd. Following tabs in the WDP, it is possible to configure all necessary IoT platform settings, check the current board status, download development crash/debug information, configure network/Bluetooth settings, download drivers, and configure security TPM modules. If all tasks are ready, the developer can start to write his own IoT application under Windows 10 IoT Core.
The following steps are recommended before the IoT board will be used for application:

Step 1
In the Device Settings, the user is recommended to Change your device name. The default name is minwinpc. The aim to change it is that if a user uses many IoT devices connected to the same network segment, it is challenging to recognise which role each device is set for. Enumerating IoT devices will show boards with the same name but different IP addresses. Proper naming will make it easy to know what role each device plays.

Step 2
Because RPI boards don't have their own RTC clock modules, Windows 10 IoT Core sets the time using the NTP services during its work. So, very important in industrial implementations, and a case when time is essential in developed applications, is to set the proper time zone for the board. In the Device settings, the user is recommended to select the appropriate Time zone

Step 3
Security reasons – the default password for the newly flashed device is p@ssw0rd. It is strongly recommended right after the first board boot to change it to make it unique! It will prevent the IoT device from remote hacking. The password can be changed in the Device Settings tab.

Step 4
The Windows 10 IoT Core comes with Cortana service ready. If the board has a microphone and speakers, it is always possible to turn the Cortana service on for voice commands communication with the board.

Step 5
If the IoT board needs special hardware connected, then in the Devices/Device Manager, the user can upload and install an appropriate driver for it in case it is not preinstalled in the IoT Core (figure 3).

 Device Manager view
Figure 3: Device Manager view

Step 6
Raspberry Pi boards 1/2/3 are equipped with network connection modules. If the board under Windows 10 IoT Core is connected to a LAN RJ45 connector, the IP number can be set via the DHCP server. If the user wants to use a WiFi connection or activate Bluetooth, he can do it directly on the board main display or manage it via the Windows Device Portal as present in figures 4 and 5.

 Network & WiFi view
Figure 4: Network & WiFi view
 Network view
Figure 5: Network view

Step 7
Security. In a case when an IoT device must be protected from remote hacking, one of the solutions is to use a Trusted Platform Modules (TPM) module following ISO/IEC 11889 standards for a secure cryptoprocessor, a dedicated microcontroller designed to secure hardware through integrated cryptographic keys. The chip contains physical security mechanisms to protect it from tampering, and malicious software cannot hack the TPM security functions. Some of the TPM key advantages are:

  • generate and store the cryptographic keys,
  • use the TPM unique RSA key technology for platform device authentication, which is burned into the chip,
  • help ensure platform integrity.

The most common TPM functions are used for system integrity measurements, key creation and use. The boot code (including firmware and OS components) is loaded during the system boot process and can be measured and recorded in the TPM module. The integrity measurements are used to show how the OS started and to be sure when the correct boot software was used with the TPM-based key. Windows 10 IoT Core supports a few TPM module standards, which can be connected to the 40-pin GPIO connector (figure 6).

 TPM module view
Figure 6: TPM module view

Under the TPM Configuration tab in the Windows Device, the Portal user can select the proper communication protocol for the TPM module installed in the Raspberry Pi board. Then, the appropriate driver for the TPM module can be installed in the Device Manager tab (figure 7).

 TPM Configuration view
Figure 7: TPM Configuration view
en/iot-open/getting_familiar_with_your_hardware_rtu_itmo_sut/raspberrypi_rpi/setting_up_programming_environment_winiot.txt · Last modified: 2024/05/27 11:04 by ktokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0