Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Fadhlika committed Nov 25, 2018
1 parent 6c91a94 commit 1a42255
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 5 additions & 3 deletions examples/mqtt_tcp/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions include/esp_sara_mqtt_err.h

This file was deleted.

0 comments on commit 1a42255

Please sign in to comment.