diff --git a/examples/mqtt-client/mqtt-client.c b/examples/mqtt-client/mqtt-client.c index be3c97cdbebad98fe55431bdac5ae720af7e1ed1..b71a193eae9b5572513f83867c01b782eb2bb1f2 100644 --- a/examples/mqtt-client/mqtt-client.c +++ b/examples/mqtt-client/mqtt-client.c @@ -47,7 +47,11 @@ #include <strings.h> /*---------------------------------------------------------------------------*/ #define LOG_MODULE "mqtt-client" +#ifdef MQTT_CLIENT_CONF_LOG_LEVEL +#define LOG_LEVEL MQTT_CLIENT_CONF_LOG_LEVEL +#else #define LOG_LEVEL LOG_LEVEL_NONE +#endif /*---------------------------------------------------------------------------*/ /* Controls whether the example will work in IBM Watson IoT platform mode */ #ifdef MQTT_CLIENT_CONF_WITH_IBM_WATSON @@ -305,6 +309,7 @@ pub_handler(const char *topic, uint16_t topic_len, const uint8_t *chunk, } if(strncmp(&topic[10], "leds", 4) == 0) { + LOG_DBG("Received MQTT SUB\n"); if(chunk[0] == '1') { leds_on(LEDS_RED); } else if(chunk[0] == '0') { diff --git a/examples/mqtt-client/project-conf.h b/examples/mqtt-client/project-conf.h index 66ba909ce850137b37dff3890fbbeb11d7e597f9..6b011f7b0246dae22ea7ab3e7decda80091d3130 100644 --- a/examples/mqtt-client/project-conf.h +++ b/examples/mqtt-client/project-conf.h @@ -52,7 +52,9 @@ * devices, set your Org ID here and then make sure you set the correct token * through MQTT_CLIENT_CONF_AUTH_TOKEN. */ +#ifndef MQTT_CLIENT_CONF_ORG_ID #define MQTT_CLIENT_CONF_ORG_ID "quickstart" +#endif /* * The MQTT username.