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"
MQTT.lib@5:4a257f6ac09a, 2014-05-09 (annotated)
- Committer:
- sam_grove
- Date:
- Fri May 09 23:06:43 2014 +0000
- Revision:
- 5:4a257f6ac09a
- Parent:
- 4:c696f27c1850
- Child:
- 7:3de634f2d40c
Updates to the example to use the virtual serial port and the LCD for feedback
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sam_grove | 5:4a257f6ac09a | 1 | http://mbed.org/teams/mqtt/code/MQTT/#d13a6c558164 |