1,第一次打开串口报错:System.UnauthorizedAccessException: Access to the port 'COM1' is denied.
2,然后通过设备管理器,禁用串口,在启动串口后
3再次打开串口,报错,System.IO.IOException: 函数不正确。
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.InternalResources.WinIOError()
at System.IO.Ports.SerialStream.SetBufferSizes(Int32 readBufferSize, Int32 writeBufferSize)
at System.IO.Ports.SerialPort.Open()