-
Notifications
You must be signed in to change notification settings - Fork 14
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
Baud rate of 2,000,000 #14
Comments
Hello @deepcoder, sorry for the delay, I don't receive notifications for newly opened issues, I don't know why. Sadly, non-standard speed support is OS-specific. Your OS indeed reports up to 230400 bauds using the standard API. The extended API uses TCSETS2 that is present since Linux 2.6.20, but I have no idea what is used on MacOS. Hmmm apparently avrdude faced the same problem and found the solution here: avrdudes/avrdude#771 I guess I should give it a try as well. |
@deepcoder I would appreciate it if you could try to apply the two attached patches (not having a mac myself prevents me from testing). If they work, I'll merge them. Thanks! 0001-src-rearrange-the-standard-baud-rate-setting-block.patch.txt |
@deepcoder any news ? |
@wtarreau on MacOS without your patch(es) the supported bauds are:
After the 0002-src-add-support-for-non-standard-baud-rates-on-MacOS.patch.txt it does not build:
Fix is to remove the Now an arbitrary baud rate can be passed to
But it falls back to 9600. However a valid baud rate works correctly:
Not sure MacOS allows arbitrary ports. HTH. |
Thanks for the fix, indeed, I don't know how I messed up, probably some mistyped vi commands inside an ifdef I couldn't build, but I obviously did. It's not necessarily a bad thing that you're seeing actually. If it had failed to set the baud rate you'd have got an error. Here it reports the baud rate reported by the standard method, so it cannot report an extended one. It's common to see the default baud rate being mentioned on extended baud rates. I'll have a look in case we have an equivalent of IOSSIOSPEED to retrieve the baud rate. In the mean time I've fixed the build bug you reported. We're on a good track I think. Thanks Seb! |
Just a copy / blast: the original uses a this comment (avrdudes/avrdude#771 (comment)) states the driver may deny the use of non standard baud rates. |
I'm not seeing anything indicating that there could be an equivalent to retrieve the configured speed. We'll likely have to modify the code to state that if we've successfully forced the speed on this platform, then we need to save it and report the configured one instead of the reported one. |
Yes indeed for the baud rate but we test for the error and you don't get one, which is what makes me say it's likely OK. |
fair enough I do not have such devices to test the effective speed. Maybe @deepcoder has. |
Let me try again with this (I updated patch 2 to fix the stupid copy-paste and did patch 3 to try to copy the speed). In your case only the 3rd one is needed since you fixed the 2nd. 0001-src-rearrange-the-standard-baud-rate-setting-block.patch.txt I do have some devices that work at these speeds, I just need to figure which one is transportable ;-) |
With the 3 new patches it still reports 9600:
Looks like I need to commute on Thursday and a space docking is planned. |
OK we'll see, thank you. |
I have a microcontroller that wants to connect at 20000000 baud. I am using a SparkFun FTDI usb to UART 3.3 volt device. I can use the aging CoolTerm v1.7.0 build 825 to connect to this device via this USB/UART and see the output correctly. CoolTerm lets me select this 2000000 baud rate. When I try the same with bt 0.4.0 and the same USB device on Mac OS 12.6, it does not work and delivers the following:
Thank you for your work on this project!
The text was updated successfully, but these errors were encountered: