         result += String(mac[i], 16);
     }
 
-    *(config.clientId) = String("d:quickstart:esp8266:") + result;
+    *(config.clientId) = String("a:r6crrd:") + result;
+    Serial.println(*(config.clientId));
 
     // uncomment when user & password is required.
-    // *(config.username) = String("test");
-    // *(config.password) = String("test");
+    *(config.username) = String("a-r6crrd-3gsgqcadid");
+    *(config.password) = String("KRE*0rxt0rilV!2tD@");
     // *(config.channelId) = String("esp8266/");
 
-    *(config.topicPub) = "iot-2/evt/status/fmt/json";
+    *(config.topicPub) = String("iot-2/type/") + String("esp8266/id/") + result + String("/evt/dw.mini/fmt/json");
     Serial.println(
         String("https://quickstart.internetofthings.") +
                 "ibmcloud.com/#/device/"+


    connect_wifi();

    mqtt = new MqttWrapper("quickstart.messaging.internetofthings.ibmcloud.com", 1883, hook_configuration);
    mqtt->connect();
    mqtt->set_prepare_data_hook(hook_prepare_data, 2000);
    mqtt->set_publish_data_hook(hook_publish_data);

void loop() {
    reconnect_wifi_if_link_down();
    mqtt->loop();
}