Access Serial Ports in Windows 10 IoT App

0 votes

I am working on a Windows IoT universal app and I need access to a serial port. Normally I would use:

using System.IO.Ports;

But that code is generating an error saying that the namespace does not exist and I can't find a reference to add to fix it.

Oct 10, 2018 in IoT (Internet of Things) by Matt
• 2,260 points
79 views

1 answer to this question.

0 votes

On Windows IoT you have to use Windows.Devices.SerialCommunication namespace to access serial ports. You have to have Windows 10 IoT Extension SDK (installer should be bundled with the Windows 10 image file for you board, you have to register there for downloads to be availble) installed and added as reference to be able to access that namespace.

Keep in mind though that if you use Raspberry Pi onboard UART will be inaccessible anyway, as it is used for kernel debugger.

answered Oct 10, 2018 by anonymous2
• 4,260 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
129 views
0 votes
1 answer

Sending keys in Windows 10 IoT

Sorry, but it is not allowed in ...READ MORE

answered Dec 4, 2018 in IoT (Internet of Things) by Shubham
• 13,310 points
46 views
0 votes
1 answer

USB Mobile Broadband Modem on Windows 10 IoT

I was looking for a solution too, ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
453 views
0 votes
1 answer

Autostart published Application on Windows 10 IoT

It can be done by making changes ...READ MORE

answered Jul 12, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
186 views
0 votes
1 answer

Problem disposing of socket

If this object is eligible for garbage ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,190 points
41 views
0 votes
1 answer

Testing your code for speed?

What you are describing is known as ...READ MORE

answered Nov 13, 2018 in IoT (Internet of Things) by Upasana
• 8,550 points
22 views
0 votes
1 answer

Sending a POST in UWP using C#

I couldn't find any proper documentation and ...READ MORE

answered Jan 10 in IoT (Internet of Things) by nirvana
• 3,060 points
107 views
0 votes
1 answer

Configuring a Windows 10 IoT App for Automatic Restart

Have you tried using powershell right after ...READ MORE

answered Oct 10, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
51 views
0 votes
1 answer

Configuring Raspberry Pi with Windows 10 IoT App using Rest API

You should use HttpClient instead of WebClient. Try ...READ MORE

answered Oct 10, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
100 views