Is there a .net implementation for openthread - openthread

I have been working to connect to a device to a dongle using OpenThread.
I am looking for a .Net Implementation of Openthread.
There is a Zigbee implementaion for .net called ZigbeeNet.

Looking at ZigbeeNet it appears to be a library to interface with Zigbee device over a COM port, so I'm assuming you're also targeting .Net on Windows. The equivalent would be a Network Co-Processor host implementation in OpenThread terminology and unfortunately there isn't a direct .Net implementation. Microsoft implemented a Windows 10 NCP driver which would have been a good starting point, but unfortunately they've dropped support. It still may work but YMMV.
It is possible to run the UNIX host wpantund in a VirtualBox VM and run your .Net application in the guest.

Related

Windows 10 IoT - Supported bindings

According to
https://msdn.microsoft.com/en-us/library/system.servicemodel
the Windows Universal Platform supports the NetHttpBinding. In Visual Studio, I can develop a simple WCF client using this binding, without errors. I can use the NetHttpBinding class of the ServerModel namespace. When I deploy the client to a Raspberry Pi 2, a
PlatformNotSupportedException
occurs.
Which WCF bindings are really supported by Windows 10 IoT?
There is almost no information available public about WCF client profile for windows 10 IoT, but I think it's very easily for you to test them. It's still a prerelease preview, so it's really possible.
To move forward, I think you can use HttpClient in System.Net.Http namespace to consume restful service. check Jeff Sanders's blog.

Handle Wcf wsHttpBinding on Linux

I'm involved in a project with many others companies. We started to develop our systems at the same time but only at the end the communication problem was taken into account.
I've developed my system on Linux with Mono (Linux is mandatory for me). I have to communicate with a Windows .Net system which is exposing a Wcf web services. Unfortunately they told me only now they are using wsHttpBinding and I've just discovered that this communication protocol is not supported by Mono.
I'm here to ask if there is a way to communicate with that web service. They are not going to change the wsHttpBinding because is used by many other companies. I cannot change my OS and my code base is too big to leave Mono now. I can only add a layer (always on Linux) between my Mono implementation and their web services.
Any suggestions?
Microsoft has recently released the .NET source code as MIT licence (open source).
This means that, if something is not supported by Mono, you can just bring the code yourself and incorporate it, so that it becomes officially supported.
Some Mono developers have actually been doing this the past weeks to incorporate things that they had not implemented yet. So you could bring the wsHttpBinding along to Mono. An example of such a change is this commit.

Standard mDNS service on Windows

Does Windows (some modern flavour) have an mDNS server installed and/or running by default? If so then how does one tell it, preferably dynamically, to start/stop advertising a new service?
If there is no standard then how does one deal with the problem of conflicts trying to run multiple mDNS servers in that environment?
Basically, I want to implement a service that will run on Linux, Windows and Mac OS X and which needs to advertise its zeroconf webserver location using mDNS. On Linux I just use avahi-publish (or install a config file). I'm guessing that the answer will be straightforward for OS X. I'm struggling to find information for Windows.
Starting with Windows 10, Microsoft made strides towards a native Windows implementation of mDNS and DNS-SD.
While earlier iterations have been limited to UWP apps, a general Win32 API has been exposed from at least SDK version 10.0.18362.0 (1903/19H1, May 2019).
Note: This implementation is currently confirmed working only for 64bit build targets, there is an open issue preventing compilation for 32bit targets.
Outdated note from a previous version of this answer:
Early iterations resulted in mDNS network flooding:
Windows 10, in its default configuration, will spam its local networks
by responding to all mDNS requests with null response packets.
This issue was fixed in Windows 10 1511 (10586) and above
Last time I needed one, Apple's Bonjour Print Services for Windows was the most convenient mDNS client for Windows I could find. Only 5MB.
No, Microsoft doesn't directly support Multicast-DNS.
However, there appear to be several 3rd-party alternatives:
http://bens.me.uk/2013/multicast-dns-and-development-virtual-machines
http://en.wikipedia.org/wiki/Bonjour_%28software%29
http://www.icir.org/gregor/tools/autoconf-protocols.html
http://www.zeroconf.org/
... and ...
http://blogs.technet.com/b/networking/archive/2008/04/01/how-to-benefit-from-link-local-multicast-name-resolution.aspx
Have also successfully used C++/WinRT for dnssd discovery directly from C++ now. It appears from our perspective to be quicker and more reliable to query services and will let you easily install a watcher to get notifications when devices arrive etc. Of course, this is limited to versions of Windows 10 with support for C++/WinRT, which starts with 10.0.17134.0 (Windows 10, version 1803).
One caveat: We've noticed that it does not provide, nor recognise, a FQDN (trailing dot). So for a device that Bonjour OR Avahi would give an address of mydevice.local., Windows instead gives mydevice.local. Attempting to ping mydevice.local. under Windows 10 (1809) fails.
Windows 10 supports natively mDNS/Zeroconf, but only for modern APIs, not for Win32 applications.
If you have such an application, a third party service is required.
Source: https://social.technet.microsoft.com/Forums/en-US/8a0346de-2296-4f46-bc36-ff3fb13e283b/builtin-mdnsdnssd-zeroconf-support-in-windows-10
The short answer is to support both Avahi and Bonjour. You'll need Bonjour support to run on OSX anyway, and if a Windows user has installed iTunes they'll already be running it.
As a fallback for Windows users not running iTunes, you can compile Avahi as a library for Windows (with a bit of effort) and bundle it. This is a non-trivial bit of packaging, but the alternative is requiring your Windows users to install iTunes in order to use your application.

How to implement a SSL server on Windows CE

I need to implement a server running on Windows CE 5.0 that shall communicate on a secure connection. To implement a secure connection SSL looks like a good choice.
The Windows CE 5.0 Winsock implementation allows to implement all the SLL stuff using the Winsock Secure Sockets. But the problem is that the referred site states:
SSL does not support the following Winsock functionality ... "Calls to the accept function".
How can I implement a SSL secured server when accept will not work? What other options do I have to implement a secure connection to a Windows CE 5.0 device?
Edit: My current application implementation is in C++. So I would prefer an approach that use the Windows API or a C++ library.
We ported the Mentalis Secure Socket Library to the Compact Framework for when we needed SSL. It was fairly painless, though not without its bugs.
MatrixSSL supports Windows CE:
MatrixSSLâ„¢ is an embedded SSL and TLS implementation designed for
small footprint applications and devices. Available is a fully
supported, commercial version as well as an open source version that
is available for download. MatrixSSL allows secure management of
remote devices. Several secure embedded Web servers also use MatrixSSL
for their encryption layer.
MatrixSSL has been ported to operating systems including
FreeRTOS, Bare Metal, eCos, VxWorks, uClinux, eCos, FreeRTOS, ThreadX,
WindowsCE, PocketPC, Palm, pSOS, SMX, BREW, MacOS X, Linux and
Windows.

Use communication channel in Wind River VxWorks Simulator

I have a host PC and a target hardware. On the host PC, I have .NET application and on the target I have a real time process, the target and the host communicates using Ethernet channel.
What I want to do now is to run the real time process on the vxsim.
Is there a way to make the process (running on vxsim) communicate with the .NET application that runs on the same PC.
P.S.
I use VxWorks 6.6 and Workbench 3.0
You can run vxsim on your Windows machine and communicate with it over IP using simnet. See the VxWorks Simulator userguide for how to set this up.
For this you would need a vxworks simulator that can be provided in full source code format which then can be compiled with hooks using .NET native tools. Such a simulator is provided by MapuSoft:
http://www.mapusoft.com/os-simulator/
Regards,
Raj