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)

Committer:
gsfan
Date:
Sun Jan 27 14:31:19 2013 +0000
Revision:
5:78943b3945b5
Parent:
WiflyInterface.cpp@1:fb4494783863
Child:
7:f94c59d0c735
Child:
8:64184a968e3b
1st build

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gsfan 5:78943b3945b5 1 /* Copyright (C) 2013 gsfan, MIT License
gsfan 5:78943b3945b5 2 * port to the GainSpan Wi-FI module GS1011
gsfan 5:78943b3945b5 3 */
gsfan 5:78943b3945b5 4
gsfan 5:78943b3945b5 5 #include "GSwifiInterface.h"
gsfan 5:78943b3945b5 6
gsfan 5:78943b3945b5 7 GSwifiInterface::GSwifiInterface( PinName tx, PinName rx, PinName cts, PinName rts, PinName reset,
gsfan 5:78943b3945b5 8 const char * ssid, const char * phrase, Security sec) :
gsfan 5:78943b3945b5 9 GSwifi(tx, rx, cts, rts, reset, ssid, phrase, sec)
gsfan 5:78943b3945b5 10 {
gsfan 5:78943b3945b5 11 }
gsfan 5:78943b3945b5 12
gsfan 5:78943b3945b5 13 int GSwifiInterface::init()
gsfan 5:78943b3945b5 14 {
gsfan 5:78943b3945b5 15 _state.dhcp = true;
gsfan 5:78943b3945b5 16 return 0;
gsfan 5:78943b3945b5 17 }
gsfan 5:78943b3945b5 18
gsfan 5:78943b3945b5 19 int GSwifiInterface::init(const char* ip, const char* mask, const char* gateway)
gsfan 5:78943b3945b5 20 {
gsfan 5:78943b3945b5 21 _state.dhcp = false;
gsfan 5:78943b3945b5 22 strncpy(_ip, ip, sizeof(_ip));
gsfan 5:78943b3945b5 23 strncpy(_netmask, mask, sizeof(_netmask));
gsfan 5:78943b3945b5 24 strncpy(_gateway, gateway, sizeof(_gateway));
gsfan 5:78943b3945b5 25
gsfan 5:78943b3945b5 26 return 0;
gsfan 5:78943b3945b5 27 }
gsfan 5:78943b3945b5 28
gsfan 5:78943b3945b5 29 int GSwifiInterface::connect()
gsfan 5:78943b3945b5 30 {
gsfan 5:78943b3945b5 31 return join();
gsfan 5:78943b3945b5 32 }
gsfan 5:78943b3945b5 33
gsfan 5:78943b3945b5 34 int GSwifiInterface::disconnect()
gsfan 5:78943b3945b5 35 {
gsfan 5:78943b3945b5 36 return GSwifi::disconnect();
gsfan 5:78943b3945b5 37 }
gsfan 5:78943b3945b5 38
gsfan 5:78943b3945b5 39 char * GSwifiInterface::getIPAddress()
gsfan 5:78943b3945b5 40 {
gsfan 5:78943b3945b5 41
gsfan 5:78943b3945b5 42 return _ip;
samux 1:fb4494783863 43 }