Losing TCP reception payload
Posted: Tue Apr 11, 2023 10:20 pm
Hi All
I am using the ESP32S2-MINI in AT mode (125kBaud) via UART in order to upload new code to the main processor over a HTTP connection.
The new FW is about 800k in size but I find it randomly failing after typically about 128k of the upload - this various and so this is only typical but it is very often in this area.
What I find is that the processor receives 2920byte blocks of data.
When it fails I find that there is a byte missing in one of these blocks. It is random as to where in the block of data it is.
What is then seen is that one of two blocks later there is an additional byte and this is always 0x0d which is inserted.
The overall data length that is received is correct (but with one byte lost somewhere and one 0x0d inserted a little later).
At the moment am trying to exclude this behavior being due to UART data loss (although if that were the case the individual block lengths would likely be incorrect) but am wondering whether such behavior is known?
The HW being tested has in fact been in operation for several weeks an it was possible to do a number of uploads without problems and it may also be that this issue has started in one device.
Regards
Mark
I am using the ESP32S2-MINI in AT mode (125kBaud) via UART in order to upload new code to the main processor over a HTTP connection.
The new FW is about 800k in size but I find it randomly failing after typically about 128k of the upload - this various and so this is only typical but it is very often in this area.
What I find is that the processor receives 2920byte blocks of data.
When it fails I find that there is a byte missing in one of these blocks. It is random as to where in the block of data it is.
What is then seen is that one of two blocks later there is an additional byte and this is always 0x0d which is inserted.
The overall data length that is received is correct (but with one byte lost somewhere and one 0x0d inserted a little later).
At the moment am trying to exclude this behavior being due to UART data loss (although if that were the case the individual block lengths would likely be incorrect) but am wondering whether such behavior is known?
The HW being tested has in fact been in operation for several weeks an it was possible to do a number of uploads without problems and it may also be that this issue has started in one device.
Regards
Mark