espressif / esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
Apache License 2.0
256 stars 153 forks source link

`ota_mqtt` example not working for esp32-wroom-32d (DevKitC v4) (CA-325) #210

Open gamename opened 5 months ago

gamename commented 5 months ago

Hi,

The example compiles and flashes fine. When I run an OTA job from AWS this happens:

  1. The esp32 appears to download the firmware
  2. But at the end of the download, there are errors
  3. The AWS job marks this as a failed OTA attempt

The relevant errors are:

I (791470) wifi:state: run -> init (0)
I (791470) wifi:pm stop, total sleep time: 600173017 us / 787941972 us

I (791470) wifi:<ba-del>idx:0, tid:0
I (791470) wifi:<ba-del>idx:1, tid:2
I (791470) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
E (791480) wifi:NAN WiFi stop
E (791480) esp-tls-mbedtls: read error :-0x004C:
E (791490) coreMQTT: Call to receiveSingleIteration failed. Status=MQTTRecvFailed
E (791490) AWS_OTA: MQTT_ProcessLoop returned with status = MQTTRecvFailed.
I (791500) AWS_OTA: Disconnecting the MQTT connection with a3u37c52vq0b6j-ats.iot.us-east-1.amazonaws.com.
E (791510) esp-tls-mbedtls: write error :-0x004E:
E (791520) coreMQTT: sendBuffer: Unable to send packet: Network Error.
E (791530) coreMQTT: Transport send failed for DISCONNECT packet.
I (791530) wifi:flush txq
I (791530) wifi:stop sw txq
I (791540) wifi:lmac stop hw txq
I (791540) wifi:Deinit lldesc rx mblock:10
ets Jul 29 2019 12:21:46

Here is the log. ota.log

kvp1703 commented 4 months ago

Hello @gamename, I went through the attached log and it seems that the firmware version of the OTA is the same as that of firmware flashed into the module. Try changing app version of the OTA firmware from here.