This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MQTT return ERROR after 24 hours

Hello!

 I am sending MQTT commands over UART from an NRF52840 DK to the NRF9160 DK which has the ibasis sim card inside. I noticed 3 times so far that after 24 hours , 1 hour tolerance, I get only  ERROR messages returned after sending the MQTT commands with the payload.  Basically I need to reset the NRF52840 DK and  re-send all the MQTT commands for connecting to the MQTT broker, autenthificating, opening connection and initialising the modem ( AT+CFUN = 1 etc) .

 I was wondering if there were previous experiences like this.  I did use an osciloscope and the NRF52840 DK is sending the right commands with the good payload over UART even after 24 hours, it's just like the modem closes the connection or something...

All the best,

Robert.

Parents
  • Hi, Robert!

    Thank you for reaching out! You're saying that you have to call AT+CFUN=1 in addition to all the MQTT procedures. This means that the modem has shut down at some point. Could you provide a short description of your application's behavior? How often does it upload data, and what does it do in between?

    What kind of MQTT broker are you connecting to? It may be that it has some restrictions/timeouts for connected devices.

    Any logs from the nRF9160 would also be appreciated. Please add "CONFIG_SLM_LOG_LEVEL_DBG=y" in the prj.conf.

    Best regards,
    Carl Richard

  • An update: 

    - last week I got the new O2 sim card ( for IoT ) and took the set up I had on site and brought it on the bench ( nrf52840 dk communicating over uart to nrf9160 dk ) . Did not change anything on it except for the sim card.

     - I am now into the 5th day of the system running continuously without issues. 

    A next step would be to get the same set up with O2 sim card on site and see how it behaves in that area or put the O2 sim card into another set up like this ( just different devices )  on the bench. I will do one of them this week and let you know again what happened.

    All the best,

    Robert.

Reply
  • An update: 

    - last week I got the new O2 sim card ( for IoT ) and took the set up I had on site and brought it on the bench ( nrf52840 dk communicating over uart to nrf9160 dk ) . Did not change anything on it except for the sim card.

     - I am now into the 5th day of the system running continuously without issues. 

    A next step would be to get the same set up with O2 sim card on site and see how it behaves in that area or put the O2 sim card into another set up like this ( just different devices )  on the bench. I will do one of them this week and let you know again what happened.

    All the best,

    Robert.

Children
Related