A plug-in to OSDP.Net with a drop-in replacement of the SerialPortOsdpConnection
that uses SerialPortStream instead of the built-in System.IO.Ports.SerialPort
.
System.IO.Ports.SerialPort
is fraught with problems. If you experience stability issues with serial ports in OSDP.Net, it might be a good idea to test this connection instead.
Install the nuget.
dotnet add package OSDP.Net.SerialPortStreamOsdpConnection
Use it in code.
var controlPanel = new ControlPanel();
controlPanel.StartConnection(new SerialPortStreamOsdpConnection(port, baudRate));