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

Dependents:   GSwifi_httpd GSwifi_websocket GSwifi_tcpclient GSwifi_tcpserver ... more

Fork of GSwifi 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/

/media/uploads/gsfan/gs_im_002.jpg /media/uploads/gsfan/gs1011m_2.jpg

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

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

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

Files at this revision

API Documentation at this revision

Comitter:
gsfan
Date:
Thu Oct 18 02:21:27 2012 +0000
Parent:
15:5febfc399099
Child:
17:6828b084e74b
Commit message:
fix

Changed in this revision

GSwifi.cpp Show annotated file Show diff for this revision Revisions of this file
GSwifi.h Show annotated file Show diff for this revision Revisions of this file
--- a/GSwifi.cpp	Tue Oct 09 16:05:40 2012 +0000
+++ b/GSwifi.cpp	Thu Oct 18 02:21:27 2012 +0000
@@ -64,12 +64,12 @@
     }
 #elif defined(TARGET_LPC11U24)
     if (p_cts == p21) { // CTS input (P0_7)
-        LPC_USART->MCR = (1<<7); // CTSEN
+        LPC_USART->MCR |= (1<<7); // CTSEN
         LPC_IOCON->PIO0_7 &= ~0x07;
         LPC_IOCON->PIO0_7 |= 0x01; // UART CTS
     }
     if (p_rts == p22) { // RTS output (P0_17)
-        LPC_USART->MCR = (1<<6); // RTSEN
+        LPC_USART->MCR |= (1<<6); // RTSEN
         LPC_IOCON->PIO0_17 &= ~0x07;
         LPC_IOCON->PIO0_17 |= 0x01; // UART RTS
         _rts = true;
@@ -857,7 +857,7 @@
 void GSwifi::poll() {
     int i, j;
 
-    if (_gs_enter) {
+    while (_gs_enter) {
         // received "\n"
         char buf[GS_CMD_SIZE];
 
@@ -896,7 +896,8 @@
         } else
         if (strncmp(buf, "DISASSOCIATED", 13) == 0 ||
           strncmp(buf, "Disassociated", 13) == 0 ||
-          strncmp(buf, "UnExpected", 10) == 0) {
+          strncmp(buf, "Disassociation Event", 20) == 0 ||
+          strncmp(buf, "UnExpected Warm Boot", 20) == 0) {
             _connect = false;
             for (i = 0; i < 16; i ++) {
                 _gs_sock[i].connect = false;
@@ -904,14 +905,14 @@
         } else
         if (strncmp(buf, "Out of StandBy-Timer", 20) == 0 ||
           strncmp(buf, "Out of StandBy-Alarm", 20) == 0) {
-            if (_status == GSSTAT_STANDBY) {
+//            if (_status == GSSTAT_STANDBY) {
                 _status = GSSTAT_WAKEUP;
-            }
+//            }
         } else 
         if (strncmp(buf, "Out of Deep Sleep", 17) == 0 ) {
-            if (_status == GSSTAT_DEEPSLEEP) {
+//            if (_status == GSSTAT_DEEPSLEEP) {
                 _status = GSSTAT_READY;
-            }
+//            }
         } else 
         if (strncmp(buf, "Out of", 6) == 0) {
         }
--- a/GSwifi.h	Tue Oct 09 16:05:40 2012 +0000
+++ b/GSwifi.h	Thu Oct 18 02:21:27 2012 +0000
@@ -29,7 +29,7 @@
 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
 #define GS_DATA_SIZE 1500
 #elif defined(TARGET_LPC11U24)
-#define GS_DATA_SIZE 800
+#define GS_DATA_SIZE 500
 #endif
 
 /**