-
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
Remove default baud rate #50
Comments
9600 or 19200 seems to be relatively common. |
It's very common, however most devices can run at many different rates. 9600 persists for a variety of reasons (default for arduino, default for many devices) however it's really really slow compared to what most hardware can actually do. Cable length also comes into play 9600 can go about 20 meters and higher rates like 115200 can only go 2-3 meters. In modern devices we only need to go 2-3cm as USB is generally the transport to the device. All that aside, you need to know what speed your device runs at, it might be 9600 and it might not. A default rate leads to unexplained errors as data generally comes through garbled and the setting that caused that is hidden away. Node serialport used to have a default rate of 9600 and it would cause a common support issue. Since removing the default a few years ago the issue went away. and since removing that default a few years ago I haven't seen any further support issues |
What if there was an autobaud feature? |
That’s not an os feature, what we’re you thinking? |
Autobaud is software that will automatically determine serial settings including baud rate. |
Seems to be a device feature not an host computer feature. |
It may serve as a good "default", since it could automatically detect everything without manual setup. But it may also cause more problems due to acting opaquely. |
If I understand it correctly that "autobaud" relies on looking for a specific char on the start of a stream in order to go on a trial and error approach until it finds the correct baud that allow that char to be received. I really think this is not doable nor it's necessary. If automatic baud rate is to exist it should be implemented at application layer not here. My 2 cents! 😉 |
I agree; make baud rate required. usually with required parameters, I would rather not have to stuff them into an “options” object, fwiw. |
This was fixed by #105. |
The spec asks if there is a default common baudrate. I don't think there is one. Most hardware can operate at a wide range of rates, and most consumer devices want to run at their maximum rate as determined by their hardware. What these rates are is unknown in advance.
It would need to be removed from
And
EXAMPLE 1
would need to be updated as the settings argument of the constructor would need to be required, or the path moved into the options object.The text was updated successfully, but these errors were encountered: