This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160: TCP/IP Server-Client with BSD library

Hi,

Finally i am able to build a basic TCP/IP server client, attaching the project heretcp_client_server.zip, 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 what even API I call?
  • 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?
  • If i want to use the nrf91 as a serial lte modem how can i realize the functionality of RI, DSR, DTR?
  • 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.

regards

KK

Parents
  • Hello,

     

    I see two different socket calls nrf_xxx and and plain bsd apis, which one i should  use? or it doesnt matter what even API I call?

     You should use the bsdlib socket API. I believe that's what you're referring to when you say "nrf_xxx".

     

    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?

     If you put the application core to sleep with AT#XSLEEP then bsdlib will wake it up when there is a connection request.

     

    If i want to use the nrf91 as a serial lte modem how can i realize the functionality of RI, DSR, DTR?

     I think you need to use RTS and CTS instead if I'm not mistaken.

     

    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.

     I will answer this one on Monday.

  • Hi Hakon

    Thanks for your reply

    You should use the bsdlib socket API. I believe that's what you're referring to when you say "nrf_xxx".

    What i meant here is, in my attached sample code i used socket(), connect(), send(), inet_pton() etc..

    in nrf provided bsdlib i have nrf_socket(), nrf_connect(), nrf_send(), nrf_inet_pton() 

    which one i should  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).

     If you put the application core to sleep with AT#XSLEEP then bsdlib will wake it up when there is a connection request.

    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?

     I think you need to use RTS and CTS instead if I'm not mistaken.

    I mean RI(ring indicator), DSR & DTR are standard modem control lines along with RTS and CTS.

    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 correct?

    I will answer this one on Monday.

    Please, I am eagerly waiting for your answer, it is one of my critical requirement to have TLS/SSL serve socket running on nRF91.

    regards

    KK

  • Running a TLS server on the nrf9160 is not supported at the moment, and I'm not sure if it will ever be supported. Also, running a TLS server on the nrf9160 will be problematic for different reasons, including NAT and firewall issues. You would probably need to ask your network operator to configure a static IP address at least.

  • 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.

  • I have been informed that the TLS server mode is being worked on at the moment and will be available in the future.

  • 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?

  • kk2mkk said:
    Mean while can you please provide me a sample with TLS client socket implementation?

     I linked to one in one of my previous replies.

Reply Children
Related