Replies: 2 comments 2 replies
-
Are you trying to run OTA after closing the MQTT connection, or simply from startup? I'm asking since this is a very simple example demonstrating only one connection at a time, so maybe the close functionality didn't deinitialize everything properly? Could you try to setup the OTA only application to see if it could actually connect and run? |
Beta Was this translation helpful? Give feedback.
-
Hi David, First of all, I apologize for not providing enough details earlier — I wrote the post in a rush, sorry about that. In the project, I’m using esp_modem v1.3.0 and IDF v5.4.0. As you mentioned, I tried to run the OTA process after shutting down the MQTT client. I have a recovery function that is triggered when perform_sock fails in the DCE component. This function first closes the existing listening socket by stopping listening, performs the necessary cleanup, and then resets the DCE pointer using its destructor before re-establishing the connection. This approach usually helps in recovering the connection. However, when I call the destructor without any prior error (i.e., in a normal case), the program ends up hanging for a long time and becomes unresponsive. When this method didn’t work, I decided to perform a full soft restart of the ESP32. I also switched from an HTTPS (SSL/TLS) connection to a plain HTTP connection to avoid TLS-layer errors. That’s why I attempted to use port 80 instead of 443, and I used the #define values I shared in my previous post to configure the connection. Unfortunately, the OTA client that is supposed to connect to localhost returns an HTTP 404 error. To avoid initial timeout issues, I increased the HTTP request timeout from 2 seconds to 10 seconds, but it had no effect. Later, I tried to apply the precautions you suggested with the test_ota example. For instance, I placed the UART ISR functions into IRAM as recommended — but that didn’t help either. Thank you very much for your help and support. Wishing you all the best in your work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been using esp_modem in our customer project. I have started it from modem_tcp_client example and so it seems like near to the finish line.
There is a problem, I can't get fixed about native OTA. http OTA couldn't be connected to the localhost and to the server. I have already done the mqtt connection between broker and local client using localhost but it didn't worked for OTA.
Here is the URL's for that configuration;
#define OTA_HTTP_URL "http://127.0.0.1/ota/download" // using in http OTA cfg
#define OTA_HTTP_GSM_URL "sub.domainname.com" // using GSM connection
#define OTA_HTTP_GSM_PORT 80 // using GSM connection
Is there any general problem or obligation etc. that I can't figure it out?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions