LOG freeze at mqtt

Using a NRF9160DK. SDK2.0.0. Modem 1.3.2.

I have a problem when setting up a new NRF board to run with MQTT with AWS. 

When the setup is running, I get LOG <inf> for modem connect and the broker IP and then when mqtt_connect is run there are no more LOG events. (And the callback function is not activated). I have tried setting in some printk, which prints fine after the mqtt_connect. The printk sees at is get CONACK and SUBACK and that I publish to the MQTT. AWS logs also show that the publish is received and a response is created and published. 

The code is borrowed from mqtt_simple. the mqtt_connect function returns errorcode 0.

The strange thing is I have 1 board running as should.

Parents Reply Children
  • Hi

    It seems like your empty main loop could potentially be the cause of this issue.

    I would recommend adding a sleep to the main function, for instance by calling k_sleep(K_FOREVER) if you're not going to do anything else in the main function, to let your other threads run.

    This seems to have solved the issue on our side, please let me know if this solves it for you as well,

    -Einar

Related