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"
Revision 14:3c0b3663d448, committed 2014-08-01
- Comitter:
- icraggs
- Date:
- Fri Aug 01 17:31:12 2014 +0000
- Parent:
- 13:52a9dd92ce9d
- Parent:
- 11:5f6f8b0dd61d
- Child:
- 15:d8a31b66a85d
- Commit message:
- Merge
Changed in this revision
--- a/EthernetInterface.lib Fri Aug 01 17:27:54 2014 +0000 +++ b/EthernetInterface.lib Fri Aug 01 17:31:12 2014 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/EthernetInterface/#f69b81aa9eb1 +https://mbed.org/users/mbed_official/code/EthernetInterface/#e6b79f0ccd95 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetInterface.lib.orig Fri Aug 01 17:31:12 2014 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/EthernetInterface/#f69b81aa9eb1
--- a/MQTT.lib Fri Aug 01 17:27:54 2014 +0000 +++ b/MQTT.lib Fri Aug 01 17:31:12 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/mqtt/code/MQTT/#affdb8bd3e7c +http://mbed.org/teams/mqtt/code/MQTT/#8bbc3a992326 \ No newline at end of file
--- a/MQTT.lib.orig Fri Aug 01 17:27:54 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/teams/mqtt/code/MQTT/#e3d64f9b986c
--- a/mbed-rtos.lib Fri Aug 01 17:27:54 2014 +0000 +++ b/mbed-rtos.lib Fri Aug 01 17:31:12 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#34e80e862021 +http://mbed.org/users/mbed_official/code/mbed-rtos/#1520481a219c \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib.orig Fri Aug 01 17:31:12 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#34e80e862021
--- a/mbed.bld Fri Aug 01 17:27:54 2014 +0000 +++ b/mbed.bld Fri Aug 01 17:31:12 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld.orig Fri Aug 01 17:31:12 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804 \ No newline at end of file