Gemalto is now part of the Thales Group, find out more.

You are here

EHS6T : Message send from server arrive too late to the modem | Thales IoT Developer Community

January 31, 2017 - 11:31am, 1935 views

Hi,

I'm using this modem :

Cinterion
EHS6
REVISION 03.001
A-REVISION 00.000.31

I'm sending messages from the server to the modem (client). In the modem program, I open a socket like this:

String s = "socket://" + m_sAdresse + ":" + m_iPort;

try

{

m_sc = (SocketConnection) Connector.open(s);

}

And I stream data like this :

InputStream m_is = m_sc.openInputStream();

Output stream m_os = m_sc.openOutputStream();

Sending message from the server works well most of time. But sometimes, the server send a message but he did not arrive to the modem. One minute later, server  retry sending the same message, the modem receives the two message together.

When it works the modem receives 14 bytes like this:

[Mon Jan 30 12:00:04 2017] 0000  02 30 4D 57 48 5A 41 26 5A 39 45 4F 40 03       .0MWHZA&Z9EO@.

But when we have a bug, the modem receives 28 bytes like this:

[Mon Jan 30 12:19:33 2017] 0000  02 30 4D 57 48 5A 41 26 5A 39 45 4F 40 03 02 30 MWHZA&Z9EO@.
[Mon Jan 30 12:19:33 2017] 0010  4D 57 48 5A 41 26 5A 39 45 4F 40 03             MWHZA&Z9EO@.

On the server, we see that we have sended two messages.

The 3G network is good.

We have also seen that if we send a message every 5 minutes we haven't the problem, but when we wait over 40 minutes we have the problem. The socket KEEPLIVE flag is set.

Thank you for your help.