Samples
The following samples illustrate the communication with an MQTT broker. Messages are sent and received.
There are two different implementation options, which can be chosen based on purely subjective criteria. The two options are compared in the first two samples.
Overview
Sample | Link | Description |
---|---|---|
1 | MQTT communication based on a messages queue | |
2 | MQTT communication based on a callback method | |
3 | MQTT communication via a secure TLS connection and PSK (PreSharedKey) | |
4 | MQTT communication via a secure TLS connection and CA (certificate authority) certificate | |
5 | MQTT communication with AWS IoT | |
6 | MQTT communication with the Microsoft Azure IoT Hub | |
7 | MQTT communication with IBM Watson IoT | |
8 | MQTT communication with the ThingSpeak IoT platform from MathWorks |
Downloads
Sample code and configurations for this product can be obtained from the corresponding repository on GitHub: https://www.github.com/Beckhoff/TF6701_Samples. There you have the option to clone the repository or download a ZIP file containing the sample.