-
Notifications
You must be signed in to change notification settings - Fork 49
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
RTS being set high on port connection #195
Comments
Assuming you are on Windows then the code in SerialIoHandlerWin::ConfigurePortImpl() is relevant here. If hardware flow control is disabled then the It should be possible to lower them after opening the port with The two solutions to fix this at an API level would be to support calling |
About the second paragraph, I did test setting it right after the open method, but as you said, our device is affected by any alteration in the RTS line. What you suggested in the third paragraph would be ideal, as we have tested with the electron-serialport library on node.js running locally and if we had a way to set the RTS upon opening the port, that would be perfect. But my main concern with an API level change would be whether or not this change would be easy to dissipate for users of our application. |
An API-level change would need to be specified and implemented before it could roll out to your users. Unfortunately it seems like there isn't any workaround given the current API design. |
Do you if there is another option of API or is this one really the only one we can use on web browsers? I know the answer is probably no, but we really needed to solve this ASAP. |
After doing a bit more research it looks like setting the initial RTS and DTR state is only supported on Windows. macOS and Linux systems will always assert these pins when the port is opened. At best this means that if we implemented the option to control the signal state when the port is opened the lines would flash briefly into the high state before being reset during initial port configuration. I recommend working with your hardware vendor to not reuse the RTS line for an unintended purpose. |
I'm using the API to make a connection with a UART to USB adapter, the CP2102, and everytime I make a fresh connection with it, by fresh I mean disconnecting the USB cable entirely, the RTS(Request To Send) pin gets set high, even with flowcontrol disabled(set to 'none'), and that is a very big problem for me as the RTS pin of the chip is being used for a very important purpose and this kind of behavior isn't very suited for our application. The code for the actual application is proprietary to the company I work at, but below is a simple code that has the same problem.
I've tested a couple of things already:
I don't know if I'm missing some critical piece of code or if I'm using something wrong. I've even tried reading the Blink implementation C code to try and understand if there was a problem in the abstraction layers or something like that.
The text was updated successfully, but these errors were encountered: