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

Nrf91 Custom server connection

Hi, I am interested in using the NRF91 in our new products. So far I have modified the Asset_tracker example to send my custom data instead of sending the "sensor data". The idea is to send data to it over UART and it sending it to a custom server over TCP. I am using V0.4.0 of the SDK and SES.

I did some tests to connect to the nrfcloud using the integrated libary, and it works fine. Connection to the server takes a long time. During testing, and after a reset, it took 2 min and 20sek to send the payload to the server. Mainly waiting for the modem to initialize. Compared to an Ublox sara R4 module that used 5 seconds. 

Is there a libary I can use to create a TCP connection to a custom server, and/or a tutorial on how to do it?

  • There are a couple ways to design your own custom program to handle device init and transport using TCP or UDP. I would direct you to the file nrf_socket.h (see /path/to/ncs/nrfxlib/bsdlib/include/). This header file contains all the structs, socket options and socket commands needed to set up a simple UDP or TCP connection.

    There's also socket.h which is the generic socket library provided by Zephyr.

Related