-
Notifications
You must be signed in to change notification settings - Fork 12
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
MacOS Failed to apply some or all settings #44
Comments
Same issue here, some notes here: |
A bit more info, definitely something around changing the baud rate. Changing any other settings seems to work normally, but changing the baud rate breaks it. Seems like it might be related to this possibly?
Setting it back to 9600 DOES work but so far any other number fails |
Argh, I think it must be related to PR #39 (to fix issue #38). Initial tests seemed to show that the custom speeds set that way are reported back in Sadly, if this is true, then there seems to be no way to retrieve the actual baud rate on OS X after we use the To verify this, you can create the serial port with baud rate 9600, and then change the configuration afterwards. While it will report failure, it might actually have set the baud rate, so you might still be able to use the serial port. If that works, could you see what |
You're correct
And also get_configuration does show the correct speed even after the error message Yea for now I've ignored the error on macos, the target is linux and so far its fine there so not a huge deal but should maybe be addressed in the lib somehow. |
I agree. I wonder is how stty manages to get the correct speed. Is it possible to use something like /edit: Nevermind, I think this was just an oversight in checking the desired and actual speed on Mac OS. I'll try to fix it now. |
Could one of you test #45 on an Apple machine? Sadly I don't have access to one :( |
That seems good to me 👍 |
Did you check if it works as expected? I'm still nervous the speed might not be reported back correctly with |
Well, I actually can't use it at all on macos. Not sure why but it blocks forever when trying to write a single byte to any usb adapter so not sure I'd be a great test. But it did succeed and stty says the speed changed. |
Does it at-least not report an error on opening the serial port or applying the baud rate anymore? /edit: I also want to figure out that issue, but let's do one at a time 😄 |
Correct, no longer throws an error |
Thanks for testing it! And thanks @DonavanMartin and @bailout00 for reporting the issue and providing information! Released as v0.2.28. I will also bump |
serial2-rs/src/sys/unix/mod.rs
Line 163 in 4b9413d
I'm unable to connect port with MacOS: "/dev/tty.usbserial-DK0I847P": "ValidationError: StdError(Custom { kind: Other, error: "failed to apply some or all settings" })"
I think their's something misconfigured with baud rate.
Windows and Debian are working properly.
The text was updated successfully, but these errors were encountered: