<?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 system gets stuck in &amp;quot;getaddrinfo&amp;quot; function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57025/nrf9160-system-gets-stuck-in-getaddrinfo-function</link><description>Hi, 
 I am using NCS v1.1.0 and modem fw 1.1.0. 
 We had prepared our application in NCS v1.0.0 and now i have moved it to v1.1.0. 
 In new sdk v1.1.0 ,When i try to get Address of the server using &amp;quot;getaddrinfo&amp;quot; system gets stuck in that function. 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jan 2020 07:51:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57025/nrf9160-system-gets-stuck-in-getaddrinfo-function" /><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231787?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2020 07:51:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa94cf41-03e6-4116-8a9b-2931d62dc0a2</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Have a look at the Zephyr &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.1.0/zephyr/reference/kernel/index.html#scheduling-interrupts-and-synchronization"&gt;documentation here&lt;/a&gt;. Specifically, the thread section and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.1.0/zephyr/reference/kernel/threads/index.html?highlight=priority#_CPPv321k_thread_priority_set7k_tid_ti"&gt;k_thread_priority_set()&lt;/a&gt;&amp;nbsp;can be of help.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231779?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2020 06:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d766a7a-c8d6-4e4c-abb9-79bfd4a7b619</guid><dc:creator>khodidas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How can i set priority for my routines ?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Smitesh Mali&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231364?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 10:55:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44b873ae-7523-4fe0-a3f8-8cc0494932f0</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;The k_work_submit routine has not changed the last three years.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you ensured that you have the correct priority on your routines?&lt;/p&gt;
