<?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>nRF9160 HTTP clien slow response</title><link>https://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</generator><lastBuildDate>Fri, 01 Jul 2022 13:11:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88736/nrf9160-http-clien-slow-response" /><item><title>RE: nRF9160 HTTP clien slow response</title><link>https://devzone.nordicsemi.com/thread/375112?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 13:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:973cf0aa-f22b-4114-a44a-ca217d6a584a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;If you do not properly close() former sockets, this can happen. Is your code updated compared to the initial code you posted? if yes, can you share the updated project?&lt;/p&gt;
&lt;p&gt;Have you implemented the event handler for the lte_lc library, which can give you notifications on what is happening on the network side?&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://devzone.nordicsemi.com/thread/374990?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 02:04:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8edddf6-4796-45e6-9494-fcef2d722aef</guid><dc:creator>nicekey</dc:creator><description>&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="5"&gt;&lt;span class="Q4iAWc"&gt;CONFIG_LTE_AUTO_INIT_AND_CONNECT is set to &amp;#39;n&amp;#39; in my project.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="5"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="2" data-number-of-phrases="5"&gt;&lt;span class="Q4iAWc"&gt;When &amp;quot;Failed to open socket&amp;quot; appears, I make socket link every 20 seconds, but can&amp;#39;t recover from &amp;quot;Failed to open socket&amp;quot;, what should I do?&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="3" data-number-of-phrases="5"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="4" data-number-of-phrases="5"&gt;&lt;span class="Q4iAWc"&gt;When CONFIG_LTE_AUTO_INIT_AND_CONNECT is set to &amp;#39;y&amp;#39;, when &amp;quot;Failed to open socket&amp;quot; appears, it will always stop at &amp;quot;Failed to open socket&amp;quot; and cannot be recovered.&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://devzone.nordicsemi.com/thread/374900?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 12:12:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0dff858-d528-40ad-80bc-0286267f3a1c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="nicekey"]&lt;p&gt;&lt;span style="background-color:rgba(255, 255, 0, 1);"&gt;&lt;span&gt;As in the above code, when the modem is turned on, epd_init() is executed,&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:rgba(255, 255, 0, 1);"&gt;&lt;span&gt;Will other tasks interrupt the execution of epd_init()?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;You need to evaluate your own firmware and how it runs in general.&lt;/p&gt;
&lt;p&gt;Any interrupt that occurs in your application can potentially interrupt that function. However, it seems that very little else is running in your main function at the time of calling that function.&lt;/p&gt;
[quote user="nicekey"]&lt;p&gt;&lt;span&gt;&lt;span&gt;When the modem function is turned on, it takes a long time to boot to the application, it takes four minutes, is this normal?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;It can be if you&amp;#39;re waiting for the LTE Link to connect, ie. if CONFIG_LTE_AUTO_INIT_AND_CONNECT is set to &amp;#39;y&amp;#39;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="nicekey"]If Failed to open socket occurs, I find that calling lte_lc_init_and_connect() has no effect. Do I need to power off and restart the modem at this time?[/quote]
&lt;p&gt;Calling that function again will not help. You&amp;#39;re already enabled and have previously been connected, and the modem is highly likely trying to&amp;nbsp;reconnect to the network. However:&lt;/p&gt;
&lt;p&gt;Without any debug information about the link status at this time, it is hard to say what happens.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please see my former responses on how to get detailed information about your link, ie. via CEREG or possibly the lte_lc&amp;nbsp;handler.&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://devzone.nordicsemi.com/thread/374849?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 08:47:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44817f04-36ed-4838-92b1-eefa8416ee82</guid><dc:creator>nicekey</dc:creator><description>&lt;p&gt;void main(void)&lt;br /&gt;{&lt;br /&gt; int err;&lt;br /&gt; int fd;&lt;br /&gt; char *p;&lt;br /&gt; int bytes;&lt;br /&gt; size_t off;&lt;br /&gt; struct addrinfo *res;&lt;br /&gt; struct addrinfo hints = {&lt;br /&gt; .ai_family = AF_INET,&lt;br /&gt; .ai_socktype = SOCK_STREAM,&lt;br /&gt; };&lt;br /&gt; struct timeval timeout;//666&lt;br /&gt; int data_len;&lt;br /&gt; int link_status = 0;&lt;br /&gt; int recv_data_len = 0;&lt;br /&gt; int result;&lt;br /&gt; //int result_bit;&lt;br /&gt; uint32_t connect_attempt = 0;&lt;br /&gt; cJSON *root = NULL, *object = NULL, *item = NULL;&lt;/p&gt;
&lt;p&gt;printk(&amp;quot;http link onenet sample started\n\r&amp;quot;);&lt;/p&gt;
&lt;p&gt;epd_spi_init();&lt;br /&gt; //k_sched_lock();&lt;br /&gt; epd_init();&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" style="background-color:#ffff00;" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;As in the above code, when the modem is turned on, epd_init() is executed,&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="6"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" style="background-color:#ffff00;" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;Will other tasks interrupt the execution of epd_init()?&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="3" data-number-of-phrases="6"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" style="background-color:#ffff00;" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;If so, how to protect it. In my project, there are no other threads.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" style="background-color:#00ffff;" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;When the modem function is turned on, it takes a long time to boot to the application, it takes four minutes, is this normal?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" style="background-color:#99cc00;" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="2" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;If Failed to open socket occurs, I find that calling lte_lc_init_and_connect() has no effect. Do I need to power off and restart the modem at this time?&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://devzone.nordicsemi.com/thread/374845?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 08:18:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9da463d-3b5d-4664-8946-862568697be5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="nicekey"]&lt;span&gt;&lt;span&gt;will the operation of the modem affect my initialization of the screen?&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;span&gt;For example to interrupt?&lt;/span&gt;&lt;/span&gt;[/quote]
&lt;p&gt;That depends on your local settings. But, yes;&amp;nbsp;there&amp;#39;s communication between the modem and the application, so you can get interrupts when things happen on the LTE Network side of things (for instance, receive a packet etc) that needs to be handled.&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://devzone.nordicsemi.com/thread/374812?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 00:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3608e849-d90a-4fe8-b122-eddf43cffd3f</guid><dc:creator>nicekey</dc:creator><description>&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="4"&gt;&lt;span class="Q4iAWc"&gt;thanks.&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="4"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="2" data-number-of-phrases="4"&gt;&lt;span class="Q4iAWc"&gt;I use an OLED screen with SPI interface, will the operation of the modem affect my initialization of the screen?&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="3" data-number-of-phrases="4"&gt;&lt;span class="Q4iAWc"&gt;For example to interrupt?&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://devzone.nordicsemi.com/thread/374701?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 09:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54f1e27b-140f-4e10-92ea-e789c970a2b7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="nicekey"]1. I encountered the 9160 frequently reporting &amp;quot;Failed to open socket&amp;quot; when reconnecting to the network, what should I do?[/quote]
&lt;p&gt;You should wait until the network connection (and your PDN connection) is established.&lt;/p&gt;
[quote user="nicekey"]&lt;span&gt;&lt;span&gt;2. The screen is used in my project, and the &amp;quot;blinky&amp;quot; routine can light up the screen 100%.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;span&gt;But the same screen code, I tap the screen in the &amp;quot;https_client&amp;quot; routine, and occasionally the phenomenon cannot be turned on.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;span&gt;Will my screen initialization part be interrupted by the modem?&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;span&gt;How do I deal with it?&lt;/span&gt;&lt;/span&gt;[/quote]
&lt;p&gt;I assume screen here is your uart console?&lt;/p&gt;
&lt;p&gt;When you enable modem trace, by setting prj.conf::CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y, the firmware will push data on uart1.&lt;/p&gt;
&lt;p&gt;This is a different UART than the log output (uart console):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts#L178-L179"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts#L178-L179&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you use the lte_lc library, you will get events (derived from AT+CEREG notifications) when network goes down and comes up again:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/samples/nrf9160/aws_iot/src/main.c#L350-L352"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/samples/nrf9160/aws_iot/src/main.c#L350-L352&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can implement logic in the handler there to ensure that the status is checked.&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://devzone.nordicsemi.com/thread/374692?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 08:38:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9196979-6d72-443c-b85a-b40ee3c90fe9</guid><dc:creator>nicekey</dc:creator><description>&lt;p&gt;Hi，&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt;I have two questions:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="2" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt;1. I encountered the 9160 frequently reporting &amp;quot;Failed to open socket&amp;quot; when reconnecting to the network, what should I do?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="3" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="4" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt;2. The screen is used in my project, and the &amp;quot;blinky&amp;quot; routine can light up the screen 100%.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="5" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt;But the same screen code, I tap the screen in the &amp;quot;https_client&amp;quot; routine, and occasionally the phenomenon cannot be turned on.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="6" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt;Will my screen initialization part be interrupted by the modem?&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="7" data-number-of-phrases="8"&gt;&lt;span class="Q4iAWc"&gt;How do I deal with it?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&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://devzone.nordicsemi.com/thread/374068?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 08:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba152fb2-a9ff-40d2-b44d-c7b3402b5482</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you share which mfw version you are using?&lt;/p&gt;
&lt;p&gt;Could you take a modem trace and share this?&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://devzone.nordicsemi.com/thread/374047?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 05:38:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f78b3b20-69eb-4d96-a456-b8982a06bdfb</guid><dc:creator>nicekey</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;I have encountered a problem, one of the 9160s cannot be connected to the Internet&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;&lt;span&gt;The log information is as follows：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;&lt;span&gt;[13:35:33.097]收&amp;larr;◆[00:00:00.670,257] [0m&amp;lt;inf&amp;gt; mqtt_simple: The MQTT simple sample started[0m&lt;br /&gt;[00:00:00.670,288] [0m&amp;lt;inf&amp;gt; mqtt_simple: Disabling PSM and eDRX[0m&lt;br /&gt;[00:00:00.670,959] [0m&amp;lt;inf&amp;gt; mqtt_simple: LTE Link Connecting...[0m&lt;br /&gt;[00:00:00.671,356] [1;31m&amp;lt;err&amp;gt; lte_lc: Failed to get system mode, error: -77[0m&lt;br /&gt;[00:00:00.671,356] [1;31m&amp;lt;err&amp;gt; lte_lc: Could not get current system mode, error: -14[0m&lt;br /&gt;[00:00:00.671,356] [0m&amp;lt;inf&amp;gt; mqtt_simple: Failed to establish LTE connection: -14[0m&lt;br /&gt;[00:00:00.671,386] [0m&amp;lt;inf&amp;gt; mqtt_simple: Retrying in 120 seconds[0m&lt;/span&gt;&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://devzone.nordicsemi.com/thread/374044?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 03:13:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0da1362f-6a2c-45ce-bf22-4db3d3d726e8</guid><dc:creator>nicekey</dc:creator><description>&lt;p&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;Thank you for your reply.&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="1" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;I have encountered a problem, one of the 9160s cannot be connected to the Internet, and the log information contains &amp;quot;Disabling PSM and eDRX&amp;quot;. What are the reasons for this result?&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="2" data-number-of-phrases="3"&gt;&lt;span class="Q4iAWc"&gt;I have tried updating the modem firmware.&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://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>H&amp;#229;kon Alseth</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://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>nicekey</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://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>H&amp;#229;kon Alseth</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://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://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>nicekey</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://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>nicekey</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://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>H&amp;#229;kon Alseth</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://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>nicekey</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://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>H&amp;#229;kon Alseth</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>