nickm2018 wrote on July 31, 2019:
I extended the OTA_FileRequest timeout to 16 seconds and i still see duplicates
Here is an example from an OTA of 38 devices.
Block 19,19, and 29 are received and written to flash. In the same reported second, I see block 12 being received a second time. With QoS of 0, i would not expect to see any MQTT retries.
“7/31/2019 6:08:44 PM”,738617 [OTA Task] [prvPublishGetStreamMessage] OK: $aws/things/CC_C0_79_DF_55_A4/streams/AFR_OTA-d3d23e81-33a6-40aa-96f0-6f506d07481c/get/cbor
“7/31/2019 6:08:44 PM”,738617 [OTA Task] [prvPublishGetStreamMessage] Momentum = 1
“7/31/2019 6:08:44 PM”,738617 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:49 PM”,743974 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:49 PM”,743974 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:49 PM”,744085 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:49 PM”,744087 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:49 PM”,744123 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:49 PM”,744143 [MQTT] Received fixed header, 4209 bytes to receive.
“7/31/2019 6:08:49 PM”,744204 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:50 PM”,744518 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:50 PM”,744519 [OTA Task] [prvIngestDataBlock] Received file block 29, size 4096
“7/31/2019 6:08:50 PM”,744550 [OTA Task] [OTA] Flash Write 4096 @ 118784. BW: 122880 Header: 0
“7/31/2019 6:08:50 PM”,744550 [OTA Task] [prvIngestDataBlock] Remaining: 265
“7/31/2019 6:08:50 PM”,744550 [OTA Task] [prvOTAUpdateTask] Returned buffer to MQTT client.
“7/31/2019 6:08:50 PM”,744716 [MQTT] Received fixed header, 4208 bytes to receive.
“7/31/2019 6:08:50 PM”,744819 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:50 PM”,744819 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:50 PM”,745133 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:50 PM”,745134 [OTA Task] [prvIngestDataBlock] Received file block 19, size 4096
“7/31/2019 6:08:50 PM”,745162 [OTA Task] [OTA] Flash Write 4096 @ 77824. BW: 126976 Header: 0
“7/31/2019 6:08:50 PM”,745162 [OTA Task] [prvIngestDataBlock] Remaining: 264
“7/31/2019 6:08:50 PM”,745162 [OTA Task] [prvOTAUpdateTask] Returned buffer to MQTT client.
“7/31/2019 6:08:50 PM”,745221 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:50 PM”,745221 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:50 PM”,745284 [MQTT] Received fixed header, 4208 bytes to receive.
“7/31/2019 6:08:50 PM”,745290 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:50 PM”,745341 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:50 PM”,745361 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:50 PM”,745400 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:51 PM”,745560 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:51 PM”,745561 [OTA Task] [prvIngestDataBlock] Received file block 12, size 4096
“7/31/2019 6:08:51 PM”,745589 [OTA Task] [OTA] Flash Write 4096 @ 49152. BW: 131072 Header: 0
“7/31/2019 6:08:51 PM”,745589 [OTA Task] [prvIngestDataBlock] Remaining: 263
“7/31/2019 6:08:51 PM”,745589 [OTA Task] [prvOTAUpdateTask] Returned buffer to MQTT client.
“7/31/2019 6:08:51 PM”,745623 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:51 PM”,745623 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:51 PM”,745673 [MQTT] Received fixed header, 4208 bytes to receive.
“7/31/2019 6:08:51 PM”,745889 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:51 PM”,745891 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:51 PM”,746051 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:51 PM”,746052 [OTA Task] [prvIngestDataBlock] Received file block 12, size 4096
“7/31/2019 6:08:51 PM”,746052 [OTA Task] [prvIngestDataBlock] block 12 is a DUPLICATE. 263 blocks remaining.
“7/31/2019 6:08:51 PM”,746052 [OTA Task] [prvOTAUpdateTask] Returned buffer to MQTT client.
“7/31/2019 6:08:51 PM”,746150 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:51 PM”,746150 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:51 PM”,746185 [worker thread] Socket sending wakeup to MQTT task.
“7/31/2019 6:08:51 PM”,746245 [MQTT] Received fixed header, 4208 bytes to receive.
“7/31/2019 6:08:51 PM”,746297 [MQTT] Received message 0 from queue.
“7/31/2019 6:08:52 PM”,746620 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:52 PM”,746624 [OTA Task] [prvIngestDataBlock] Received file block 19, size 4096
“7/31/2019 6:08:52 PM”,746624 [OTA Task] [prvIngestDataBlock] block 19 is a DUPLICATE. 263 blocks remaining.
“7/31/2019 6:08:52 PM”,746624 [OTA Task] [prvOTAUpdateTask] Returned buffer to MQTT client.
“7/31/2019 6:08:52 PM”,746812 [MQTT] Received fixed header, 4209 bytes to receive.
“7/31/2019 6:08:52 PM”,747285 [OTA Task] [prvStartRequestTimer] Starting OTA_FileRequest timer.
“7/31/2019 6:08:52 PM”,747286 [OTA Task] [prvIngestDataBlock] Received file block 29, size 4096
“7/31/2019 6:08:52 PM”,747286 [OTA Task] [prvIngestDataBlock] block 29 is a DUPLICATE. 263 blocks remaining.
“7/31/2019 6:08:52 PM”,747286 [OTA Task] [prvOTAUpdateTask] Returned buffer to MQTT client.