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

RtsEnable crashes on raspberry pi / linux #62

Closed onionhammer closed 6 years ago

onionhammer commented 6 years ago

If setting 'RtsEnable' on nix, a bad file descriptor error occurs

 var port = new SerialPortStream(portOptions.Path)
            {
                BaudRate     = (int)portOptions.BaudRate,
                DataBits     = portOptions.DataBits,
                Parity       = ConvertParity(portOptions.Parity),
                StopBits     = ConvertStopBits(portOptions.StopBits),
               /// RtsEnable  = true/false,  /// <--- Causes crash "bad file descriptor"
                ReadTimeout  = portOptions.ReadTimeoutMs,
                WriteTimeout = portOptions.WriteTimeoutMs
            };

Edit2: updated description; RtsEnable = true/false just crashes on linux before port is Open()ed

jcurl commented 6 years ago

Thanks for the report. Can you say what version of libnserial that you're using?

onionhammer commented 6 years ago

@jcurl I built it from source / master

jcurl commented 6 years ago

Implemented in HEAD.