enricosavazzi
Posts: 14
Joined: Thu Jan 21, 2016 10:06 am

Re: Missing C# library classes?

Sun Jan 31, 2016 7:08 am

mimi123 wrote:
enricosavazzi wrote:
mimi123 wrote: Build with ARM instead of AnyCPU, it may fix something if you didn't do it already
Already done in above tests, with the results described above.

To make it clearer, the code does not work in a Windows Universal app (regardless of platform: Win32, Win64, ARM). It works if I copy the same code into a Windows Console or Windows Forms application.
Build a Console app and run that on a RPi, API not accessible from Universal
Exactly how does one deploy and run a Win32 console application on the RPi?

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

Re: Missing C# library classes?

Sun Jan 31, 2016 9:07 am

Well one that is quite useful is the GPIO test tool (there are loads of others in C and C++)

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

"GpioTestTool Sample

This sample has been verified to work with the following configuration:

Windows 10 IoT Core: version 10.0.10586.0; Visual Studio: Visual Studio 2015 update 1; Windows SDK: version 10586 (Included with Visual Studio Update 1. Check Visual Studio install options)

View the code on GitHub https://github.com/ms-iot/samples/blob/ ... l/main.cpp

GpioTestTool is a simple utility that allows you to write and read GPIO pins on the command line. GpioTestTool is written in standard C++ and consumes the Windows.Devices.Gpio WinRT APIs at the ABI level with the help of the Windows Runtime Library (WRL). These techniques can be used to consume most WinRT APIs from native applications."
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

enricosavazzi
Posts: 14
Joined: Thu Jan 21, 2016 10:06 am

Re: Missing C# library classes?

Fri Feb 05, 2016 3:01 pm

enricosavazzi wrote:I may have found an answer:
http://stackoverflow.com/questions/3475 ... g/34756693
I do not have time to test this right now, but it is interesting that these questions are being asked by others. If this is true, then we must forget what we already know about Windows networking APIs and use completely different network APIs in Windows Universal apps, including Windows IoT on the Raspberry Pi.
Replying to my older post, the above seems to be a dead end. The closest one gets to a ping functionality is trying to open a TCP connection to a port on the host. Of course, this works only if a process on the host is listening to the same port (e.g., 80 for HTTP) and accepts the connection. This is not what I need, but in the lack of anything else it might suffice if the goal is occasionally verifying that Internet connectivity exists. However, it would be wasteful to download the Microsoft, Google or Youtube home page every 5 minutes just to check for Internet connectivity. One's ISP's gateway would also be a primary target for pinging for this purpose, but these gateways rarely run publicly accessible HTTP servers or similarly accessible TCP/UDP services.

The general consensus I found is that ICMP is not available from a Windows Universal app. However, there are "Ping" apps in app store that promise some sort of connectivity test. I don't know if they provide true ICMP or just connection to a TCP or UDP socket on the host, with the limitations mentioned above.

Return to “Windows 10 for IoT”