arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.7k stars 4.72k forks source link

xdrv: tcp_bridge: Increase baudrate #21528

Closed shantur closed 1 month ago

shantur commented 1 month ago

On ESP32 TCP Serial bridge can support baudrate of more than 115200.

After this change the baudrate is still limited to 306000 due to uint_8 is used for settings->tcp_baudrate.

A 1.5Mbauds have been tested by changing uint_16 for settings->tcp_baudrate on ESP32

Description:

Related issue (if applicable): fixes #

Checklist:

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

s-hadinger commented 1 month ago

I'm afraid it's not that simple:

uint8_t       tcp_baudrate;              // F41

This means that the max allowed value for now is 306000. We can think of changing slightly the encoding above 96 (which represents 115200) to allow for higher rates. But changing the size of tcp_baudrate simply does not work, because is would change the alignment of all other settings.

Please come back with a better solution to encode differently above 96 and keep the settings in 8 bits.

arendst commented 1 month ago

I'll refactor the tcp_baudrate from uint8_t to uint16_t as I did long time ago for the other baudrates.

Hold your horses.

arendst commented 1 month ago

Implemented in v14.0.0.4