Sample MQTT program - simple send and receive

Dependencies:   C12832 MQTT

Dependents:   MQTT_G_SENSOR

This program and the MQTT libraries it uses are part of the EclipseTM Paho project; specifically the embedded client.

This example and API are working, but are still in progress. Please give us your feedback.

HelloMQTT is an example of using the MQTT API. The MQTT API is portable across network interface stacks. MQTT is designed to be used with TCP/IP, but any transport with similar characteristics should be suitable.

HelloMQTT uses the NetworkInterface APIs in mbed OS 5 to show how this works. The MQTT library contains an MQTTNetwork.h header, which is a wrapper around the mbed networking interface. To switch between connectivity methods (the default is Ethernet) the easy-connect library is provided in this example application. You can change the connectivity method in mbed_app.json.

Adding new connectivity methods to the program is trivial, as long as they implement the mbed OS 5 NetworkStack API.

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Mon Jul 07 20:41:29 2014 +0000
Parent:
9:5beb8609e9f7
Child:
11:5f6f8b0dd61d
Commit message:
updates

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
MQTT.lib Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Thu May 22 23:58:34 2014 +0000
+++ b/EthernetInterface.lib	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/EthernetInterface/#6a67d2bddc7c
+https://mbed.org/users/mbed_official/code/EthernetInterface/#e6b79f0ccd95
--- a/MQTT.lib	Thu May 22 23:58:34 2014 +0000
+++ b/MQTT.lib	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/mqtt/code/MQTT/#a51dd239b78e
+http://mbed.org/teams/mqtt/code/MQTT/#3ad9afa63299
--- a/mbed-rtos.lib	Thu May 22 23:58:34 2014 +0000
+++ b/mbed-rtos.lib	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#5dfe422a963d
+http://mbed.org/users/mbed_official/code/mbed-rtos/#1520481a219c
--- a/mbed.bld	Thu May 22 23:58:34 2014 +0000
+++ b/mbed.bld	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file