-
-
Notifications
You must be signed in to change notification settings - Fork 6
Custom baud rate to serial monitor #33
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
Comments
Can it really support those speeds? Have you actually tested? Did you test with sustained data flow, or only short bursts, or only single chars with lengthy delays between? Actual testing is important. If you make blind assumptions based only on the USART documentation, you'll probably conclude the hardware is capable of much faster speeds than the slow AVR processor can actually handle when running the general purpose, interrupt & buffer based code. |
AVR processor running at 16MHz has no problems sending 2Mbps out, it is usually limited by the buffer or receiving end and how the code has been done. I haven't personally tested it, but I've seen a scope trace of it. And even if some Arduino board in some configuration can't handle those speeds, why limit the serial monitor? There are countless other chips, boards and projects that the serial monitor is nice to use with and being able to set a custom baud rate shouldn't be an issue. It doesn't take anything away from anyone. |
One additional limitation is that on Linux, supporting non-standard baud rates is a bit messy, and the JSSC serial library does not seem to support the right API to set custom baud rates on ttyACMx devices (explained here: arduino/Arduino#3351 (comment)). I'm not sure about the situation on Windows and OSX, things might be better supported, so it might make sense to allow custom baudrates on those platforms, or perhaps even on Linux too if a proper error can be displayed when a baud rate failed to set. Issue arduino/Arduino#3351 might contain more info relevant to this issue, but for now I want to keep this issue as the central one for custom baud rate support and close the reset as duplicates. |
arduino/Arduino#4439 (comment) additionally suggests that perhaps boards or platforms could define the list of baudrates (or, perhaps just defining additional baudrates on top of the standard ones) would be a good addition. It's a bit of a separate feature from properly supporting non-standard baudrates, but certainly related. |
Hey all. I too would like support for custom baud rates in the serial monitor. Without individually testing each rate, why not make a pseudo-hidden settings option to add your own to the list and leave testing to the user? For example, baud rate 7812 (or 7812.5, but the .5 isn't crucial). It works on the devices and in separate serial apps, so I believe it would within the IDE as well. |
i'm using a cp2102 with an esp8266, it supports (up to) 921600 baud rate and i'd like to use it. being able to define them in boards.txt or something would be sufficient, but literally any way to do it without rebuilding the ide would be great |
I wrote a simple Qt based serial terminal, and there is no problem to set custom baud rate. |
@Perlovka, it's a bit of both: The custom-baudrate-code in Linux is a bit of a mess (as mentioned here and here, and the JSSC library only supporting one of the possible ways to set custom baudrates, that doesn't work with the ACM driver (IIRC). There does not seem to be any "recommended" way to set baudrates either, the one that works best (for most devices) was discouraged by kernel developers for being an internal API or something (again IIRC). |
Regarding the request in arduino/Arduino#4439, I've tried running the ESP8266 board I have with an FTDI serial adapter at 74880 baud (which is close to the requested 76800 baud) and it seems to be "close enough" to actually work (at least mostly). Below is the Serial Monitor contents when booting ESP8266 at 160Mhz with Serial Monitor at 74880 Baud...
|
hey, Authors, just add typical values more, please. Some boards use in core lib 460800, 921600, etc, neither 1000000 nor 2000000. thanks |
Most multiples of 78600 (up to 460800) are in use somewhere. 9600, 19200, and 38400 are also common.
I’m not aware of any micro controllers out there that don’t fit into the above categories.
Owen
… On Jul 23, 2019, at 14:19, Yuri ***@***.***> wrote:
hey, Authors, just add typical values more, please. Some boards use in core lib 460800, 921600, etc, neither 1000000 nor 2000000. thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, the choices above 230400 for serial port monitor speeds are a bit odd.
I have noticed, however, that they’re also a bit “flexible”. For example, native ESP8266 default is 76800, but there’s no such setting in the Arduino Serial monitor.
However, 74880 works just fine to decode the 76800 bps output from the chip during boot.
I suspect that 500000 is probably close enough for 460800 and 1000000 will probably work with 921600.
Alternatively, dig out the code and submit a pull request.
Owen
… On Jul 23, 2019, at 14:19 , Yuri ***@***.***> wrote:
hey, Authors, just add typical values more, please. Some boards use in core lib 460800, 921600, etc, neither 1000000 nor 2000000. thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#33?email_source=notifications&email_token=AAK6GTQUSSZBFOWDV7ZB4CDQA5YV5A5CNFSM4BXNEWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UO5FA#issuecomment-514387604>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAK6GTWOIWT3SWE2XWTQKSLQA5YV5ANCNFSM4BXNEWYA>.
|
I'm doing a lot of work now with the ESP32 and it would be really nice to support 921600 baud which is readily supported in Linux and works fine for programming but not for the serial monitor. |
screen /dev/ttyUSB0 921600,n,8,1 as an alternative works on Linux here. Using an ordinary esp32 dev board. |
well, if that was an actual alternative I wouldn't need arduino to support it, but arduino closes the serial port and does some other things when you program the part, then reopens them automatically |
To solve the baud rate problem, we can choose the frequency of 921600 MHz in the Platformio IDE. |
I would second the suggestion that the baud rates >115200 in the serial monitor be multiples of 115200 like 230400, 460800, 921600 and 1843200, or, the last value.could be a user-defined rate from the preferences. |
I second that. My ESP8266 firmware outputs its initial messages at 921600 bauds, and I can't read them using Arduino IDE serial monitor, really irritating. Being able to set the baud rate in preferences would really solve this for me and for many others. |
Describe the request
I would thus suggest adding an option of defining a custom baud rate or including more, like 250k, 500k and 1M.
Describe the current behavior
At the moment we are limited to just a few select baud rates, while the Arduino board itself can do much more than just 230400 baud.
serial-monitor version
0.11.0
Operating system
All
Operating system version
Any
Additional context
Additional requests:
The text was updated successfully, but these errors were encountered: