-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
support for non standard baud rates if tcsetattr fails #49
Conversation
I'm struggling a bit with this because non-standard baud rates are not universally supported. For example, after this change, setting the baud rate to 128000 on my Keyspan adapters seems to work. This could be worked around if it were possible to reliably read the actual baud rate of the port, but as far as I can tell, baud rates set with This is essentially the same issue that caused me to hesitate on #45. It seems like the options are:
Any thoughts? |
This is an issue related to OS X and Linux as discussed in various forums around the net. It seems like some 3rd party drivers (like the one I tested) are supporting these bitrates but the OS definately does not and most probably will not. For this I favour your suggestion of introducing a property for this behaviour. Most probably it should be off by default as this is what you would expect from the OS side. I vote for a allowsNonStandardBaudRates property with a default value of NO. Andreas Zöllner Absender: Andrew Madsen notifications@github.commailto:notifications@github.com I'm struggling a bit with this because non-standard baud rates are not universally supported. For example, after this change, setting the baud rate to 128000 on my Keyspan adapters seems to work. tcsetattr() fails, but the subsequent call to ioctl() doesn't return an error, so the ORSSerialPort delegate is never notified of an error. However, the baud rate is not in fact set to 128000, and there's no way for the user of ORSSerialPort to detect this programatically. This could be worked around if it were possible to reliably read the actual baud rate of the port, but as far as I can tell, baud rates set with IOSSIOSPEED are not readable (e.g. using cfgetispeed() on the termios returned by tcgetattr()). This is essentially the same issue that caused me to hesitate on #45#45. It seems like the options are:
Any thoughts? — |
Redoing this to make sure @azplanlos gets credit. |
OK, manually merged this into 1.8.0 in eae268b . Thanks again! |
Thanks! |
update for pull request #46 as discussed there.
Support for non standard baud rates if setting port attributes fail as fallback including error handling and notifying delegate.
Successfully tested with Junsi iCharger (CP210x chipset) at 128000 baud.