<?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>How to set Non-blocking UDP socket?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50922/how-to-set-non-blocking-udp-socket</link><description>I want to receive data through UDP in eDRX 
 I tried to set up non-blocking UDP by reading this post, but I can&amp;#39;t achieve the function yet. Any help? https://devzone.nordicsemi.com/f/nordic-q-a/49918/non-blocking-udp-socket-fcntl-error-enotsock---argument</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Aug 2019 08:41:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50922/how-to-set-non-blocking-udp-socket" /><item><title>RE: How to set Non-blocking UDP socket?</title><link>https://devzone.nordicsemi.com/thread/204236?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 08:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35cd6656-4640-47dd-acb3-656749f7b27d</guid><dc:creator>Yusuke</dc:creator><description>&lt;p&gt;Thank you! Please let me know when it&amp;#39;s fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set Non-blocking UDP socket?</title><link>https://devzone.nordicsemi.com/thread/204204?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 07:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfc1a07a-4f73-4f2f-be69-0a56cd1842c7</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;There&amp;#39;s something strange here. bind() returns this errno when using newlib c:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/eblot/newlib/blob/master/newlib/libc/machine/cris/sys/errno.h#L153"&gt;https://github.com/eblot/newlib/blob/master/newlib/libc/machine/cris/sys/errno.h#L153&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;when I tried using minimal c (zephyr libc), it returns &lt;span&gt;EINPROGRESS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Other calls seems to be returning the expected errno when its non blocking, but bind should not return that errno per the &amp;quot;man bind&amp;quot; documentation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve reported this internally, and asked about this behavior.&lt;/span&gt;&amp;nbsp;&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: How to set Non-blocking UDP socket?</title><link>https://devzone.nordicsemi.com/thread/204088?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2019 13:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19c4eb2d-8ea5-4abd-9336-ff77fee0ed5b</guid><dc:creator>Yusuke</dc:creator><description>&lt;p&gt;Hi, Hakon. Thank you for helping me many times.&lt;/p&gt;
&lt;p&gt;&amp;gt; Have you updated to the latest v1.0.0 tag, as described in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49918/non-blocking-udp-socket-fcntl-error-enotsock---argument-is-not-a-socket/198964#198964"&gt;this post&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Yes, I use v1.0.0&lt;/p&gt;
&lt;p&gt;&amp;gt; What happens if you run the ntp example without setting fcntl()?&lt;/p&gt;
&lt;p&gt;It works fine. This is output.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SPM: NS image at 0xc000
SPM: NS MSP at 0x20024578
SPM: NS reset vector at 0x1306d
SPM: prepare to jump to Non-Secure image.
***** Booting Zephyr OS v1.14.99-ncs2 *****
getaddrinfo err: 0
client_fd: 3
bind err: 0
sendto ret: 48
Flags: 36
Stratum: 2
Poll: 3
Precision: 4294967272
Root delay: 1728249856
Root dispersion: 2114125824
Ref ID: 4027000512
Ref timestamp: 37747758182192391172
Orig Timestamp: 00
Receive timestamp: 37747763311848377896
Transmit: 37747763311848543134
Unix time: 1565787531
Time: Wed Aug 14 12:58:51 2019&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49918/non-blocking-udp-socket-fcntl-error-enotsock---argument-is-not-a-socket/198964#198964"&gt;this post&lt;/a&gt; says this.&lt;/p&gt;
&lt;blockquote&gt;so basically the socket opening function works fine, but somehow the fcntl doesn&amp;#39;t recognize just opened socket descriptor. The program goes all the way down to the recvfrom function and the bind/send functions work fine with the same socket:&lt;/blockquote&gt;
&lt;p&gt;In my case, fcntl apparently works out, but bind and connect functions cause error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set Non-blocking UDP socket?</title><link>https://devzone.nordicsemi.com/thread/203855?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 13:45:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5da41077-7dac-4bd4-beb6-53dadeff6473</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;Have you updated to the latest v1.0.0 tag, as described in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49918/non-blocking-udp-socket-fcntl-error-enotsock---argument-is-not-a-socket/198964#198964"&gt;this post&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;What happens if you run the ntp example without setting fcntl()?&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></channel></rss>