<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88736/nrf9160-http-clien-slow-response</link><description>hi: 
 Use the https_client routine to send data after the socket is established, and then send the data after getting the response. The errno returns as 128, which can confirm that the cloud platform is not disconnected. In addition, the time from sending</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Wed, 15 Jun 2022 11:33:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88736/nrf9160-http-clien-slow-response" /><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/372545?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2022 11:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ff3098-38c5-47f0-897b-621b618860a8</guid><dc:creator>user2115</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That return is ETIMEDOUT - you&amp;#39;ll need to close the socket and reconnect.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/372502?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2022 08:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf1ef712-4e5e-480f-a1a4-4b82362e82ad</guid><dc:creator>user116806</dc:creator><description>&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;Hello, when using the recv() function to read data, errno 116 is often returned, how to deal with it.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;Continue reading after waiting?&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;Or reconnect?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/371640?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 11:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1671983-d7e5-4c06-871f-80091da276be</guid><dc:creator>user2115</dc:creator><description>&lt;p&gt;As I have already mentioned, this can potentially take time, depending on your signal strength, the amount of towers in your area, the amount of bands&amp;nbsp;that you&amp;#39;re searching etc.&lt;/p&gt;
&lt;p&gt;What mfw version are you using?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you run the at_client firmware on your end, in the LTE Link Monitor application, and issue these AT commands?&lt;/p&gt;
&lt;p&gt;AT%XSYSTEMMODE=your-settings&lt;/p&gt;
&lt;p&gt;AT+CEREG=5&lt;/p&gt;
&lt;p&gt;AT+CFUN=1&lt;/p&gt;
&lt;p&gt;AT+CFUN?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Wait until the CEREG has returned that you&amp;#39;re connected, which should be printed like this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;+CEREG: 1,&amp;quot;76C1&amp;quot;,&amp;quot;014ACE00&amp;quot;,7,,,&amp;quot;00001010&amp;quot;,&amp;quot;11000001&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And then attach the log file, which is opened here:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1654774450894v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/371595?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 08:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffe758f7-658a-42e9-af9a-4765bcfbf3a7</guid><dc:creator>user116806</dc:creator><description>&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;You can also use the v1.9.1\nrf\samples\nrf9160\https_client routine to request data and verify the response time.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;The hardware development board I am using is PCA10090 0.9.0.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;Transfer rate is important for my project.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;thanks&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/371589?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 08:45:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e85d9cfd-7244-462b-b6d2-cbee9bafab00</guid><dc:creator>user116806</dc:creator><description>&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;How to check the running information of the modem.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;In the same environment, the same process, cloud platform.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;Using other NB modules the link is fine and the data rate is fine.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;From the log information of 9160, it takes 70S from sending GET to receiving data packets, which is not normal.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span class="Q4iAWc"&gt;It has been analyzed from these aspects: network settings, sleep mechanism, sim card, signal, power supply, etc.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/371573?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 08:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a63f346a-be5d-4af2-be33-4386f5118da0</guid><dc:creator>user2115</dc:creator><description>[quote user="nicekey"]OK, thanks. Regarding the problem of returning errno 128, the cloud platform did not actively disconnect. Why does it return errno 128 when sending the second packet, and why does the modem disconnect?[/quote]
&lt;p&gt;Where exactly is it failing, and what are the LTE conditions at this time? Have you checked XMONITOR output before and after the specific function call?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="nicekey"]I use NB1, but the rate of 2 minutes per packet is unacceptable compared to GPRS.[/quote]
&lt;p&gt;Have you identified what call that takes time? As mentioned, you are also connecting to the LTE network within this function, which can take longer time based on your current conditions (signal strength, amount of cell towers in the area, etc)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/371526?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 02:01:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d292614e-5d23-4e52-b01e-5b5e4d51b66e</guid><dc:creator>user116806</dc:creator><description>&lt;p&gt;OK, thanks. Regarding the problem of returning errno 128, the cloud platform did not actively disconnect. Why does it return errno 128 when sending the second packet, and why does the modem disconnect? Reconnecting to the cloud platform every time is time consuming.&lt;br /&gt;I use NB1, but the rate of 2 minutes per packet is unacceptable compared to GPRS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://test-devzone.nordicsemi.com/thread/371356?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 10:34:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef32d4b6-c3f7-425e-87eb-2bbcc37e721e</guid><dc:creator>user2115</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems that you have two issues, one errno returned, and the second that the process (when successful) takes up to 2 minutes.&amp;nbsp;&lt;/p&gt;
[quote user=""]The errno returns as 128, which can confirm that the cloud platform is not disconnected. [/quote]
&lt;p&gt;That errno indicates that your LTE connection is lost, and sockets are also lost:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/eblot/newlib/blob/master/newlib/libc/include/sys/errno.h#L161"&gt;https://github.com/eblot/newlib/blob/master/newlib/libc/include/sys/errno.h#L161&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the LTE connection status at this point? Are you using LTE-M or NB1?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]In addition, the time from sending the request to getting the response is nearly 2 minutes, which is too long to receive. How can I improve the problem I&amp;#39;m encountering now, thank you[/quote]
&lt;p&gt;In your function, you also connect to the LTE network before opening a stream socket. That can take time, depending on the coverage near your area and the signal strength of the connected LTE cell tower.&lt;/p&gt;
&lt;p&gt;If you are using NB1, this is a much slower transport compared to LTE-M, which again adds time to the overall process.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>