![](/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ホーム
Files at revision 20:0404c7f31c69
Name | Size | Actions |
---|---|---|
[up] | ||
Linux-example | ||
EthernetInterface.lib | 74 | Revisions Annotate |
MQTTS.lib | 66 | Revisions Annotate |
NTPClient.lib | 70 | Revisions Annotate |
SDFileSystem.lib | 78 | Revisions Annotate |
getline.cpp | 1118 | Revisions Annotate |
getline.h | 49 | Revisions Annotate |
main.cpp | 7669 | Revisions Annotate |
mbed-rtos.lib | 65 | Revisions Annotate |
mbed.bld | 65 | Revisions Annotate |
wolfSSL.lib | 67 | Revisions Annotate |