GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Fork of GSwifi_old by gs fan

GainSpan Wi-Fi library

The GS1011 is an ultra low power 802.11b wireless module from GainSpan.

see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Information

Please change the baud rate in advance.

  • ATB=115200
  • AT&W0

It may be better and sometimes faster.
GSwifi gs(p13, p14, baud);

Heavily modified new library: http://mbed.org/users/gsfan/code/GSwifi

ゲインスパン Wi-Fi モジュール ライブラリ

ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。

解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Information

モジュールはあらかじめ次のコマンドでボーレートを変更しておく。

  • ATB=115200
  • AT&W0

場合によってはもっと高速の方がいいかもしれない。クラス宣言時にレート設定をする。
GSwifi gs(p13, p14, baud);

大幅に更新された新しいライブラリ: http://mbed.org/users/gsfan/code/GSwifi

Revision:
4:a8d38857f3fd
Parent:
3:1345daf4ec1a
Child:
5:6def1d0df519
--- a/GSwifi.cpp	Thu Jul 12 13:52:48 2012 +0000
+++ b/GSwifi.cpp	Thu Jul 12 14:40:02 2012 +0000
@@ -214,6 +214,7 @@
 
     case GSMODE_DATA_RX_BULK:
     case GSMODE_DATA_RXUDP_BULK:
+        DBG("%c", dat);
         if (mode == 0) {
             // cid
             _cid = x2i(dat);
@@ -395,12 +396,12 @@
             if (strncmp(buf, "00:", 3) == 0) {
                 int mac1, mac2, mac3, mac4, mac5, mac6;
                 sscanf(buf, "%x:%x:%x:%x:%x:%x", &mac1, &mac2, &mac3, &mac4, &mac5, &mac6);
-                mac[0] = mac1;
-                mac[1] = mac2;
-                mac[2] = mac3;
-                mac[3] = mac4;
-                mac[4] = mac5;
-                mac[5] = mac6;
+                _mac[0] = mac1;
+                _mac[1] = mac2;
+                _mac[2] = mac3;
+                _mac[3] = mac4;
+                _mac[4] = mac5;
+                _mac[5] = mac6;
                 flg = 1;
             }
             break;
@@ -413,8 +414,8 @@
             }
             break;
         case GSRES_HTTP:
-            if (i == 1 && buf[0] >= '0' && buf[0] <= 'F') {
-                _cid = x2i(buf[8]);
+            if (buf[0] >= '0' && buf[0] <= 'F') {
+                _cid = x2i(buf[0]);
                 flg = 1;
             }
             break;