uhey22e wrote on January 06, 2019:
Hello.
I have been trying to port OTA update demo to
STM32L4 Discovery kit IoT node.
Now, I’ve stubbed +aws_ota_pal.c+ and run +aws_ota_update_demo.c+ .
The thing seems to subscribe OTA update jobs successfully so the updating task is launched when I create the job on web console.
But the job is failed when it tries to publish to topic “$aws/things/stm32-test/streams/AFR_OTA-313b4591-0958-4ad4-8b58-e5f3fed32748/get/cbor”.
Following is a console output when task is in this loop.
100 31447 [OTA Task] [prvPublishGetStreamMessage] OK: $aws/things/stm32-test/streams/AFR_OTA-313b4591-0958-4ad4-8b58-e5f3fed32748/get/cbor
101 31459 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
102 31485 [IP-task] Socket sending wakeup to MQTT task.
103 31490 [MQTT] Received message 0 from queue.
104 31617 [IP-task] Socket sending wakeup to MQTT task.
105 31623 [MQTT] Received message 0 from queue.
106 31628 [MQTT] Received fixed header, 151 bytes to receive.
107 32744 [OTA] State: Active Received: 1 Queued: 1 Processed: 1 Dropped: 0
108 33959 [OTA Task] Sending command to MQTT task.
109 33963 [MQTT] Received message 70000 from queue.
110 33968 [MQTT] Initiating MQTT publish.
111 33984 [MQTT] Notifying task.
112 33988 [OTA Task] Command sent to MQTT task passed.
113 33993 [IP-task] Socket sending wakeup to MQTT task.
114 33998 [MQTT] Received message 0 from queue.
115 34003 [OTA Task] [prvPublishGetStreamMessage] OK: $aws/things/stm32-test/streams/AFR_OTA-313b4591-0958-4ad4-8b58-e5f3fed32748/get/cbor
116 34015 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
117 34146 [IP-task] Socket sending wakeup to MQTT task.
118 34152 [MQTT] Received message 0 from queue.
119 34157 [MQTT] Received fixed header, 151 bytes to receive.
120 34751 [OTA] State: Active Received: 1 Queued: 1 Processed: 1 Dropped: 0
121 36515 [OTA Task] Sending command to MQTT task.
122 36519 [MQTT] Received message 80000 from queue.
123 36524 [MQTT] Initiating MQTT publish.
124 36540 [MQTT] Notifying task.
125 36544 [OTA Task] Command sent to MQTT task passed.
126 36549 [IP-task] Socket sending wakeup to MQTT task.
127 36554 [MQTT] Received message 0 from queue.
// continued...
In CloudWatch logs, following error logs are recorded.
{
"timestamp": "2019-01-06 19:08:15.222",
"logLevel": "ERROR",
"accountId": "200001232690",
"status": "Failure",
"actionType": "GetStream",
"protocol": "MQTT",
"clientId": "stm32-test",
"topicName": "$aws/things/stm32-test/streams/AFR_OTA-f85ce53a-5a51-4cf0-8bf6-7e9eb3cf5520/get/cbor",
"streamId": "AFR_OTA-f85ce53a-5a51-4cf0-8bf6-7e9eb3cf5520",
"clientToken": "rdy",
"details": "The request status is FAILURE. Error: Stream block not found due to unexpected exception. null"
}
What is the cause of this error?
Any help would be highly appreciated. Thanks.