Fix ESP32 receive incomplete serial data over 128 bytes (#23156)

This commit is contained in:
Theo Arends 2025-03-18 15:12:30 +01:00
parent c0d15de965
commit fb6640b91f
3 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file.
- Support Vango Technologies V924x ultralow power, single-phase, power measurement (#23127)
- Support for HLK-LD2402 24GHz smart wave motion sensor (#23133)
- Matter prepare for ICD cluster (#23158)
- Berry `re.dump()`
- Berry `re.dump()` (#23162)
### Breaking Changed
- Berry remove `Leds.create_matrix` from the standard library waiting for reimplementation (#23114)
@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
- Berry prevent `import` from hiding a solidified class (#23112)
- ESP32-C3 WiFi sleep (#23096)
- ESP32 intermittent exception on WiFi AP cannot be reached (#23115)
- ESP32 receive incomplete serial data over 128 bytes (#23156)
### Removed

View File

@ -124,6 +124,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Berry `introspect.solidified()` to know if a Berry object is solidified or in RAM [#23063](https://github.com/arendst/Tasmota/issues/23063)
- Berry `global.undef()` to undefine a global variable [#23073](https://github.com/arendst/Tasmota/issues/23073)
- Berry load `.tapp` files in `/.extensions/` then in `/` [#23113](https://github.com/arendst/Tasmota/issues/23113)
- Berry `re.dump()` (#23162)[#23162](https://github.com/arendst/Tasmota/issues/23162)
- Matter prepare for ICD cluster [#23158](https://github.com/arendst/Tasmota/issues/23158)
- LVGL experimental mirroring of display on Web UI [#23041](https://github.com/arendst/Tasmota/issues/23041)
@ -144,6 +145,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
### Fixed
- Too many zeros in RCSwitch received data regression from v14.4.1.4 [#23050](https://github.com/arendst/Tasmota/issues/23050)
- ESP32 receive incomplete serial data over 128 bytes [#23156](https://github.com/arendst/Tasmota/issues/23156)
- ESP32 intermittent exception on WiFi AP cannot be reached [#23115](https://github.com/arendst/Tasmota/issues/23115)
- ESP32-C3 WiFi sleep [#23096](https://github.com/arendst/Tasmota/issues/23096)
- Berry prevent `import` from hiding a solidified class [#23112](https://github.com/arendst/Tasmota/issues/23112)

View File

@ -168,6 +168,12 @@ void TasmotaSerial::Esp32Begin(void) {
if (m_speed <= 9600) {
// At 9600, 10 chars are ~10ms
uart_set_rx_full_threshold(m_uart, 10);
} else {
// At 19200, 120 chars are ~60ms
// At 76800, 120 chars are ~15ms
uart_set_rx_full_threshold(m_uart, 120);
}
/*
} else if (m_speed < 115200) {
// At 19200, 120 chars are ~60ms
// At 76800, 120 chars are ~15ms
@ -180,6 +186,7 @@ void TasmotaSerial::Esp32Begin(void) {
// At even higher speeds set 75% of the buffer
uart_set_rx_full_threshold(m_uart, serial_buffer_size * 3 / 4);
}
*/
// For bitrate below 115200, set the Rx time out to 6 chars instead of the default 10
if (m_speed < 115200) {
// At 76800 the timeout is ~1ms