Had to fork with a different name, because of some incompatibility issues.

Dependencies:   MQTT

Revision:
1:31c93319bbd8
Parent:
0:f86732d81998
--- a/DeviceClient.cpp	Fri Nov 06 07:09:14 2015 +0000
+++ b/DeviceClient.cpp	Fri Nov 06 09:01:29 2015 +0000
@@ -283,6 +283,17 @@
     }
 }
 
+// Return device ID - device might query to get it when its not set
+char* DeviceClient::getDeviceId(char* buf, int buflen)    
+{   
+    // return devices MAC address if deviceId is not set already
+    if(this->deviceId == NULL || (strcmp("", this->deviceId) == 0)) {
+        return getMac(buf, buflen);
+    } else {
+        return strncpy(buf, this->deviceId, buflen);
+    }
+}
+
 // Obtain MAC address
 char* DeviceClient::getMac(char* buf, int buflen)    
 {