<?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 solve socket -23 error while creating multiple server in nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116187/how-to-solve-socket--23-error-while-creating-multiple-server-in-nrf9160</link><description>Hi Support team, 
 
 I am using nRF9160 module and i want run two server on the module, one is modbus server and other is CoAP server. so is it possible to run both server simultaneously ? 
 
 Thanks, 
 Dvl</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Nov 2024 15:29:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116187/how-to-solve-socket--23-error-while-creating-multiple-server-in-nrf9160" /><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509540?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 15:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0ffccd8-fc28-4c2e-aa1b-9d758579b4af</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/members/dejans"&gt;Dejan&lt;/a&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your support,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was able to increase Max FDs, using macro CONFIG_POSIX_MAX_FDS, I have added&amp;nbsp;CONFIG_POSIX_MAX_FDS=8 line in &amp;#39;prj.conf&amp;#39; file. now both server are running ok.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks again for your kind support.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dvl&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509539?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 14:58:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:140b2829-2111-4318-bfc3-f8f8320f0495</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/dejans"&gt;Dejan&lt;/a&gt;,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks for this information,&lt;/p&gt;
&lt;p&gt;1. I added&amp;nbsp;&lt;span&gt;CONFIG_ZVFS_OPEN_MAX=8 in my &amp;quot;prj.conf&amp;quot; file but it is showing error that this is unknow macro, so i went to &amp;#39;lib/os/Kconfig:13&amp;#39;(as per&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ZVFS_OPEN_MAX"&gt;ZFVS_OPEN_MAX&lt;/a&gt;) this path but there is nothing like that config option. FYI, i am using nRF SDK 2.6.0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Have you test this by updating ZFVS_OPEN_MAX macro value? please Guide me how and where to increase this value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dvl&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509538?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 10:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0753e32e-a875-42fd-99af-2e593e562e53</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;Maximum number of file descriptors is 4 by default and they are all allocated which means that the application runs out of descriptors. When c&lt;span&gt;alling accept(), it would return a new STREAM (TCP) socket for every incoming connection. This means that Zephyr runs out of file descriptors even before modem runs out of sockets (5). You could try&amp;nbsp;to increase&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ZVFS_OPEN_MAX"&gt;ZFVS_OPEN_MAX&lt;/a&gt; to 8 (5 for sockets on nRF91 side plus 2 for socketpair() plus one extra).&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509537?ContentTypeID=1</link><pubDate>Sat, 02 Nov 2024 14:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:224b5140-43fd-4974-a0ae-eeab8e992b62</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Dejan Simonovic, thanks for your effort.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Its good news that you got same log as mine, Please now help me to solve this issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Please ignore IP Address error, because that log is just for information. by mistake, I used LOG_ERR() that&amp;#39;s a reason it showing this log as error, i am sorry for that. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. I changed that log tag and created another version of code, please use below code if you want.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAPAndTCPServer_5F00_v0.3.zip"&gt;devzone.nordicsemi.com/.../CoAPAndTCPServer_5F00_v0.3.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dvl&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509536?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2024 16:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cba43611-e564-4fea-b143-dd3d838e4a82</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;I have managed to replicate the error. However, I also got IP address error which I do not see in your log. Could this also be due to IP address not being static?&lt;br /&gt;&lt;br /&gt;Below is my log.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;err&amp;gt; main: [311]IP_Address_str : 10.61.100.236
&amp;lt;inf&amp;gt; CoAP_APP: coap_service_start : 0
&amp;lt;inf&amp;gt; CoAP_APP: coap_service_is_running : 1
&amp;lt;inf&amp;gt; main: [171]StartTCPServer
&amp;lt;inf&amp;gt; main: [187]StartTCPServer &amp;gt;&amp;gt; socket &amp;gt;&amp;gt; serv &amp;gt;&amp;gt; 3
&amp;lt;inf&amp;gt; main: Started TCP server example on port 502, 0
&amp;lt;err&amp;gt; main: error: accept: 23, -1
&amp;lt;err&amp;gt; main: error: accept: 23, -1
&lt;/pre&gt;&lt;br /&gt;&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509535?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 15:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aab40d24-c20a-425f-b1ac-140e87cc77a4</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Dejan Simonovic,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Working means SIM registrations is working. but i am still getting following error &amp;quot;&amp;lt;err&amp;gt; main: error: accept: 23, -1&amp;quot; .&lt;/p&gt;
&lt;p&gt;2. Will you please provide me the APN of your SIM ? or just replace apn string (apn.static.bell) with your SIM apn in code. i have shared you, updated version v0.2 below. and then try, it might worked now !!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAPAndTCPServer_5F00_v0.2.zip"&gt;devzone.nordicsemi.com/.../CoAPAndTCPServer_5F00_v0.2.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Please share log of AT+CGDCONT? FYI, I have added it, in v0.2 for debug purpose, it will now log every 1 second with network status read command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dvl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509534?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 09:57:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd20fd08-586a-43fa-a4d9-0b8370c7cd94</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;I have tested again with your latest code. Pressing Reset button on the nrf9160-dk board does not change the output for me. In other words, it is &amp;quot;&lt;span&gt;+CEREG: 0,2, ...&lt;/span&gt;&lt;span&gt;&amp;quot;. However, when I power cycle the nrf9160-dk board I get ZEPHYR FATAL ERROR shown below.&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1730368079286v1.png" alt=" " /&gt;&lt;br /&gt;Using adddr2line on the faulting address&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin&amp;gt; arm-zephyr-eabi-addr2line.exe -e &amp;lt;path_to_your_project&amp;gt;\build\zephyr\zephyr.elf 0x0001de7e&lt;/pre&gt;&lt;br /&gt;gives the following output&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:/Users/desi/ncs/v2.6.0/zephyr/lib/libc/newlib/libc-hooks.c:469&lt;/pre&gt;&lt;br /&gt;Can you replicate this on your nrf9160-dk when you power off/on the device?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="Dvls"]I have Just tested following latest code and its working[/quote]
&lt;p&gt;&lt;span&gt;Can you provide information how it works in your case? Is it working as expected or still gives &amp;quot;&amp;lt;err&amp;gt; main: error: accept: 23, -1&amp;quot;?&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509533?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 15:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b490fd94-2779-47a0-ac63-567f6c1bf1c6</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Dejan Simonovic,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;will you please do power cycle of DK and flash same version code again and check if it might work.!!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have Just tested following latest code and its working&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2870.CoAPAndTCPServer_5F00_v0.1.zip" rel="noopener noreferrer" target="_blank"&gt;CoAPAndTCPServer_v0.1.zip&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dvl&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509532?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 10:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aa72e82-8838-447f-93e8-dc1653a3a30c</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;With the latest version of your project (for any SIM) there seems to be no registration to the network. With the previous iteration of your project, I was able to get &amp;quot;&lt;span&gt;+CEREG: 0,1, ...&lt;/span&gt;&amp;quot; similar to what you showed in your previous log.&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509531?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 11:29:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5658594-d6f2-4bca-80fb-e301470fb5a5</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Dejan Simonovic,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;&amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,2, ...&amp;quot; this log means you are not registered into network, please insert good SIM, that has good network coverage around your place.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dvl&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509530?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 10:21:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26469f12-6473-43af-8c58-25dabb82fd40</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;I am not able to reproduce what you see on my nrf9160-dk board.&lt;br /&gt;I have built (for board target nrf9160dk_nrf9160_ns) and flashed your modified project to nrf9160-dk board using NCS v2.6.0. I am continuously getting &lt;br /&gt;&amp;quot;&amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,2, ...&amp;quot; message in the terminal output.&lt;br /&gt;Do you get the same when using nrf9160-dk board?&lt;br /&gt;I hope that you can modify your project further so that I can replicate what you see. Alternatively, you could try to make a minimal sample which demonstrates the behavior and has reproducible output.&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509529?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 17:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5cb7211-4606-436f-b27f-9aab639ac6a1</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Dejan Simonovic,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My SIM is static SIM, but I updated code and it will work for any SIM now, so please try this following one,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAPAndTCPServer_5F00_v0.1.zip"&gt;devzone.nordicsemi.com/.../CoAPAndTCPServer_5F00_v0.1.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dvl&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509528?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 08:31:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f860ea3f-aa2f-4440-9ab2-eeeeda7ba821</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;Does your application require static IP address? Could the reason for seeing different output be that I tested using SIM card which does not have public static IP address?&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509527?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2024 16:31:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37a3bbe3-0ea1-474f-8051-0a46d6545ef1</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Dejan Simonovic,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;look like you have not posted complete log file, is network registered successfully ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tested same code by commented network register process code and i got same log as yours, so i think, network might not registered in your case. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please use below log as reference, it shows text during network registration is on going&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.333,648] &amp;lt;inf&amp;gt; main: [142]main
[00:00:02.605,895] &amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,4
OK

