Closed montirob closed 4 years ago
Thanks for reporting.
Here attached a mbedTLS verbose level log of the fail. After the fail the ESP32 does not exit from the error condition.
Hi @montirob
Could you please check if the OTA update works okay with the same server if you connect using WiFi (or Ethernet if possible)?
The "Connection reset by peer" error clearly says that the server terminated the connection. I thought I was going to suggest increasing UART buffer sizes, but it would make sense for other kinds of error (such as buffer overflow).
Hi @david-cermak yes if I connect using wifi the update works fine, but is more fast of the LTE. Initially I was experimenting HW_FIFO_OVERFLOW, thinking that ic could be the cause of the problem I added hardware flow control and fixed it. I've also checked the uart event queue, is OK.
@montirob Is it possible that your server defines some download timeout and terminates connection if exceeded? It should be quite easy to simulate if you can limit the WiFi throughput and run OTA over WiFi again.
There should be no difference between the PPP network interface and other standard interfaces regarding the OTA updates. I've tested OTA update with the esp-modem (BG96) interface locally and it works as expected on my end.
@david-cermak thanks for your answers. Increasing the uart speed from 115200 to 230400bps the download finished successfully. So the hypothesis of some server-side timeout starts to be convincing for me too.
Thanks for reporting, feel free to reopen.
Environment
Problem Description
I am trying to get the OTA working using the PPPoS protocol and Quectel's EC21 module to connect to the internet. The connection between the ESP32 and the EC21 module is done using UART1 with hardware flow control at 115200bps. The firmware to download is hosted on hawkBit Server.
The connection is ok and the download start but never successfully ends.
Expected Behavior
Correct OTA update from an https server.
Actual Behavior
The download start correctly but always stop after some time... Looks like a behavior due to a timeout.
Steps to reproduce
1 - Connect to the internet using the PPPoS example 2 - Run the ESP32 OTA update Slightly adapted the BG96.c example file in order to be compliant with the EC21 LTE module ( Always Quectel: almost nothing to do )
Connected using UART1 with hardware flow control to the EC21 module using the umts<E-evb provided from Quetel.
Code to reproduce this issue
example code of PPPoS with BG96 and the OTA update example
Debug Logs
Other items if possible
I have already tried to increase the timeout as it has been suggested here but without success log con tls .txt