Skip to content
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

xdrv: tcp_bridge: Increase baudrate #21528

Closed
wants to merge 1 commit into from

Conversation

shantur
Copy link
Contributor

@shantur shantur commented May 29, 2024

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:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.6
  • The code change is tested and works with Tasmota core ESP32 V.3.0.0
  • I accept the CLA.

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

…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
@s-hadinger
Copy link
Collaborator

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.

@s-hadinger s-hadinger closed this May 30, 2024
@arendst
Copy link
Owner

arendst commented May 30, 2024

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 added a commit that referenced this pull request May 30, 2024
@arendst
Copy link
Owner

arendst commented May 30, 2024

Implemented in v14.0.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants