espressif / esp-google-iot

Google Cloud IoT SDK as an ESP-IDF Component
Apache License 2.0
143 stars 44 forks source link

Unable to send/receive MQTT during HTTPS OTA download (CA-84) #15

Closed msn444 closed 4 years ago

msn444 commented 4 years ago

I am unable to send or receive MQTT during OTA downloads using the ESP-IDF HTTPS OTA library. MQTT transactions continue as soon as the OTA session closes.

Am I hitting a limit to the number of simultaneous connections allowed?

shahpiyushv commented 4 years ago

@msn444 hitting a limit to the number of simultaneous connections allowed seems unlikely. Can you check the priority of the threads? It could be possible that the OTA thread is blocking the mqtt thread.

msn444 commented 4 years ago

Awesome, you're exactly right. I was actually performing the OTA transfer inside the MQTT subscription callback. Moved it to its own task and problem solved. Thanks!