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

nRF9160 MQTT connection failure

Hi,

We are using nRF9160 ncs version 1.0.0. 

I have two queries.

We are making connection with AWS server. In the backend we have telenor server. 

We make MQTT connection, publish data and disconnect from server.

Connection interval is 5 minutes. 

We have observed that after 7-8 hours of successful connection (more than 100 times ) it gets stuck in

"connect" function inside "mqtt_client_tls_connect" function. It never comes out of "connect" function. 

Second query is we are using "lte_lc_psm_req" function to put the device in PSM mode to save power.

During first MQTT connection with AWS server device takes more than 10 minutes ( There are multiple failures in MQTT connection during this time )

Initially we get error -111 and then we get error -60. 

After 10 to 15 minutes, connection with  server is established and thereafter we don't have any issue in connection.

Can you help me in resolving this issue ?

Regards,

Smitesh Mali

Parents
  • Hi

    I got word from the developers, and when decrypted, the trace you uploaded only lasts for 40 minutes. It seems like the modem trace collector has been stopped somehow. So we haven't been able to see the disconnection event this time either. You have to make sure the full modem trace is being taken. We've been able to collect traces of this length on with our asset tracker example code, so there shouldn't be an issue with a timeout on the trace collector side. Are you using a development kit to do the tests?

    Best regards,

    Simon

Reply
  • Hi

    I got word from the developers, and when decrypted, the trace you uploaded only lasts for 40 minutes. It seems like the modem trace collector has been stopped somehow. So we haven't been able to see the disconnection event this time either. You have to make sure the full modem trace is being taken. We've been able to collect traces of this length on with our asset tracker example code, so there shouldn't be an issue with a timeout on the trace collector side. Are you using a development kit to do the tests?

    Best regards,

    Simon

Children
  • Hi,

    It is 40 minutes trace only. As i changed the frequency of connection with server to 1 minutes for test to generate

    the issue faster. Issue was generated around 40 minutes as you mentioned. 

    You won't find disconnection event as the system got stuck in "mqtt_connect" function in attempt of making connection.

    After that there won't be any further traces. 

    Do you find anything at the end of this traces which can help

    Regards,

    Smitesh Mali

Related