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.

Dependencies:   FP MQTTPacket

Fork of HelloMQTT by MQTT

Files at this revision

API Documentation at this revision

Comitter:
vpcola
Date:
Sat Apr 01 12:55:49 2017 +0000
Parent:
30:b2aed80037db
Child:
33:38e2e7bf91eb
Commit message:
Disable MQTT debug

Changed in this revision

MQTTThreadedClient.h Show annotated file Show diff for this revision Revisions of this file
easy-connect.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
--- a/MQTTThreadedClient.h	Tue Mar 28 09:18:49 2017 +0000
+++ b/MQTTThreadedClient.h	Sat Apr 01 12:55:49 2017 +0000
@@ -7,7 +7,7 @@
 #include "NetworkInterface.h"
 #include "FP.h"
 
-#define MQTT_DEBUG 1
+//#define MQTT_DEBUG 1
 
 #ifdef MQTT_DEBUG
 #define DBG(fmt, args...)    printf(fmt, ## args)
--- a/easy-connect.lib	Tue Mar 28 09:18:49 2017 +0000
+++ b/easy-connect.lib	Sat Apr 01 12:55:49 2017 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/easy-connect/#5b9cb8cea4a11b0ab974c991b527c9b79fceae75
+https://github.com/ARMmbed/easy-connect/#6bb0b473e5b24f627ef4b5b04d20ceab216f4673
--- a/main.cpp	Tue Mar 28 09:18:49 2017 +0000
+++ b/main.cpp	Sat Apr 01 12:55:49 2017 +0000
@@ -27,6 +27,7 @@
 
 #include "mbed.h"
 #include "rtos.h"
+#undef MBED_CONF_APP_ESP8266_DEBUG
 #include "easy-connect.h"
 #include "MQTTThreadedClient.h"
 
--- a/mbed_app.json	Tue Mar 28 09:18:49 2017 +0000
+++ b/mbed_app.json	Sat Apr 01 12:55:49 2017 +0000
@@ -17,10 +17,10 @@
             "value": "D0"
         },
         "esp8266-ssid": {
-            "value": "\"SSID\""
+            "value": "\"VPCOLA\""
         },
         "esp8266-password": {
-            "value": "\"Password\""
+            "value": "\"AB12CD34\""
         },
         "esp8266-debug": {
             "value": true
@@ -67,8 +67,8 @@
         },
         "NUCLEO_L476RG": {
             "network-interface": "WIFI_ESP8266",
-            "esp8266-tx": "D8",
-            "esp8266-rx": "D2"
+            "esp8266-tx": "A0",
+            "esp8266-rx": "A1"
         }        
     }
 }