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:
3:0a48c984e15b
Parent:
1:5a896191c3c4
Child:
4:f4e8f0fca631
diff -r d4dcf1ebaa99 -r 0a48c984e15b MTSCellularManager.cpp
--- a/MTSCellularManager.cpp	Fri May 19 12:42:57 2017 +0000
+++ b/MTSCellularManager.cpp	Thu Aug 17 13:38:58 2017 +0000
@@ -77,12 +77,17 @@
 
     logInfo("GPS polling");
     mts::Cellular::gpsData gpsValues = radio->GPSgetPosition();
-    /*gpsValues.success = true;
+
+    // mocked data
+    /*
+    gpsValues.success = true;
     gpsValues.fix = 3;
     gpsValues.satellites = 4;
     gpsValues.timestamp = "17/05/12, 08:59:56.483";
     gpsValues.latitude = "5925.4477N";
-    gpsValues.longitude = "02444.9046E";*/
+    gpsValues.longitude = "02444.9046E";
+    */
+
     if (gpsValues.success && gpsValues.fix > 2) {
         logInfo("GPS polled: success %d, sats: %d, fix: %d, ts %s, lat %s, lng %s",
             gpsValues.success, gpsValues.satellites, gpsValues.fix, gpsValues.timestamp.c_str(), gpsValues.latitude.c_str(), gpsValues.longitude.c_str());