Sample MQTT program - simple send and receive (MQ Telemetry Transport) for GainSpan Wi-Fi module
Dependencies: C12832 GSwifiInterface MQTT mbed-rtos mbed
Fork of HelloMQTT by
mbedのMQTTグループで保守されているMQTTライブラリを GainSpan Wi-Fi モジュールへ対応させたサンプルです。
MQTT (MQ Telemetry Transport) とは、IoTやM2M向け デバイス間通信のためのプロトコルです。
MQTTサーバーには http://iot.eclipse.org/ のサンドボックスを使います。 送信したメッセージをエコーバックしてくるだけの動作をします。
mbed Application Board を使う場合は次の行のコメントアウトを外すとLCDへ表示するようになる。
#define MBED_APPLICATION_BOARD
GainSpanモジュールの接続ピンについては次の行で指定する。
gs = new GSwifiInterface(p9, p10, NC, NC, p30, NC, 9600); //tx, rx, cts, rts, reset, alarm, baud
Wi-Fiアクセスポイントは次の行で指定する。
#define SEC GSwifi::SEC_WPA_PSK #define SSID "SSID" #define PASS "PASSPHRASE"
Revisions of mbed-rtos.lib
Revision | Date | Message | Actions |
---|---|---|---|
16:fd155e824a80 | 2014-10-02 | Supported for GainSpan wi-fi module.; 1st build | File Diff Annotate |
15:d8a31b66a85d | 2014-08-01 | Latest libraries | File Diff Annotate |
14:3c0b3663d448 | 2014-08-01 | Merge | File Diff Annotate |
13:52a9dd92ce9d | 2014-08-01 | Latest library updates | File Diff Annotate |
10:ce3321d8ea90 | 2014-07-07 | updates | File Diff Annotate |
6:e4c690c45021 | 2014-05-11 | Wildcard subscriptions | File Diff Annotate |
1:a1d5c7a6acbc | 2014-02-05 | Add copyright statement to main program | File Diff Annotate |