Does modem retry to send packet after reconnecting to network ?

Hi,

I am currently working on a project using a nrf9160 board (sdk 1.7.1 and Modem FW 1.3.1) and I am using PSM.

During my test, I put the board in a metal box to simulate a lost of connection.

The modem exits sleep mode when a data is pushed by mqtt to the modem and the modem tries to reconnect to the network.

In the case of the modem finds a new network (not the same as the one it was connected before entering sleep mode) during its search after exiting sleep mode, is the connection to the server MQTT re-etablished automatically ? If yes, is the data is resent automatically after reconnecting the server ?

In the case of the modem doesn't find an available network, how can I know that the data has not been sent after exiting sleep mode without waiting the event LTE_LC_NW_REG_UNKNOWN ?

Thank you in advance

Antoine

  • Hello Antonie,

    The socket should be closed where the network is disconnected and then be reconnected again to the mqtt-server once the LTE network is available.

    mqtt_simple samples will have "do_connect" label which reconnects in cases where it has disconnected. But it will not take into account the LTE link status. You can look at assest_tracker_v2 and look at the cloud module implementation.  

    Thanks.

    Best Regars,

    Kazi Afroza Sultana

Related