Posts: 3
Joined: Fri May 08, 2015 5:13 pm

Access to Serial Port from UAP?

Sun May 17, 2015 5:12 pm

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. :)

Posts: 91
Joined: Fri May 01, 2015 4:16 pm
Location: St Catharines, ON
Contact: Website

Re: Access to Serial Port from UAP?

Mon May 18, 2015 5:57 pm

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


Return to “Windows 10 for IoT”