<?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>Nrf_recv() VS recv()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65848/nrf_recv-vs-recv</link><description>Hello, 
 Our setup: 
 -nRF9160 
 - Zephyr OS 
 - Segger Embedded Studio for Arm (Nordic Edition) 
 - SDK v1.3 
 Questions 
 1) which are the differences between Zephyr functions VS Nordic functions to be more specifics in nrf_recv() and recv(). 
 2)Do</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Sep 2020 08:06:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65848/nrf_recv-vs-recv" /><item><title>RE: Nrf_recv() VS recv()</title><link>https://devzone.nordicsemi.com/thread/271684?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 08:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63243fb7-2736-4560-9ddb-c12999dd8f3e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Rene,&lt;/p&gt;
&lt;p&gt;recv is just a wrapper for nrf_recv.&amp;nbsp;Because we use socket offloading on the nrf91, recv is redirected to nrf_recv. See&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/lib/bsdlib/nrf91_sockets.c#L748"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/lib/bsdlib/nrf91_sockets.c#L748&lt;/a&gt;,&amp;nbsp;recv calls recvfrom internally.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf_recv() VS recv()</title><link>https://devzone.nordicsemi.com/thread/271616?ContentTypeID=1</link><pubDate>Sat, 26 Sep 2020 00:11:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f7fbbe6-18a6-4699-8b17-fde76cdc6382</guid><dc:creator>ReneDelgado</dc:creator><description>&lt;p&gt;Do not worry for the delay Amanda,&lt;/p&gt;
&lt;p&gt;Thank you for your answer but they did not solve my main doubt and the H&amp;aring;kons explanation in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46764/connecting-an-nrf9160-to-aws" rel="noopener noreferrer" target="_blank"&gt;this thread:&lt;/a&gt;&amp;nbsp; is not relates with our doubts.&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;1) Why does at_cmd.h use recv () and not use nrf_recv ()? This is important because it is a Nordic example.&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;2) What are the differences between recv () and nrf recv ()? Why do you needed to implemented nrf_recv () ? I mean, why in close code and not just a grapper?&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Sorry for our insistence, but nrf_recv() is closed source and our team cannot make objective decisions about it.&lt;br /&gt;&lt;br /&gt;As an additional note, these doubts arise because the implementations of at_cmd.c and therefore the lte link controller cannot be used in our company because it have practices that we consider dangerous such as the use of &amp;quot;goto&amp;quot; and others. For that reason, we must implement our own socket handlers.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks a lot,&lt;/p&gt;
&lt;p&gt;Ren&amp;eacute; D.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf_recv() VS recv()</title><link>https://devzone.nordicsemi.com/thread/270472?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2020 07:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52ea60c6-61f2-475d-a0c6-fc5dcb340eb3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Rene,&lt;/p&gt;
&lt;p&gt;Sorry for the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I agree with Emil&amp;#39;s explanation. The &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/doc/api.html?highlight=nrf_recv#_CPPv48nrf_recviPv6size_ti"&gt;nrf_recv()&lt;/a&gt;&amp;nbsp;is supported by&amp;nbsp;the&amp;nbsp;&lt;span&gt;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/README.html#bsdlib"&gt;BSD library&lt;/a&gt;&amp;nbsp;&lt;span&gt;OS-specific parts are moved out of the library. See&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/README.html#bsdlib"&gt;BSD library&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]3)In what cases is recommended using nordic socket functions &amp;nbsp;and in which ones zephyr functions?[/quote]
&lt;p&gt;Please see Håkons explanation in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46764/connecting-an-nrf9160-to-aws" rel="noopener noreferrer" target="_blank"&gt;this thread:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- &amp;quot;you are mixing the nrf_socket.h and the zephyr socket API. They do not play well together and need translation (see nrf91_sockets.c for more detailed info).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The include &amp;quot;net/socket.h&amp;quot; is also a bit suspicious, as you want to use the socket offloading, thus the translation between nrf and zephyr API. When you are calling socket() (and other calls), I am unsure which function you are calling in the background. This could be the network stacks socket implementation, which will not work with the nRF9160, or it could be the socket offloading (thus going into nrf91_sockets.c) which would have a mismatch of the structs.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf_recv() VS recv()</title><link>https://devzone.nordicsemi.com/thread/270416?ContentTypeID=1</link><pubDate>Sat, 19 Sep 2020 16:35:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a68a171-7eb5-4e36-8c5d-f2e95034b9d0</guid><dc:creator>ReneDelgado</dc:creator><description>&lt;p&gt;Hello Nordic team, there are any update?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>