GSwifiInterface library (interface for GainSpan Wi-Fi GS1011 modules) Please see https://mbed.org/users/gsfan/notebook/GSwifiInterface/

Dependents:   GSwifiInterface_HelloWorld GSwifiInterface_HelloServo GSwifiInterface_UDPEchoServer GSwifiInterface_UDPEchoClient ... more

Fork of WiflyInterface by mbed official

GainSpan Wi-Fi library

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

mbed RTOS supported.

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

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

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

mbed RTOS に対応しています。(mbed2.0)

Revision:
5:78943b3945b5
Parent:
1:fb4494783863
Child:
7:f94c59d0c735
Child:
8:64184a968e3b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GSwifiInterface.cpp	Sun Jan 27 14:31:19 2013 +0000
@@ -0,0 +1,43 @@
+/* Copyright (C) 2013 gsfan, MIT License
+ *  port to the GainSpan Wi-FI module GS1011
+ */
+
+#include "GSwifiInterface.h"
+
+GSwifiInterface::GSwifiInterface( PinName tx, PinName rx, PinName cts, PinName rts, PinName reset,
+                                const char * ssid, const char * phrase, Security sec) :
+    GSwifi(tx, rx, cts, rts, reset, ssid, phrase, sec)
+{
+}
+
+int GSwifiInterface::init()
+{
+    _state.dhcp = true;
+    return 0;
+}
+
+int GSwifiInterface::init(const char* ip, const char* mask, const char* gateway)
+{
+    _state.dhcp = false;
+    strncpy(_ip, ip, sizeof(_ip));
+    strncpy(_netmask, mask, sizeof(_netmask));
+    strncpy(_gateway, gateway, sizeof(_gateway));
+
+    return 0;
+}
+
+int GSwifiInterface::connect()
+{
+    return join();
+}
+
+int GSwifiInterface::disconnect()
+{
+    return GSwifi::disconnect();
+}
+
+char * GSwifiInterface::getIPAddress()
+{
+
+    return _ip;
+}
\ No newline at end of file