From 1a42255b5e0262190b01aa059623f725c9e49a79 Mon Sep 17 00:00:00 2001 From: Muhammad Fadhlika Date: Sun, 25 Nov 2018 14:28:01 +0700 Subject: [PATCH] update docs --- examples/mqtt_tcp/main/main.c | 8 +++++--- include/esp_sara_mqtt_err.h | 6 ------ 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 include/esp_sara_mqtt_err.h diff --git a/examples/mqtt_tcp/main/main.c b/examples/mqtt_tcp/main/main.c index 73f2111..9e05578 100644 --- a/examples/mqtt_tcp/main/main.c +++ b/examples/mqtt_tcp/main/main.c @@ -46,8 +46,9 @@ static esp_err_t sara_event_handle(esp_sara_event_handle_t *event) { ESP_LOGI(TAG, "MQTT_CONNECTED"); mqtt_connected = true; - esp_sara_subscribe_mqtt(client, "/test/rx", 1); + esp_sara_subscribe_mqtt(client, "generic_brand_617/generic_device/v1nm/common", 1); } + break; case SARA_EVENT_MQTT_DATA: { ESP_LOGI(TAG, "MQTT_DATA"); @@ -68,9 +69,10 @@ static esp_err_t sara_event_handle(esp_sara_event_handle_t *event) { ESP_LOGE(TAG, "MQTT ERROR %d %d", *(int*) event->payload, *(int*)(event->payload + 4)); } + break; case SARA_EVENT_CME_ERROR: { - ESP_LOGE(TAG, "CME ERROR %s", (char)event->payload); + ESP_LOGE(TAG, "CME ERROR %s", (char*)event->payload); } default: break; @@ -91,7 +93,7 @@ void app_main() esp_sara_mqtt_client_config_t mqtt_config = {}; mqtt_config.client_id = "dytrax"; - mqtt_config.host = "66.42.48.129"; + mqtt_config.host = "127.0.0.1"; mqtt_config.port = 1883; mqtt_config.timeout = 120; mqtt_config.clean_session = false; diff --git a/include/esp_sara_mqtt_err.h b/include/esp_sara_mqtt_err.h deleted file mode 100644 index 61d0222..0000000 --- a/include/esp_sara_mqtt_err.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ESP_SARA_MQTT_ERR_H -#define ESP_SARA_MQTT_ERR_H - - - -#endif \ No newline at end of file