Page 1 of 1

Access to Serial Port from UAP?

Posted: Sun May 17, 2015 5:12 pm
by hlyates
My colleague attempted to access the serial port from UAP. It failed. Is this not supported for UAP in Windows 10 and IoT? It seems maybe not when I read [url][https://social.msdn.microsoft.com/Forum ... evices/url]. I realize that UAP for IoT is not a metro app or even a 8.1 windows universal app, but it does seem that Windows Universal Apps are based heavily on those technologies and inherited their weaknesses?

If there is an example of a UAP that can access serial ports and more. Could you please point out the GitHub source code so I can give it a try and maybe answer this question in a meaningful way please? Thank you so much. :)

Re: Access to Serial Port from UAP?

Posted: Mon May 18, 2015 5:57 pm
by GerritV
There is a thread elsewhere here outlining what the present state of serial support for WinIoT is, namely usb adapters only. The pin header serial on the RPi is used for WinDbg purposes at the present time. MS might enable use of the hardware serial io port when WinIoT is final release or it might not depending on priorities.

Serial IO using usb is described here: https://msdn.microsoft.com/en-us/librar ... ation.aspx Eventually you get to a DataReader which gets the stuff from the wire for you. Can do async calls, etc. The Serial Device class supports modem controls, events on modem control line change etc.

I am just digging through this stuff myself for an Xbee/Zigbee stack so can't provide much more info yet.

You need to reference Windows.Devices.SerialCommunications e.g. with #using and also add a Reference to WinIoT Extensions (in projects/Add Reference) in Visual Studio 2015RC

Gerrit