<?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>NCS 2.6.0 Serial LTE modem at PCA10090 =&amp;gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113477/ncs-2-6-0-serial-lte-modem-at-pca10090-failed-to-work-as-a-tcp-server</link><description>Hi Nordic team 
 At this link, it said nrf9160 can act as a TCP server. I followed the steps to test but TCP client failed to connect the server. 
 https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/serial_lte_modem/doc/slm_testing.html#tcp</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Aug 2024 09:11:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113477/ncs-2-6-0-serial-lte-modem-at-pca10090-failed-to-work-as-a-tcp-server" /><item><title>RE: NCS 2.6.0 Serial LTE modem at PCA10090 =&gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/thread/496781?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2024 09:11:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c82c93d-0029-452f-8927-e9fbd0af04b3</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Jeffery"]Did you ever try in your side?[/quote]
&lt;p&gt;I have tested myself. I tried to reproduce your error but got the Timeout Error. However, we have tested this internally and result was successful. It might be that your operator does not allow incoming IPv6 (or IPv4) for your SIM card (which I assume also happens in my case). You could first try to test your IPv6 connectivity (for example by running &amp;quot;ping -6 ipv6.google.com&amp;quot;) from your computer and if this is successful you can reach out to your network operator with further inquiries.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.6.0 Serial LTE modem at PCA10090 =&gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/thread/496738?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2024 01:10:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02f1dcd0-ce57-43cc-b494-fd2451938069</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Yes. As below, &amp;quot;AT#XSOCKET=2,1,1&amp;quot;.&lt;/p&gt;
&lt;p&gt;The result of connecting by IPV6 was different to IPV4.&lt;/p&gt;
&lt;p&gt;Using IPV4, TCP client (python script) did try to connect the server but timeout error.&lt;/p&gt;
&lt;p&gt;Using IPV6, script halted very soon and showed address cannot be connected.&amp;nbsp; It seems nothing about&lt;/p&gt;
&lt;p&gt;connecting timeout.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you ever try in your side?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/30557.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/50625.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/8037.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.6.0 Serial LTE modem at PCA10090 =&gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/thread/496585?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 10:20:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f244d67-2f97-4703-bec6-349bdd82c0a1</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Have you used proper #XSOCKET command for opening a socket for IPv6, &lt;span&gt;#XSOCKET=2,1,1?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.6.0 Serial LTE modem at PCA10090 =&gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/thread/496488?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 01:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c6dade5-4110-472b-950e-c08470746839</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Hi Dejans&lt;/p&gt;
&lt;p&gt;1. How can we apply a public address for nrf9160? As far as I known, the only way nrf9160 connected to&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; internet was through network operator. IPV4 or IPV6 addressed was private address assigned by network&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; operator. It was confused. As I tested, at every time nrf9160 connects to network, &amp;quot;AT+CGDCONT?&amp;quot; got&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; different IPV4 and IPV6&amp;nbsp;addresses.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp; I also tried IPV6 address as you mentioned.&lt;/p&gt;
&lt;p&gt;At TCP server side, got below IPV6 address&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/48234.png" /&gt;&lt;/p&gt;
&lt;p&gt;Then, edited python script&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/8875.png" /&gt;&lt;/p&gt;
&lt;p&gt;However, as ran this script, the terminal showed error message immediately.&lt;/p&gt;
&lt;p&gt;The Chinese sentence means the IPV6 address cannot be reached.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/80402.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.6.0 Serial LTE modem at PCA10090 =&gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/thread/496381?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 10:06:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef1dbfe5-62b8-40bc-8027-55afd68c0b9b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;&amp;quot;Global private address&amp;quot; should be changed to &amp;quot;public address&amp;quot;. Commonly, device gets IPv4 address from the private range from the network operator and this address cannot be used for TCP server. You could try to use IPv6 address instead by using&amp;nbsp;#XSOCKET=2,1,1. Then bind, listen, accept (as for IPv4) and use AF_INET6 instead of AF_INET. Machine running the script should also have its IPv6 address.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.6.0 Serial LTE modem at PCA10090 =&gt; Failed to work as a TCP server</title><link>https://devzone.nordicsemi.com/thread/496090?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 19:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9456406-befc-4204-9bf8-58c8f547699c</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Jeff,&lt;br /&gt;&lt;br /&gt;I have replicated the problem. I have also tested with different Python server and the connection to the server was successfully established. I think&amp;nbsp;the issue might be related to addressing and accessibility of the device.&lt;/p&gt;
[quote user=""]1. Anything incorrect in my steps?[/quote]
&lt;p&gt;It does not seem to be anything obviously wrong in your steps.&lt;/p&gt;
[quote user=""]&lt;p&gt;2. According to below context, for TCP server, nrf9160 must&amp;nbsp;have global private address.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;I have no idea what you mean and how to have &amp;quot;global private address&amp;quot;.&amp;nbsp;Could you explain?&lt;/p&gt;[/quote]
&lt;p&gt;This does not seem to be correct. I will ask internally for clarification and potential correction.&lt;/p&gt;
[quote user=""]3.&amp;nbsp; Besides, at every time &amp;quot;AT+CFUN=1&amp;quot;, the carrier will assign new IP address to nrf9160.[/quote]
&lt;p&gt;Yes, this is correct. After each power off/on device gets new IP address from the network.&lt;br /&gt;&lt;br /&gt;I will get back to you when I get needed clarification, probably by the end of this week.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>