Mender MCU integration on nRF9151DK: HTTP request fails during artifact download

Hello Mender,

I’m currently doing a full mender-mcu integration on nRF9151DK and have run into a problem during OTA artifact download.

When downloading an artifact, the HTTP request fails with “Message too long”.

From Nordic’s documentation, this seems related to a known nRF91 HTTPS limitation where the modem cannot handle larger TLS packets and downloads need to be split into smaller range requests:

As a temporary workaround, I patched Zephyr http.c in mender-mcu:

Right now our west manifest points to a forked mender-mcu repository where I added a patch for this:

In short, the patch changes the artifact download path to use smaller HTTPS range requests on nRF91 instead of one full download response.

I wanted to ask whether proper ranged artifact download support for nRF91 is something that should be handled in mender-mcu upstream.

I am working with @Dexter9532 on this and just wanted to highlight this part from Nordic docs:

The nRF91 Series modem has a size limit for receiving TLS packages. The size limit depends on modem internals and is around 2 kB. See modem firmware release notes for details. The library asks the server for a content-range which must be supported by the host server when using HTTPS with the nRF91 Series devices.

The workaround for the hardware limitation seems to be to use Content-Range header - HTTP | MDN , but it is not something Mender MCU seems to handle today.

Would be interesting to hear your thoughts, and if you have already come across this problem before? I would imagine that this limitation exists on other hardware as well and content-range seems like a good idea in general?

Best Regards,

Mirza

hi @Dexter9532 and @mirzak,

Thanks for reaching out! Looking at the linked repository, the change in question seems to be fix: add ranged artifact download with retries for nrf91 · Dexter9532/mender-mcu@efd6c06 · GitHub, correct? At a first glance I agree with the assumption that this is probably useful for other hardware too, but it’s definitely up to @danieldrabitzius et. al. to comment.

Greetz,
Josef

Yes, the linked patch is the workaround we are currently using. @Dexter9532 is the one who has primarily worked on the patch.

2 Likes