Skip to content

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

Closed
JaakkoFagerlund opened this issue Dec 25, 2015 · 18 comments · Fixed by #34
Closed

Custom baud rate to serial monitor #33

JaakkoFagerlund opened this issue Dec 25, 2015 · 18 comments · Fixed by #34
Labels
conclusion: declined Will not be worked on conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@JaakkoFagerlund
Copy link

JaakkoFagerlund commented Dec 25, 2015

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:

@PaulStoffregen
Copy link

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.

@JaakkoFagerlund
Copy link
Author

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.

@matthijskooijman
Copy link

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.

@matthijskooijman
Copy link

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.

@csouers
Copy link

csouers commented Apr 25, 2016

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.

@ohsix
Copy link

ohsix commented Mar 15, 2017

i'm using a cp2102 with an esp8266, it supports (up to) 921600 baud rate and i'd like to use it.
i expected to be able to click on the number in the serial monitor ui to put in an arbitrary number, and the dropdown just providing common values

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

@Perlovka
Copy link

Perlovka commented Jun 3, 2017

One additional limitation is that on Linux, supporting non-standard baud rates is a bit messy

I wrote a simple Qt based serial terminal, and there is no problem to set custom baud rate.
So the problem is not Linux, but Java ;)

@matthijskooijman
Copy link

@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).

@owendelong
Copy link

owendelong commented Apr 14, 2019

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...

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
ve3de77f6
~ld

@ycuk
Copy link

ycuk commented Jul 23, 2019

hey, Authors, just add typical values more, please. Some boards use in core lib 460800, 921600, etc, neither 1000000 nor 2000000. thanks

@owendelong
Copy link

owendelong commented Jul 24, 2019 via email

@owendelong
Copy link

owendelong commented Jul 24, 2019 via email

@aaronw2
Copy link

aaronw2 commented Apr 12, 2020

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.

@supaplextor
Copy link

screen /dev/ttyUSB0 921600,n,8,1 as an alternative works on Linux here. Using an ordinary esp32 dev board.

@ohsix
Copy link

ohsix commented Jul 1, 2020

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

@tmrb
Copy link

tmrb commented Jun 11, 2021

To solve the baud rate problem, we can choose the frequency of 921600 MHz in the Platformio IDE.

@VeniceInventors
Copy link

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.
With the ESP32 at 921600, and the monitor at 1000000, the output isn't readable so it's not "close enough".

@DurvalMenezes
Copy link

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.

@per1234 per1234 transferred this issue from arduino/Arduino Dec 1, 2022
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Dec 1, 2022
@cmaglie cmaglie linked a pull request Dec 1, 2022 that will close this issue
@per1234 per1234 added conclusion: declined Will not be worked on conclusion: resolved Issue was resolved labels Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.