Sample MQTT program - simple send and receive
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
Adding new connectivity methods to the program is trivial, as long as they implement the mbed OS 5
Revisions of MQTTNetwork.h
|21:a68bd76740f9||10 months ago||changeset: 21:6ab7c0b84d9e||File Diff Annotate|
|20:49c9daf2b0ff||18 months ago||Update to mbed OS 5, use NetworkInterface for multiple connectivity methods - not just ethernet||File Diff Annotate|