Sodaq sara r410m - tcp/ip


I’m orientating on using the SARA module on a project but is it possible to connect over a TCP/IP connection.
This using the KPN network, the current example is using UDP and I think the TCP connection is not available looking at the documentation of the SARA.

In the past I have used the LEON module from ublox, there I used the command “+UPSD,0,1,“”” to set the APN but the SARA is not supporting this command (only “+UPSD,0,0,0”).



I got it working, using the settings from the UDP example.
But then create a TCP socket in stead of UDP.


Hello Bram,

I have this setup working on KPN with the following commands:
This example uses SSL.

While you can also send UDP, I assume the IP connection is already working for you.

LtePrint(“AT+USOCR=6\n”); // 17 = UDP. 6 = TCP This command will return the socket number used.
LtePrint(“AT+UDCONF=1,1\n”); // Enable HEX mode
LtePrintf(“AT+USOSEC=%d,1,1\n”, LteSocket); // Activate SSL for this socket.
LtePrintf(“AT+USOCO=%d,“”,%d,1\n”, LteSocket, Settings.LteUdpPort);
LtePrintf(“AT+USOSO=%d,6,1,1\n”, LteSocket); // enable no-delay option for TCP socket.
LtePrintf(“AT+USOSO=%d,65535,8,1\n”, LteSocket); // Set Keep connection alive option

// Send data command, I use HEX format to transmit the data.
LtePrintf(“AT+USOWR=%d,%d,“somecoolhexdata”\n”, LteSocket, length);

This is the server side I used to connect

I have some issue’s, but basislly it is working.

Kind Regards
Tom / PCB Design Buil

Thanks for the example!

Ill take a look at it!