Freescale FRDM K64F with DeviceHub.net IoT platform demo code

Dependencies:   EthernetInterface FXOS8700Q MQTTS MbedJSONValue mbed-rtos mbed wolfSSL

Fork of HelloMQTTS by wolf SSL

Revision:
20:0404c7f31c69
Parent:
17:25584027fae0
Child:
21:f456b1a487e0
--- a/main.cpp	Mon Jul 27 01:38:23 2015 +0000
+++ b/main.cpp	Sat Aug 01 20:50:27 2015 +0000
@@ -23,7 +23,7 @@
  system libraries.
 
 */
-
+#define MQTTCLIENT_QOS2 1
 #include "MQTTEthernet.h"
 #include "MQTTClient.h"
 
@@ -181,9 +181,9 @@
     while (arrivedcount < 2)
         client.yield(100);
 
-#if 0 /* QoS 2 not tested */
+#if 1 /* QoS 2 not tested */
 // QoS 2
-    sprintf(buf, "\"%s\",  QoS 2 message from app version %f\n", version);
+    sprintf(buf, "\"%s\",  QoS 2 message from app version %f\n", msg, version);
     message.qos = MQTT::QOS2;
     message.payloadlen = strlen(buf)+1;
     rc = client.publish(topic, message);
@@ -193,7 +193,7 @@
 
 // n * QoS 2
     for (int i = 1; i <= 10; ++i) {
-        sprintf(buf, "\"%s\", QoS 2 message number %d from app version %f\n", i, version);
+        sprintf(buf, "\"%s\", QoS 2 message number %d from app version %f\n",msg,  i, version);
         message.qos = MQTT::QOS2;
         message.payloadlen = strlen(buf)+1;
         rc = client.publish(topic, message);