Download from Azure fails with error code -122

Hi,

I want to download FOTA-updates with HTTPS from a function app running on Azure. I am not using IoT hub or MQTT. I'm using modem firmware 2.0.4 in combination with version 2.7.0 of the nRF Connect SDK. I have provisioned the required root certificate, and the download is performed via the download_client.

When a download is attempted, a connection is established, but downloading fails with error code -122 when `recv` is called for the first time. My understanding is that this is due to the secure buffer in the modem (2kB) being exhausted due to Azure sending too much data. I have enabled `CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_1024, but this leads to the same result. Is there a way to resolve this? The other questions I've found all refer to IoT hub and MQTT.

Related