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

    Can you confirm that you're situated in India while connected to a Norwegian (Telenor) network?

    Keep in mind that the PSM mode intervals are requested by the nRF9160 to the network, it's not a certainty that the nRF9160 gets those intervals from the network. You can check if there is a difference in the PSM modes of your different providers by using the AT command AT+CPSMS?after activating PSM. (as stated in the AT Command documentation). It will return the parameters used.

    Best regards,

    Simon

Reply
  • Hi

    Can you confirm that you're situated in India while connected to a Norwegian (Telenor) network?

    Keep in mind that the PSM mode intervals are requested by the nRF9160 to the network, it's not a certainty that the nRF9160 gets those intervals from the network. You can check if there is a difference in the PSM modes of your different providers by using the AT command AT+CPSMS?after activating PSM. (as stated in the AT Command documentation). It will return the parameters used.

    Best regards,

    Simon

Children
  • Can you confirm that you're situated in India while connected to a Norwegian (Telenor) network?

    Yes, you are right. 

    I will check PSM supported by network using "AT+CPSMS?"

  • Hi,

    I got following reply from "AT+CPSMS?" at command. 

    CPSMS = +CPSMS: 1,,,"00000011","00000001"<CR>

    So the values are same as we requested.

    Some more information about our set up and observations 

     

    We have also made a PC client to behave in the same manor and this runs without any problems.

    We have also moved from one production environment ( At Telenor ) to another and problem still exists. 

    As I have mentioned in my very first thread , there are two issues 

    1. MQTT connection Failure after many successful connections 

    2. nRF9160 takes longer time in first connection if PSM mode is enabled. 

    I work for norwegian company and access the nRF9160 hardware using remote pc set up from 

    India. 

    Regards,

    Smitesh Mali

Related