<?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: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library</link><description>Hi, 
 Finally i am able to build a basic TCP/IP server client, attaching the project here , i have some questions wrt modem and TCP/IP stack: 
 
 I see two different socket calls nrf_xxx and and plain bsd apis, which one i should use? or it doesnt matter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Mar 2020 20:13:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library" /><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/240728?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 20:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3558722-d8c7-49a8-8586-4d18d2c5e2f1</guid><dc:creator>Lorenzo Amicucci</dc:creator><description>&lt;p&gt;Hi KK,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;my suggestion would be to start with HTTPS example which includes TLS.&lt;/p&gt;
&lt;p&gt;This is already in the SDK and it is called &amp;quot; HTTPS Client&amp;quot;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/https_client"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/https_client&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Otherwise, this is experimental TCP Client example (not part of the SDK):&amp;nbsp;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/tcp"&gt;https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/tcp&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;you&amp;nbsp;may use that sample code as reference and use the snippet: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/net/download_client.html?highlight=tls#https"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/net/download_client.html?highlight=tls#https&lt;/a&gt; on how to provision TLS certificates.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;But still the HTPPS Client example in the SDK is probably better&lt;/p&gt;
&lt;p&gt;Let me know&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;BR&lt;br /&gt;LA&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/239803?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 17:13:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb64b2f9-d7fb-429f-b681-372e025327c2</guid><dc:creator>Hakon</dc:creator><description>[quote user="kk2mkk"]Mean while can you please provide me a sample with TLS client socket implementation?[/quote]
&lt;p&gt;&amp;nbsp;I linked to one in one of my previous replies.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/239737?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 13:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f45fac2-452f-4b68-8692-10104343bdaf</guid><dc:creator>kk2mkk</dc:creator><description>&lt;p&gt;So this will call for new Modem firmware, is that correct? Mean while can you please provide me a sample with TLS client socket implementation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/239683?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 10:33:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c60d9e56-8e20-4616-a2f6-015573e1b602</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;I have been informed that the TLS server mode is being worked on at the moment and will be available in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/239653?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 08:18:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc07a65c-602f-4d19-9234-9e4b5e115e28</guid><dc:creator>kk2mkk</dc:creator><description>&lt;p&gt;I dont think there is any issue with the NAT/Firewall here because in our earlier products we have static IPs provided by the MNO and our customers are ok with such deployments, the worrying question is about the support of TL server mode on nRF91.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/239543?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 13:36:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eca84d21-f414-4f24-a30a-3ac92bf7c484</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Running a TLS server on the nrf9160 is not supported at the moment, and I&amp;#39;m not sure if it will ever be supported. Also, running a TLS server on the nrf9160 will be problematic for different reasons, including &lt;a href="https://en.wikipedia.org/wiki/Network_address_translation"&gt;NAT&lt;/a&gt; and firewall issues. You would probably need to ask your network operator to configure a static IP address at least.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/239053?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 10:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9c270ff-5704-4b53-9f4a-87056219f7c5</guid><dc:creator>kk2mkk</dc:creator><description>[quote userid="73166" url="~/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library/238876"]&amp;nbsp;Yes, this is done entirely by bsdlib when you open a TLS socket. There are several examples that use TLS sockets. One example would be the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/aws_fota"&gt;aws_fota example&lt;/a&gt;. This &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/enabling-and-testing-tls-in-mqtt_5f00_simple"&gt;blog&lt;/a&gt; should also be useful.[/quote]
&lt;p&gt;The documentation you pointed just uses TLS client and that too not a direct TLS-Client, i am looking tls_server, i will be great if you can provide me with some example TLS TCP/IP example code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/238876?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 14:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27a80912-f4d0-41aa-a2e9-a62772e52e0b</guid><dc:creator>Hakon</dc:creator><description>[quote user="kk2mkk"]which one i should&amp;nbsp; use?[/quote]
&lt;p&gt;&amp;nbsp;You can use both, but I recommend you use socket(), connect(), send(), inet_pton() etc. Both use the bsdlib stack and not the native Zephyr stack.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="kk2mkk"]I am confused with your answer all AT commands are meant for modem, do you mean that AT#XSLEEP will put the modem to sleep? can you point to the implementation of #XSLEEP?[/quote]
&lt;p&gt;&amp;nbsp;This command is specific to the serial LTE modem example. I can not point to the implementation of AT#XSLEEP since this is not publicly available information. Also, in the general case you need to wake up the application by means of GPIO, I don&amp;#39;t think it is possible for the modem to wake up the application directly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="kk2mkk"]I mean RI(ring indicator), DSR &amp;amp; DTR are standard modem control lines along with RTS and CTS.[/quote]
&lt;p&gt;&amp;nbsp;The modem on nRF9160 does not use any of these lines. If you&amp;#39;re asking if you can emulate these lines on the application core I guess that would be correct, although I don&amp;#39;t understand why you would do that.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Can I the create a secured socket with ssl/tls with modem TCP/IP stack? if so please point me to an example, note that i dont want to run the ssl layer on the M33 core it will increase my over all current consumption.[/quote]
&lt;p&gt;&amp;nbsp;Yes, this is done entirely by bsdlib when you open a TLS socket. There are several examples that use TLS sockets. One example would be the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/aws_fota"&gt;aws_fota example&lt;/a&gt;. This &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/enabling-and-testing-tls-in-mqtt_5f00_simple"&gt;blog&lt;/a&gt; should also be useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/238629?ContentTypeID=1</link><pubDate>Sat, 07 Mar 2020 05:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5061d147-ccbd-4296-a567-52a5e764ac12</guid><dc:creator>kk2mkk</dc:creator><description>&lt;p&gt;Hi Hakon&lt;/p&gt;
&lt;p&gt;Thanks for your reply&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="73166" url="~/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library/238608"]You should use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/doc/extensions.html"&gt;bsdlib socket API&lt;/a&gt;. I believe that&amp;#39;s what you&amp;#39;re referring to when you say &amp;quot;nrf_xxx&amp;quot;.[/quote]
&lt;p&gt;What i meant here is, in my attached sample code i used socket(), connect(), send(), inet_pton() etc..&lt;/p&gt;
&lt;p&gt;in nrf provided bsdlib i have nrf_socket(), nrf_connect(), nrf_send(), nrf_inet_pton()&amp;nbsp;&lt;/p&gt;
&lt;p&gt;which one i should&amp;nbsp; use? i want to use modem internal TCP/IP stack, not the one which runs on M33 core(in your documentation you call it as CONFIG_NET_NATIVE=n).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="73166" url="~/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library/238608"]&amp;nbsp;If you put the application core to sleep with AT#XSLEEP then bsdlib will wake it up when there is a connection request.[/quote]
&lt;p&gt;I am confused with your answer all AT commands are meant for modem, do you mean that AT#XSLEEP will put the modem to sleep? can you point to the implementation of #XSLEEP?&lt;/p&gt;
[quote userid="73166" url="~/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library/238608"]&amp;nbsp;I think you need to use RTS and CTS instead if I&amp;#39;m not mistaken.[/quote]
&lt;p&gt;I mean RI(ring indicator), DSR &amp;amp; DTR are standard modem control lines along with RTS and CTS.&lt;/p&gt;
&lt;p&gt;Since in nRF SiP the modem and and M33 are wired internally i dont think i have any control on modem control lines as it use to be in standard modem chips, anything i want to have the modem control lines functionality in nRF91 i should write a custom app on M33 core so that i mimic the control lines via GPIO, is my understanding &lt;strong&gt;correct&lt;/strong&gt;?&lt;/p&gt;
[quote userid="73166" url="~/f/nordic-q-a/58726/nrf9160-tcp-ip-server-client-with-bsd-library/238608"]I will answer this one on Monday.[/quote]
&lt;p&gt;Please, I am eagerly waiting for your answer, it is one of my critical requirement to have TLS/SSL serve socket running on nRF91.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;KK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: TCP/IP Server-Client with BSD library</title><link>https://devzone.nordicsemi.com/thread/238608?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 17:40:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da11ed95-b384-4ccc-adcb-a9caceb0a211</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I see two different socket calls nrf_xxx and and plain bsd apis, which one i should&amp;nbsp; use? or it doesnt matter what even API I call?[/quote]
&lt;p&gt;&amp;nbsp;You should use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/doc/extensions.html"&gt;bsdlib socket API&lt;/a&gt;. I believe that&amp;#39;s what you&amp;#39;re referring to when you say &amp;quot;nrf_xxx&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Since I am using modem TCP/IP stack I can put my M33 core in sleep/low power mode, so in this scenario when I have listening socket and a there is an incoming connection can the modem wakeup the core to handle the connection?[/quote]
&lt;p&gt;&amp;nbsp;If you put the application core to sleep with AT#XSLEEP then bsdlib will wake it up when there is a connection request.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]If i want to use the nrf91 as a serial lte modem how can i realize the functionality of RI, DSR, DTR?[/quote]
&lt;p&gt;&amp;nbsp;I think you need to use RTS and CTS instead if I&amp;#39;m not mistaken.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Can I the create a secured socket with ssl/tls with modem TCP/IP stack? if so please point me to an example, note that i dont want to run the ssl layer on the M33 core it will increase my over all current consumption.[/quote]
&lt;p&gt;&amp;nbsp;I will answer this one on Monday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>