&lt;p&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231343?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 09:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50d35c54-ae03-4d83-9b83-38cabb5466d6</guid><dc:creator>khodidas</dc:creator><description>&lt;p&gt;Please do so.&lt;/p&gt;
&lt;p&gt;As we want to find why calling &amp;quot;getaddrinfo&amp;quot; through &amp;quot;&lt;span&gt;k_work_submit&amp;quot; fails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Smitesh Mali&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231339?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 09:49:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:135eb638-c57f-46ab-bb1e-f7af454635bf</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Ok, good to hear you found a solution!&lt;br /&gt;&lt;br /&gt;I would compare the Zephyr BSD socket chapters between &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.0.0/zephyr/reference/networking/sockets.html?highlight=getaddrinfo"&gt;v1.0.0&lt;/a&gt; and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.1.0/zephyr/reference/networking/sockets.html?highlight=getaddrinfo"&gt;v1.1.0&lt;/a&gt;&amp;nbsp;if you need more information.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231338?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 09:36:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24ee106a-cd5e-4094-8481-7ccee1b3a2ae</guid><dc:creator>khodidas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;connect_to_provision&amp;quot; is made by us. We call &amp;quot;getaddrinfo&amp;quot; in this function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was calling &amp;quot;connect_to_provision&amp;quot; through &amp;quot;k_work_submit&amp;quot; (scheduler) but now i have stopped calling it from &amp;quot;k_work_submit&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Smitesh Mali&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231334?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 09:23:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba52c83c-b86e-4752-85c2-e7296202811a</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
[quote user="khodidas"]We have &amp;quot;connect_to_provision&amp;quot; function&amp;nbsp;in which &amp;quot;&lt;span&gt;getaddrinfo&amp;quot; function is being called.&lt;/span&gt;[/quote]
&lt;p&gt;What is &amp;quot;connect_to_provision&amp;quot;? What does this function do? It&amp;#39;s not a function in&amp;nbsp; NCS.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231315?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 08:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21955cba-4b18-4534-8143-5d4101101782</guid><dc:creator>khodidas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have just found the solution to this problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We have &amp;quot;connect_to_provision&amp;quot; function&amp;nbsp;in which &amp;quot;&lt;span&gt;getaddrinfo&amp;quot; function is being called.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We call &amp;quot;connect_to_provision&amp;quot; through &amp;quot;k_work_submit(&amp;amp;connect_to_provision_work)&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I removed calling &amp;quot;connect_to_provision&amp;quot; function through &amp;quot;k_work_submit&amp;quot; and called it directly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After that system doesn&amp;#39;t get stuck in &amp;quot;getaddrinfo&amp;quot; function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Calling &amp;quot;connect_to_provision&amp;quot; through &amp;quot;k_work_submit&amp;quot; was working with NCS v1.0.0.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you tell me why same thing is not working with NCS v1.1.0 ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Smitesh Mali&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231297?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 05:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22fed429-b1bd-42cf-b140-f69464202d00</guid><dc:creator>khodidas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Following is the RSSI response&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CESQ = +CESQ: 99,99,255,255,24,65.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please refer above thread for rest of the answers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Smitesh Mali&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231248?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 16:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:791635fd-db2a-4d48-a045-36f267f6df13</guid><dc:creator>khodidas</dc:creator><description>[quote userid="77062" url="~/f/nordic-q-a/57025/nrf9160-system-gets-stuck-in-getaddrinfo-function/231134"]Did your application work before moving to v1.1.0?&amp;nbsp;Have you based your application on any of our samples or is this built from ground up?[/quote]
&lt;p&gt;Yes, my application was working before moving to 1.1.0. My application is based on &amp;quot;http application update&amp;quot; sample example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="77062" url="~/f/nordic-q-a/57025/nrf9160-system-gets-stuck-in-getaddrinfo-function/231134"]Are you getting any error messages? When and where are you calling the function in your application? I will need some more information about the application to be able to help.[/quote]
&lt;p&gt;No i am not getting any error message. It just gets stuck inside &amp;quot;&lt;span&gt;nrf_getaddrinfo&amp;quot; function. I am calling &amp;quot;getaddrinfo&amp;quot; function after modem connects with network. There is delay of 1 second after connecting with network.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="77062" url="~/f/nordic-q-a/57025/nrf9160-system-gets-stuck-in-getaddrinfo-function/231134"]&amp;quot;&lt;em&gt;How is the signal strength where you are testing? If you are certain you are connected to the network, and the signal strength is good&amp;nbsp;&lt;/em&gt;&lt;span&gt;&lt;em&gt;could you take a modem trace when getaddrinfo hangs, so that we can analyze further?&lt;/em&gt;&amp;quot;&lt;/span&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will try to tell you signal strength tomorrow. But there doesn&amp;#39;t seem to be issue of signal strength as if i run &amp;quot;mqtt_sample&amp;quot; example in same hardware then i get address from &amp;quot;getaddrinfo&amp;quot; and also connecting with server without issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Smitesh Mali&lt;/span&gt;&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 system gets stuck in "getaddrinfo" function</title><link>https://devzone.nordicsemi.com/thread/231134?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 12:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97e693b6-2a1c-4e29-90d8-a81e14e258dc</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
[quote user=""]We had prepared our application in NCS v1.0.0 and now i have moved it to v1.1.0.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Did your application work before moving to v1.1.0?&amp;nbsp;Have you based your application on any of our samples or is this built from ground up?&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;In new sdk v1.1.0 ,When i try to get Address of the server using &amp;quot;getaddrinfo&amp;quot; system gets stuck in that function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I debugged it and found that it gets stuck in &amp;quot;nrf_getaddrinfo&amp;quot; function inside &amp;quot;&lt;span&gt;getaddrinfo&amp;quot;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Are you getting any error messages? When and where are you calling the function in your application? I will need some more information about the application to be able to help.&amp;nbsp;&lt;/p&gt;
[quote user=""]As mentioned in the case , I verified the LTE connection. I always call &amp;quot;&lt;span&gt;getaddrinfo&amp;quot; after LTE connection.&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;And as mentioned by my colleague in that ticket:&lt;br /&gt;&lt;br /&gt;&amp;quot;&lt;em&gt;How is the signal strength where you are testing? If you are certain you are connected to the network, and the signal strength is good&amp;nbsp;&lt;/em&gt;&lt;span&gt;&lt;em&gt;could you take a modem trace when getaddrinfo hangs, so that we can analyze further?&lt;/em&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks!&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>