jcurl / RJCP.DLL.SerialPortStream

SerialPortStream is an independent implementation of System.IO.Ports.SerialPort and SerialStream for better reliability and maintainability. Default branch is 2.x and now has support for Mono with help of a C library.
Microsoft Public License
624 stars 197 forks source link

Unsupported baud rate error on Raspberry4 #98

Closed ningjx closed 4 years ago

ningjx commented 4 years ago

errormessage:[Unsupported baud rate (0; Invalid argument)] while init with baud rate 100000,but 115200 is ok

ningjx commented 4 years ago

at RJCP.IO.Ports.Native.UnixNativeSerial.ThrowException() at RJCP.IO.Ports.Native.UnixNativeSerial.set_BaudRate(Int32 value) at RJCP.IO.Ports.SerialPortStream.set_BaudRate(Int32 value)

jcurl commented 4 years ago

I would expect the behaviour specified. Libnserial uses standard Linux STTY code and polls for particular baudrates. If there are other baudrates not being checked by the build system (such as 100k) but is defined by your OS, libnserial needs to be patched.