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
Not able to re-open a closed port #18
Comments
Do you mean you use I think the bug is due to Singleton mode. Maybe using |
I can confirm that switching the first code snippet to: try {
port = SerialPort(dropdownvalue, openNow: false, ByteSize: 8);
port.open();
} on Exception catch (_) {
print("can't open port, exiting...");
return;
} And thus using |
I have the package working pretty solidly for reading out data from a serial port. However when I try to re-open a port after closing it I am not able to do so and the
SerialPort()
function does not throw any exceptions.I use this to connect to a serial port:
The first time it works like a charm. Then I disconnect the port by calling:
The port is closed properly because I am able to open it with other software but when I try to connect to it again with
SerialPort()
it doesn't fail but the COM port is not opened. Not sure if this is a bug in the close function or that I am missing something. Help would be appriciated, thanks!The text was updated successfully, but these errors were encountered: