Hi corefx Team,
please provide a .NET Core API that offers classes and interfaces for serial port communication like the ones available inside the .NET Framework.
.NET Framework documentation for System.IO.Ports:
https://msdn.microsoft.com/de-de/library/system.io.ports(v=vs.110).aspx
There is also a Universal Windows Platform API for serial port communication available:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.serialcommunication.aspx
Now only a cross plattform .NET Core API is missing.
You may ask why do we need cross plattform serial port communication support.
The answer is:
There are a lot of devices used in the industry that have to communicate through the serial port.
e.g.
So there are many applications out there that must communicate through the RS232 Port.
If we take into account that many customers are using other operating systems (Linux, MAC) or more than 1 OS inside the company, than we have to adapt our source code be able to support those operating systems.
It makes sense to have a unified codebase for such applications.
There is a need for a cross plattform version of the System.IO.Ports Namespace so please corefx Team think about it.
Maybe - if you decide to port the API over to .NET Core - you could also have a look at some problems of the current .NET Framework implementation of the SerialPort class that are mentioned here:
1) http://www.sparxeng.com/blog/software/must-use-net-system-io-ports-serialport
2) http://zachsaw.blogspot.de/2010/07/net-serialport-woes.html
+1 for this but it's a dup dotnet/runtime#14275
Closed this issue because it is a duplicate like Maxwe11 mentioned.
@SariDev copy your post there, maybe it's speed up progress :smile:
@Maxwe11
Just like you, I would like to see a cross plattform .NET Serial Port API.
But after I read the Issue dotnet/runtime#14275 I have to agree with some of the guys over there.
If the .NET Core API is intended to only offer "userfull" API's for all .NET capable devices (PC's, Phones, Tablets) than SerialPort would not fit into the .NET Core Framework in my opinion.
Phones and Tablets don't have an RS232 Port, so only PC's would benefit from these API's.
That would make the Framework "cluttered" for all the phone and tablet only developers.
A portable class library NuGet package should be a perfect solution.
Therefore i don't copy my post over there
@SariDev I wouldn't call it useless for mobile targets. There are GSM modems that operate connected as /dev/ttyUSB*. I have developed .NET software to interface with them myself. In fact, the device I connected to offered its bring-up console via serial as well. So I would say that maybe end-users and mobile app developers aren't interested, but systems and device manufacturing developers certainly are.
Please note UWP's implementation is not really useful implementation as it simply does not support system-internal or on-chassis serial ports (read plain RS232).
Agreed. Please add native (on board) serial access support to UWP - useless otherwise ;/
I support this issue
Most helpful comment
@SariDev I wouldn't call it useless for mobile targets. There are
GSMmodems that operate connected as/dev/ttyUSB*. I have developed .NET software to interface with them myself. In fact, the device I connected to offered its bring-up console via serial as well. So I would say that maybe end-users and mobile app developers aren't interested, but systems and device manufacturing developers certainly are.