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

NRF9160 AzureIotHub library bug in subsys\net\lib\azure_iot_hub\src\azure_iot_hub.c - doesn't cater for all MQTT connection issues

Hi,

In the new AzureIotHub library, subsys\net\lib\azure_iot_hub\src\azure_iot_hub.c 

the logic for handling connection conditions in mqtt_evt_handler requires more error handling. When mqtt_evt->type == MQTT_EVT_CONNACK and mqtt_evt->param.connack.return_code != MQTT_CONNECTION_ACCEPTED, the application has no idea that a failure has occurred and so can't recover. Can you add a new AZURE_IOT_HUB_EVT_CONNECTION_FAILURE event code and call azure_iot_hub_notify_event(&evt); within that if(...) check?

Thanks!

Parents Reply Children
Related