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 MQTT

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"

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Mon Jul 07 20:41:29 2014 +0000
Parent:
9:5beb8609e9f7
Child:
11:5f6f8b0dd61d
Commit message:
updates

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
MQTT.lib Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Thu May 22 23:58:34 2014 +0000
+++ b/EthernetInterface.lib	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/EthernetInterface/#6a67d2bddc7c
+https://mbed.org/users/mbed_official/code/EthernetInterface/#e6b79f0ccd95
--- a/MQTT.lib	Thu May 22 23:58:34 2014 +0000
+++ b/MQTT.lib	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/mqtt/code/MQTT/#a51dd239b78e
+http://mbed.org/teams/mqtt/code/MQTT/#3ad9afa63299
--- a/mbed-rtos.lib	Thu May 22 23:58:34 2014 +0000
+++ b/mbed-rtos.lib	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#5dfe422a963d
+http://mbed.org/users/mbed_official/code/mbed-rtos/#1520481a219c
--- a/mbed.bld	Thu May 22 23:58:34 2014 +0000
+++ b/mbed.bld	Mon Jul 07 20:41:29 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file