XHTTPCREQ GET request download file in chunks

Hi,

I'm using nRF9160 SLM FW. I'd like to download a device FW via XHTTPCREQ GET method. I can get the entire file at once, but I'm wondering if it's possible to download a file in chunks? i.e. download the first 1KB, 2nd KB, 3rd KB... etc.? So I could store into flash without losing data.

Thanks,

Ye-Sheng

Parents
  • Did you get it working? I am downloading a 300kB file using HTTP with SLM through a UART to my secondary processor. The trick was making the HTTP download to UART functions "blocking". They are set to non-blocking by default so once the incoming data size exceeds the buffer size in SLM, it starts overwriting the data before you can read it out of the UART. If you have a 2K file you want to download, set your buffer size to 2K and you have no problem. However, you can't set it to 300k so large files need to have the UART sending routines be set to blocking.

Reply
  • Did you get it working? I am downloading a 300kB file using HTTP with SLM through a UART to my secondary processor. The trick was making the HTTP download to UART functions "blocking". They are set to non-blocking by default so once the incoming data size exceeds the buffer size in SLM, it starts overwriting the data before you can read it out of the UART. If you have a 2K file you want to download, set your buffer size to 2K and you have no problem. However, you can't set it to 300k so large files need to have the UART sending routines be set to blocking.

Children
Related