![](/media/cache/profiles/0230db486bc9cdd3583fee20469c7b2f.jpg.50x50_q85.jpg)
Simple usage example of MQTTS library
Dependencies: EthernetInterface MQTTS NTPClient SDFileSystem mbed-rtos mbed wolfSSL
Fork of HelloMQTT by
MQTT is light weight protocol for M2M, IoT. MQTTS adds TLS(SSL) security layer into the MQTT. This program shows simple usage example of MQTTS library.
Connect information has to be stored in SD file "connectInfo.txt", with following lines in it.
- Host Name
- User Name
- Password
- Client ID
- Topic
The program asks following information on the terminal
- Port Number to be connected. If the port is >8000 it assumes MQTTS.
- Message to be published
- Certificate file name, if MQTTS. Input file name on SD card. Simply Return key force it to no server verification. The program set up the realtime clock by NTP for certificate verification.
This program was tested with FRDM-K64F, against Sango MQTT server by Shiguredo. https://sango.shiguredo.jp/
References:
- wolfSSL Home: https://www.wolfssl.com
- Original work of MQTT: https://developer.mbed.org/teams/mqtt.
- 日本語ホーム:https://developer.mbed.org/users/wolfSSL/code/HelloMQTTS/wiki/MQTTSホーム
Revisions of main.cpp
Revision | Date | Message | Actions |
---|---|---|---|
8:a3e3113054a1 | 2014-05-20 | Refactoring headers | File Diff Annotate |
7:3de634f2d40c | 2014-05-11 | Merge latest changes | File Diff Annotate |
6:e4c690c45021 | 2014-05-11 | Wildcard subscriptions | File Diff Annotate |
5:4a257f6ac09a | 2014-05-09 | Updates to the example to use the virtual serial port and the LCD for feedback | File Diff Annotate |
3:7a6a899de7cc | 2014-05-06 | Use latest MQTT library on both mbed and Linux | File Diff Annotate |
2:638c854c0695 | 2014-04-30 | Update to the latest level of code | File Diff Annotate |
1:a1d5c7a6acbc | 2014-02-05 | Add copyright statement to main program | File Diff Annotate |
0:0cae29831d01 | 2014-02-04 | Sample program for MQTT client | File Diff Annotate |