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
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
Hi,
Can you provide more information about your use case and your application?
Best regards,
Dejan
Hi Dejan Simonovic, thanks for reply
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 way to full fill my requirement?
thanks,
Dvl
Hi Dvl,
Regarding your COAP server, you can look at the Zephyr COAP server, NCS COAP library and connecting to a COAP server.
Best regards,
Dejan
Hi Dejan Simonovic, Thanks for the reply
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.
i also want to know why COAP server creates two listen socket, what is use of it ?
Thanks,
Dvl
Hi Dvl,
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.
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.
Without security and if just listening for incoming packets, number of total sockets is still limited to around 5.
Best regards,
Dejan