A Threaded Secure MQTT Client example. Uses MBED TLS for SSL/TLS connection. QoS0 only for now. Example has been tested with K64F connected via Ethernet.
Fork of HelloMQTT by
Diff: main.cpp
- Revision:
- 31:d34f6adb7a53
- Parent:
- 28:01d5cc81af31
--- a/main.cpp Mon Mar 27 15:16:23 2017 +0000
+++ b/main.cpp Sat Apr 01 12:41:29 2017 +0000
@@ -27,9 +27,12 @@
#include "mbed.h"
#include "rtos.h"
+
+#undef MBED_CONF_APP_ESP8266_DEBUG
#include "easy-connect.h"
#include "MQTTThreadedClient.h"
+using namespace MQTT;
Serial pc(USBTX, USBRX, 115200);
Thread msgSender(osPriorityNormal, DEFAULT_STACK_SIZE * 2);
@@ -147,7 +150,7 @@
printf("HelloMQTT: version is %.2f\r\n", version);
- NetworkInterface* network = easy_connect(true);
+ NetworkInterface* network = easy_connect(false);
if (!network) {
return -1;
}
