FMM920 disconnects after sending data

Hello,

I’m setting up a FMM920 device.
I’ve implemented a server with the codec 8 protocol.

Everything works fine while using a non secure GPRS connection

Now, I’ve set up a TLS connection and the device’s behavior changed.
With a TLS connection, the device send its data to the server (and data in memory) the, it disconnects itself (sending STX/LF bytes before that). After 1/2 minutes, it connects again and send its new data.

Without TLS, it stays connected. Sending data every minute.

Is this behavior correct ?
How to avoid this disconnection?

Thanks

Hi

Good day, please check if you have the correct certificates from your device and from your server.

Please follow this wiki page for the TLS implementation: TLS/DTLS implementation for Flespi using OpenSSL - Wiki Knowledge Base | Teltonika GPS (teltonika-gps.com)

Best Regards
Maynard C

Hi,
Problem solved.
Certificates were OK.
Debugging with Wireshark I saw the final response sent to the Teltonika device (4 bytes for the number of frames) was sent over the wire in 2 or 3 TCP packets. I don’t know why as I was using a Java method to write Int.
Using an array of bytes instead to force the 4 bytes to be in the same packet resolved the problem.

Thanks