<?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 select() always returns 115</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75994/nrf9160-select-always-returns-115</link><description>I have an nRF9160 with nrfx v2.5.0 and nrfxlib v1.5.1. We have integrated nrf_modem into our own OS. I would like to use TCP sockets asynchronously, but cannot establish a nonblocking connection. 
 I can establish a TCP connection to our server while</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Jun 2021 06:40:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75994/nrf9160-select-always-returns-115" /><item><title>RE: nRF9160 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/316004?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 06:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:202e4d02-c5ae-4a0b-bdaa-85c40942b7b2</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt;H&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt;ello Gareth,&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;&lt;span lang="en-GB"&gt;I just found out that &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt;nrf_select()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt; is not supported yet within our implementation neither.&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;&lt;span lang="en-GB"&gt;You might wanna have a look at the Zephyr implantation of the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/reference/networking/sockets.html#c.zsock_select"&gt;select()&lt;/a&gt;&amp;nbsp;function and implement it to your OS?&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;&lt;span lang="en-GB"&gt;However, that implementation is more of a &amp;quot;prosthesis&amp;quot; to make existing applications that require &lt;em&gt;select()&lt;/em&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt;work a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt;nd it is suggested to use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/reference/networking/sockets.html?highlight=poll#c.zsock_poll"&gt;poll()&lt;/a&gt;&amp;nbsp;directly instead. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span lang="en-GB"&gt;But this might be something that you are already&amp;nbsp;doing now?&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;&lt;span lang="en-GB"&gt;Regards,&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;&lt;span lang="en-GB"&gt;Markus&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 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/315650?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 13:40:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4807b706-732e-45ac-a612-46faed6614c1</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p lang="en-GB"&gt;Hello again Gareth,&lt;/p&gt;
&lt;p lang="en-GB"&gt;I’m unfortunately not quite sure if I can give you a proper answer to your question. Since the introduction of the nRF Connect SDK, our applications and libraries basically are based on the Zephyr RTOS. If we would have supported other operating systems, we would have announced that officially.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Of course that shouldn’t mean that it is not possible to use our libraries in other environments as well, but this is unfortunately nothing we have support for.&lt;/p&gt;
&lt;p lang="en-GB"&gt;May I ask why you have decided to use your own OS instead of Zephyr?&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards,&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/314882?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 11:10:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29ad6d12-f3a2-4c35-a8b4-ebd3d2523368</guid><dc:creator>Gareth</dc:creator><description>&lt;p&gt;Hi Markus, thank you for following up with my select() enquiry. For clarification, I am receiving -1 in case of error, but I get 115 when I pull errno (i.e. that set by nrf_modem_os_errno_set()) . It is perhaps possible that select() is a function that does not set errno, though this seems unlikely as I had cleared errno prior to calling select().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regardless, is there anywhere that it is publicly documented that select() only works under Zephyr? I&amp;#39;m just interested in understanding what I have missed, because I have sunk a lot of time into trying to understand something that was never going to work for me. If it&amp;#39;s not documented, may I ask that it be added to the documentation of that function so others don&amp;#39;t similarly get let astray?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/314878?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 10:57:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7259f1c9-7d3d-4bb0-bf41-2033e8301848</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p lang="en-GB"&gt;Hello again Gareth,&lt;/p&gt;
&lt;p lang="en-GB"&gt;I now got some feedback from the modem team and it looks like that we do not have support or the &lt;em&gt;nrf_select&lt;/em&gt; function outside of the Zephyr OS. As you can see in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_modem/doc/api.html?highlight=nrf_select#c.nrf_select"&gt;documentation&lt;/a&gt;, the function returns -1 in case of error. Error number -115 is nothing that is supported by our implementation.&lt;/p&gt;
&lt;p lang="en-GB"&gt;I hope this will answer your question.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards,&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/313975?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 14:25:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e64cfe2-3dc9-4356-bcb3-8fb83fd7a164</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p lang="en-GB"&gt;Thanks for the feedback, Gareth! It is really appreciated.&lt;/p&gt;
&lt;p lang="en-GB"&gt;I’ll check the behaviour of the select() function with our modem team and come back to you.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards,&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/313762?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 21:55:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd901659-ea8b-4afc-8ac5-73c5ca671c1e</guid><dc:creator>Gareth</dc:creator><description>&lt;p&gt;Hey Markus, thanks for your response. I have found that using poll() seems to work in my case (i.e. I wait on revent 0x2) and it seems to actually take ~100ms, which is what I would expect. That addresses my root issue.&lt;/p&gt;
&lt;p&gt;I think I am unblocked for now in that respect, though I&amp;#39;m still concerned about the behaviour of select() and would quite like to understand what is going wrong there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 select() always returns 115</title><link>https://devzone.nordicsemi.com/thread/313673?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 12:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ffb806b-9675-4e97-a330-03772bb99ae5</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p align="left" lang="en-GB"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Hello Gareth,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left" lang="en-GB"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;I unfortunately do not have an answer to your questions right away. I have to check this internally and come back to you as soon as possible!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left" lang="en-GB"&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 align="left" lang="en-GB"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Markus&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>