<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96836/xhttpcreq-get-request-download-file-in-chunks</link><description>Hi, 
 I&amp;#39;m using nRF9160 SLM FW. I&amp;#39;d like to download a device FW via XHTTPCREQ GET method. I can get the entire file at once, but I&amp;#39;m wondering if it&amp;#39;s possible to download a file in chunks? i.e. download the first 1KB, 2nd KB, 3rd KB... etc.? So I could</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Dec 2023 06:40:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96836/xhttpcreq-get-request-download-file-in-chunks" /><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/459836?ContentTypeID=1</link><pubDate>Tue, 12 Dec 2023 06:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:644684cf-d215-4f1c-a14f-205e700d13e9</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Bryan,&lt;br /&gt;&lt;br /&gt;I revisited this recently, and&amp;nbsp;the following AT command does the job.&lt;br /&gt;&lt;br /&gt;AT#XHTTPCREQ=&amp;quot;GET&amp;quot;,&amp;quot;your_file&amp;quot;,&amp;quot;Range: bytes=167936-172031\r\n&amp;quot;&lt;/p&gt;
&lt;p&gt;hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/436860?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2023 01:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba48f2ed-e039-4dd3-9176-305b933b54d3</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Hi Bryan,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. I was using the SLM FW w/o any modification, and I didn&amp;#39;t see the &amp;quot;overflow&amp;quot; issue. I use a double-buffer to store the streaming data in one buffer while writing the data from another buffer to the flash. So far it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/436846?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 20:05:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1d45823-6abf-466c-a042-e272644aef89</guid><dc:creator>Bryan Mills</dc:creator><description>&lt;p&gt;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 &amp;quot;blocking&amp;quot;. 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&amp;#39;t set it to 300k so large files need to have the UART sending routines be set to blocking.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/412637?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 05:41:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b3b2001-99e3-4272-b6bf-34e0eea16d05</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Thanks, I guess it supports only HTTPS at the moment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/412294?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 13:53:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c92e3b01-8a1d-45f3-aafb-46b7f221b714</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our expert thinks HTTP chunked transfer is for streaming, not for splittd downloading. In order to download by segments, HTTP range request is the proper solution.&lt;br /&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Check how it is used in NCS download_client library.&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/net/lib/download_client/src/http.c#L36" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/net/lib/download_client/src/http.c#L36&lt;/a&gt;&lt;br /&gt;MCU will need to calculate offset and do the same in the request header.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/411506?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 01:55:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aae2914-249f-4b78-9685-9ace9714007e</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. However, I&amp;#39;m not entirely sure how to use this flag. Could you show me the proper syntax if I want to download a file from &amp;quot;example.com/test.txt&amp;quot;, and split it into multiple chunks?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XHTTPCREQ GET request download file in chunks</title><link>https://devzone.nordicsemi.com/thread/410963?ContentTypeID=1</link><pubDate>Mon, 20 Feb 2023 17:01:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f574438f-3a84-48dc-8a75-be2fcdcf2bc1</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Check out&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/applications/serial_lte_modem/doc/HTTPC_AT_commands.html#id16"&gt;HTTP request #XHTTPCREQ&lt;/a&gt;&amp;nbsp;with&amp;nbsp;&amp;lt;chunked_transfer&amp;gt; flag&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>