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
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
Diff: TlsMQTTClient.cpp
- Revision:
- 3:0a48c984e15b
- Parent:
- 1:5a896191c3c4
- Child:
- 9:2d119fbe7482
--- a/TlsMQTTClient.cpp Fri May 19 12:42:57 2017 +0000 +++ b/TlsMQTTClient.cpp Thu Aug 17 13:38:58 2017 +0000 @@ -26,7 +26,7 @@ std::string pMethod; if(peerMethod == VERIFY_NONE) { pMethod = "not verify peer"; - } else if (peerMethod == VERIFY_PEER) { + } else if (peerMethod & VERIFY_PEER) { pMethod = "verify peer if certificates available"; //Load the CA certificate(s) (If using multiple, concatenate them in the buffer being passed) if (SSL_SUCCESS != CyaSSL_CTX_load_verify_buffer(ctx, (const unsigned char*)certificates, strlen(certificates), SSL_FILETYPE_PEM)) {