From 9e62340897f98dc317200ea04a6daf5164e7d37a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 23 Aug 2019 09:42:15 +0200 Subject: [PATCH 1/2] mqtt: referenced esp-mqtt master to fix disconnect issues and updates doxygen macros to have mqtt docs correctly documented Backport of 6289a26596309f3aa4761d383203dfdc74a8eb50 --- components/mqtt/esp-mqtt | 2 +- docs/Doxyfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/mqtt/esp-mqtt b/components/mqtt/esp-mqtt index 6f1fc3785..e3b013e2d 160000 --- a/components/mqtt/esp-mqtt +++ b/components/mqtt/esp-mqtt @@ -1 +1 @@ -Subproject commit 6f1fc3785af8cc7765f78dd93f09aeb0109cd2b7 +Subproject commit e3b013e2db58124ea68cf7c8f44a8cba6e1572b7 diff --git a/docs/Doxyfile b/docs/Doxyfile index 31ea6a480..8be68c7c5 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -238,7 +238,8 @@ PREDEFINED = \ configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS=1 \ configNUM_THREAD_LOCAL_STORAGE_POINTERS=1 \ configUSE_APPLICATION_TASK_TAG=1 \ - configTASKLIST_INCLUDE_COREID=1 + configTASKLIST_INCLUDE_COREID=1 \ + "ESP_EVENT_DECLARE_BASE(x)=extern esp_event_base_t x" ## Do not complain about not having dot ## From a0c8de077b7e7d182e1cf47a29e1d2a489a221df Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 9 Oct 2019 11:03:26 +0200 Subject: [PATCH 2/2] mqtt: updated to latest version to include latest fixes, support for global CA store, extended error structure to receive mqtt specific errors. updated idf ssl example to use this error struct backport of 640eac84fa37af91bf40b49f10a97b30e4b7b6f8 --- examples/protocols/mqtt/ssl/main/app_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/protocols/mqtt/ssl/main/app_main.c b/examples/protocols/mqtt/ssl/main/app_main.c index 86697a03c..3ce00741c 100644 --- a/examples/protocols/mqtt/ssl/main/app_main.c +++ b/examples/protocols/mqtt/ssl/main/app_main.c @@ -115,6 +115,9 @@ static esp_err_t mqtt_event_handler(esp_mqtt_event_handle_t event) break; case MQTT_EVENT_ERROR: ESP_LOGI(TAG, "MQTT_EVENT_ERROR"); + if (event->error_handle->error_type == MQTT_ERROR_TYPE_CONNECTION_REFUSED) { + ESP_LOGI(TAG, "Connection refused error: 0x%x", event->error_handle->connect_return_code); + } break; default: ESP_LOGI(TAG, "Other event id:%d", event->event_id);