[00:00:03.614,898] &amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,2,&amp;quot;2BDC&amp;quot;,&amp;quot;0340830A&amp;quot;,7
OK

[00:00:04.623,931] &amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,2,&amp;quot;2BDC&amp;quot;,&amp;quot;0340830A&amp;quot;,7
OK

[00:00:05.624,572] &amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,2,&amp;quot;2BDC&amp;quot;,&amp;quot;0340830A&amp;quot;,7
OK

[00:00:06.625,427] &amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,2,&amp;quot;2BDC&amp;quot;,&amp;quot;0340830A&amp;quot;,7
OK

[00:00:07.626,007] &amp;lt;inf&amp;gt; main: RSP : +CEREG: 0,1,&amp;quot;2BDC&amp;quot;,&amp;quot;0340830A&amp;quot;,7
OK

[00:00:07.626,647] &amp;lt;inf&amp;gt; CoAP_APP: coap_service_start : 0
[00:00:08.626,708] &amp;lt;inf&amp;gt; CoAP_APP: coap_service_is_running : 1
[00:00:09.626,922] &amp;lt;inf&amp;gt; main: [67]StartTCPServer
[00:00:09.626,953] &amp;lt;inf&amp;gt; main: Project : CoAPAndServer
[00:00:09.627,349] &amp;lt;inf&amp;gt; main: [76]StartTCPServer &amp;gt;&amp;gt; socket &amp;gt;&amp;gt; serv &amp;gt;&amp;gt; 3
[00:00:09.627,685] &amp;lt;inf&amp;gt; main: Started TCP server example on port 502, 0
[00:00:09.627,716] &amp;lt;err&amp;gt; main: error: accept: 23, -1
[00:00:09.827,850] &amp;lt;err&amp;gt; main: error: accept: 23, -1
[00:00:10.027,984] &amp;lt;err&amp;gt; main: error: accept: 23, -1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Dvl&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509526?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2024 11:46:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5e2a2d2-4dcb-4166-acf5-c0ecf4c5d957</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dhaval,&lt;br /&gt;&lt;br /&gt;After replacing IP address in STATIC_IP_STR, I have managed to build (using &amp;quot;west build -b nrf9160dk_nrf9160_ns -d build&amp;quot; command in VS Code) and flash your application to nrf9160-dk in NCS v2.6.0 but the log error that I got (shown below) is different than yours&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;inf&amp;gt; CoAP_APP: coap_service_start : -114
&amp;lt;inf&amp;gt; CoAP_APP: coap_service_is_running : 0
&amp;lt;inf&amp;gt; main: [67]StartTCPServer
&amp;lt;inf&amp;gt; main: [75]StartTCPServer &amp;gt;&amp;gt; socket &amp;gt;&amp;gt; serv &amp;gt;&amp;gt; 2
&amp;lt;err&amp;gt; main: error: bind: 114&lt;/pre&gt;&lt;br /&gt;Is there anything else missing? Should anything else be changed?&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509525?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 17:05:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b621b87-7d0b-41e6-a298-49b5b7e2c581</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;Hi Dejan Simonovic, thanks for the effort and sorry for the confusion&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Please let me know how you are building the code, for your information I am building using VS code.&lt;/p&gt;
&lt;p&gt;2. Please use below sample for DK,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAPAndTCPServer_5F00_v0.0.zip"&gt;devzone.nordicsemi.com/.../CoAPAndTCPServer_5F00_v0.0.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please Note that you need to change the IP address with your SIM IP address, you can replace your IP address at STATIC_IP_STR define in CoAP.h file.&lt;/p&gt;
&lt;p&gt;FYI, I am using SIM card with Public Static IP&lt;/p&gt;
&lt;p&gt;I hope this might work&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Dvl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509524?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 10:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10b75e39-2a09-40ae-a108-618986c494e5</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dhaval,&lt;br /&gt;&lt;br /&gt;I have not been able to build your sample project in NCS v2.6.0 with provided config files. Building was successful only when commenting out lines in nrf9160dk_nrf9160_ns.conf file, but then I could not see the same log. Can you please provide your build command and specify correct configuration for building the sample and reproducing the error on nrf9160-dk?&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509523?ContentTypeID=1</link><pubDate>Sat, 19 Oct 2024 03:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e8e6133-22e5-487a-98af-51baef1c9980</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/dejans"&gt;Dejan Simonovic&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;to make you batter understanding i have attaching complete project zip and debug log file, it very simple project that i am trying to implement, if your are engineer then you might able to understand the flow of code from main.c/main() function.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for compilation i am usinng the SDK version 2.4.0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Here is the debug log file&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Debug_5F00_logfile.txt"&gt;devzone.nordicsemi.com/.../Debug_5F00_logfile.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. main.c file&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1373.main.c"&gt;devzone.nordicsemi.com/.../1373.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Coap server related source file&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAP.c"&gt;devzone.nordicsemi.com/.../CoAP.c&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAP.h"&gt;devzone.nordicsemi.com/.../CoAP.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;4. Complete Project, you might able to compile this project using nRF SDK 2.6.0&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/CoAPAndTCPServer.zip"&gt;devzone.nordicsemi.com/.../CoAPAndTCPServer.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope you might get idea from this information to understand the issue, and if you are not an engineer then please show this information to engineer, he might solve this or will give clear information of this issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regard,&lt;/p&gt;
&lt;p&gt;Dhaval&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509522?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 09:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7995c94-07b9-4645-bde4-55e8fbbe2b0b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;Can you provide more details on what exactly you have done and try to achieve?&lt;br /&gt;&lt;br /&gt;Do you use any security?&lt;br /&gt;&lt;br /&gt;Could you please provide a log showing the error?&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509521?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 18:02:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:228e2859-dc35-42ed-9e9c-01f93b01217d</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/dejans"&gt;Dejan Simonovic&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;FYI, by last test i found that when i open coap server, the fd count reached to 2, then i create modbus TCP server and fd value will be 3, but during accept API, it return -1 and errno 23, so i just dont understand that if socket create and bind is success then why it fails at accept API !!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please let me know if you have any idea..?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Dvl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509520?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 13:28:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a1a8de4-0b03-4985-87d6-f7efb101760b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;If ports are only listening, nrf91 modem does not support DTLS/TLS server mode, only client mode. Server mode would require running TLS stack on the application core.&lt;br /&gt;If ports act as clients and if DTLS/TLS is used, modem has a limit of only one handshake that can be ongoing at the time. Once it is connected, memory is very limited and only 3 DTLS/TLS connections can be active at a time.&lt;br /&gt;Without security and if just listening for incoming packets, number of total sockets is still limited to around 5.&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509519?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2024 15:53:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44eb6bf8-3643-4f70-8220-c65a9ca19788</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/dejans"&gt;Dejan Simonovic&lt;/a&gt;, Thanks for the reply&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i just wanted to know that is it possible to run Http server and COAP server simultaneously ? as i found that nRF9160 allow max 3 server, so if i use COAP server as you mention in above reply then it already creates two listen socket and one CoAP server. so the problem is i can not create the another new server.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i also want to know why COAP server creates two listen socket, what is use of it ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dvl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509518?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2024 09:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c089c55-9cdb-4a9d-b061-7cb45ae6c986</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Dvl,&lt;br /&gt;&lt;br /&gt;Regarding your COAP server, you can look at the Zephyr&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/connectivity/networking/api/coap_server.html"&gt;COAP server&lt;/a&gt;, NCS&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-5-cellular-fundamentals/topic/lesson-5-coap-library/"&gt;COAP library&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-5-cellular-fundamentals/topic/lesson-5-exercise-1/"&gt;connecting to a COAP server&lt;/a&gt;.&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: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509517?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2024 15:42:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fe91217-ae0b-4af8-b1c9-2d1069d2b520</guid><dc:creator>Dvls</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/dejans"&gt;Dejan Simonovic&lt;/a&gt;, thanks for reply&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In my application, i am using static IP SIM, and i have created one modbus server that share the data with modbus master, i have to create another server that handles configuration and OTA information, thus, i will need two server on my nRF9160 module, so need your help to run two server on two different port like 502 and 5683. so will you please suggest the&amp;nbsp;way to full fill my requirement?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Dvl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i Run two server on NRF9160, simultaneously.</title><link>https://devzone.nordicsemi.com/thread/509516?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2024 11:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc30a04e-fdb9-4621-b4b0-9c3a9d86b84b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you provide more information about your use case and your application?&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>