mqtt_connect(&client) does not return any value during operation, and the program is stuck in mqtt_connect(&client) and does not come out

When I connected mqtt on nRF9160, I found a strange problem, which caused the device to freeze and become bricked. The location cause was found to appear in err = mqtt_connect(&client), mqtt_connect(&client) does not return any value when running, and the program is stuck mqtt_connect(&client) does not come out. What is going on? It is easy to reproduce after a period of normal operation. The device is running on ncs1.5.1, modem V1.2.3.

Below is my mqtt file:

Parents Reply
  • Hi,

    I added the two macros you mentioned and tested them for a day on ncs1.6.0 and mfw_nrf9160_1.2.7, and found that the problem was improved. Some get stuck for 3 and a half minutes and return an error code, and sometimes get stuck for more than ten minutes and return an error code. The error returned is EINVAL. I will test for a few more days to see if the problem is completely solved. If it does solve the problem, I will test again on ncs1.5.1 and mfw_nrf9160_1.2.3 to see if this problem can also be solved. I will reply to the results after the test to you, thank you so much!

Children
No Data
Related