AWS FOTA fails at 93% due to AWS server closing connection

Hello,

I am developing a nrf5340 project based on the Nordic AWS IoT library. Connection is via Ethernet (W5500) and it works fine as DHCP and SNTP works fine and I can pub/sub to AWS IoT core. The problem is with AWS Job/FOTA as the download starts fine but stops at 93%. The AWS server sends an HTTPS response with "connection:close" so the download client library tries to reconnect and fails. 

I had the same issue with the nrf52840 before and changing the download client HTTP fragmentation to 4096 solved the issue. I am not sure why it did as in this project it does not. Indeed HTTP fragmentation is already at 4096. I have tried with CONFIG_DOWNLOAD_CLIENT_RANGE_REQUESTS enabled and disabled but no luck so far. I have tried anything I could. 

I attach here the .conf files and the RTT log where I print the HTTPS header requests and responses. You can see the last response containing "connection:close" at the end. 

I have been trying ti fix this issue for days and I do not know what to try next. I could not find anything online and AWS documentation did not help. 

Please help.

Thank you.

Marco 

5355.prj.conf

3716.overlay-development.conf

1145.nrf5340dk_nrf5340_cpuapp_ns.conf

2211.test_5340.log

Related