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.

Changes

RevisionDateWhoCommit message
22:f5f6c9059eed 5 weeks agoJan Jongboom Roll back update to mbed OS 5.5 default tip
21:a68bd76740f9 6 weeks agoJan Jongboom changeset: 21:6ab7c0b84d9e
20:49c9daf2b0ff 9 months agoJan Jongboom Update to mbed OS 5, use NetworkInterface for multiple connectivity methods - not just ethernet
19:7f7aba7a4a8b 2015-07-30icraggsSubscribe at QoS 2, remove lcd.cls() calls
18:07a79d8f01c3 2015-07-27icraggsMake it easy to not use LCD screen, if you don't have one
17:0811bdbdd78a 2015-07-27icraggsMake sure QoS 2 works
16:28d062c5522b 2014-10-06icraggsUpdate to latest MQTT library - change some pointers to references
15:d8a31b66a85d 2014-08-01icraggsLatest libraries
14:3c0b3663d448 2014-08-01icraggsMerge
13:52a9dd92ce9d 2014-08-01icraggsLatest library updates
12:086a9314e8a5 2014-08-01icraggsSome cleaning up
11:5f6f8b0dd61d 2014-07-30sam_groveUpdate to FP in MQTT library;
10:ce3321d8ea90 2014-07-07ansondupdates
9:5beb8609e9f7 2014-05-22icraggsLatest version
8:a3e3113054a1 2014-05-20icraggsRefactoring headers
7:3de634f2d40c 2014-05-11icraggsMerge latest changes
6:e4c690c45021 2014-05-11icraggsWildcard subscriptions
5:4a257f6ac09a 2014-05-09sam_groveUpdates to the example to use the virtual serial port and the LCD for feedback
4:c696f27c1850 2014-05-09sam_groveUpdate to sub-sub dependency
3:7a6a899de7cc 2014-05-06icraggsUse latest MQTT library on both mbed and Linux
2:638c854c0695 2014-04-30icraggsUpdate to the latest level of code
1:a1d5c7a6acbc 2014-02-05icraggsAdd copyright statement to main program
0:0cae29831d01 2014-02-04icraggsSample program for MQTT client