Connecting a Multi-Tech Systems Dragonfly™ to Twilio's Sync for IoT Quickstart. Blink a dev board LED.

Dependencies:   MQTT MbedJSONValue mbed mtsas

Fork of DragonflyMQTT by miao zhicheng

Code to connect a Multi-Tech® MultiConnect® Dragonfly™ to Twilio's Sync for IoT: https://www.twilio.com/docs/api/devices

Uses MQTT over TLS and subscribes to a topic where you can control an LED. See also our Quickstart using this code, here: https://www.twilio.com/docs/quickstart/sync-iot/mqtt-multi-tech-multiconnect-dragonfly-sync-iot

Revision:
1:5a896191c3c4
Parent:
0:b32fa0c757d7
Child:
2:d4dcf1ebaa99
diff -r b32fa0c757d7 -r 5a896191c3c4 TlsMQTTClient.hpp
--- a/TlsMQTTClient.hpp	Tue May 09 13:16:48 2017 +0000
+++ b/TlsMQTTClient.hpp	Fri May 12 11:49:58 2017 +0000
@@ -11,7 +11,7 @@
     ~TlsMQTTClient();
 
 private:
-    typedef MQTT::Client<TlsMQTTClient, Countdown> MQTTClient;
+    typedef MQTT::Client<TlsMQTTClient, Countdown, 1000 /* MAX_MQTT_PACKET_SIZE */> MQTTClient;
 
     // MQTT Operations
 public:
@@ -103,5 +103,5 @@
     TCPSocketConnection* tcp;
     CYASSL_CTX* ctx;
     CYASSL *ssl;
-    MQTT::Client<TlsMQTTClient, Countdown>* mqttClient;
+    MQTTClient* mqttClient;
 };