Hello, in these days I'm debugging an issue where at some point the wifi_data_process_buf buffer becomes full and the MCU stop responding to the module's heartbeat.
In particular, with MCU SDK version v2.6.2, inside wifi_uart_service i find this code:
Code: Select all
if (rx_value_len > sizeof(wifi_data_process_buf) + PROTOCOL_HEAD) {
TUYA_DBG_EXEC(TUYA_PRINT("length overflow, got %d.", rx_value_len));
TUYA_DBG_EXEC(TUYA_PRINT("whole process buffer and rx buffer discarded."));
rx_buf_in = rx_buf_out = wifi_uart_rx_buf;
break;
}that breaks when there is length overflow without calling data_handle. I'm currently investigating why it keep filling up the buffer, but I noticed that in another project, where I used MCU SDK version v2.5.6, the same condition was handled differently:
Code: Select all
if(rx_value_len > sizeof(wifi_data_process_buf) + PROTOCOL_HEAD) {
offset += 3;
continue;
}There's a continune instead of a break so data_handle was called even if the buffer was full.
Can I get some info on why that code was changed in the latest MCU SDK versions?