SARA-R410 SSL Socket

Hi guys.
I am using a SARA-R410M chip with SSL sockets.
I have configured the module for dutch KPN and I can connect to the SSL server (raw data), so far so good…
This are the connect commands:

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,“some.nice-server.com”,%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);

When I send data over the socket with the USOWR command, half of the time the data is received at the server side right away. The other half of the time it is not.
When I re-send the message, I receive 2 messages on the server side.
So I think the data is ‘stuck’ somewhere.

Does anyone else see this behavior? And what to do about it.

Kind regards
Tom