Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RtsEnable crashes on raspberry pi / linux #62

Closed
onionhammer opened this issue Jul 12, 2018 · 3 comments
Closed

RtsEnable crashes on raspberry pi / linux #62

onionhammer opened this issue Jul 12, 2018 · 3 comments
Labels

Comments

@onionhammer
Copy link

onionhammer commented Jul 12, 2018

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

@onionhammer onionhammer changed the title RtsEnable depends on port being open? RtsEnable crashes on raspberry pi / linux Jul 12, 2018
@jcurl jcurl added the bug label Jul 17, 2018
@jcurl
Copy link
Owner

jcurl commented Jul 17, 2018

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

@onionhammer
Copy link
Author

@jcurl I built it from source / master

jcurl added a commit that referenced this issue Aug 17, 2018
On Windows, one can already set the RTS and DTR flags. They are cached before the serial port is opened. On Unix, an exception would be raised, due to the serial port not being opened.

Allow consistency between Windows and Unix. The libnserial library implements this caching, so it must be compiled and redeployed.

Issue: #62, DOTNET-168
@jcurl jcurl closed this as completed Aug 17, 2018
@jcurl
Copy link
Owner

jcurl commented Aug 17, 2018

Implemented in HEAD.

digitalcoyote pushed a commit to digitalcoyote/SerialPortStream that referenced this issue Jul 3, 2019
On Windows, one can already set the RTS and DTR flags. They are cached before the serial port is opened. On Unix, an exception would be raised, due to the serial port not being opened.

Allow consistency between Windows and Unix. The libnserial library implements this caching, so it must be compiled and redeployed.

Issue: jcurl#62, DOTNET-168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants