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
GainSpan Wi-Fi library
The GS1011/GS2100 is an ultra low power 802.11b wireless module from GainSpan.
mbed RTOS supported.
- about this library: http://mbed.org/users/gsfan/notebook/GSwifiInterface/
- about Wi-Fi module: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
ゲインスパン Wi-Fi モジュール ライブラリ
ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011/GS2100 シリーズ用のライブラリです。
mbed RTOS に対応しています。(mbed2.0)
- このライブラリについて: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
- Wi-FIモジュールについて: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
- UARTコマンド、SPIデータインターフェースに対応しました。(2019/09)
Diff: GSwifi/GSwifi_http.cpp
- Revision:
- 11:71d67fea5ace
- Parent:
- 8:64184a968e3b
- Child:
- 12:057089026a20
--- a/GSwifi/GSwifi_http.cpp Thu Oct 31 08:34:45 2013 +0000 +++ b/GSwifi/GSwifi_http.cpp Fri Nov 15 04:20:14 2013 +0000 @@ -22,6 +22,8 @@ char ip[17]; int cid; + if (!isConnected() && _state.status == STAT_READY) return -1; + if (getHostByName(host, ip)) return -1; if (! port) { if (ssl) { @@ -45,6 +47,7 @@ cmdHTTPCONFDEL(2); } + _state.cid = -1; if (cmdHTTPOPEN(ip, port, ssl)) return -1; if (_state.cid < 0) return -1; cid = _state.cid; @@ -60,6 +63,8 @@ char ip[17]; int cid, len; + if (!isConnected() && _state.status == STAT_READY) return -1; + if (getHostByName(host, ip)) return -1; if (! port) { if (ssl) { @@ -85,6 +90,7 @@ cmdHTTPCONFDEL(2); } + _state.cid = -1; if (cmdHTTPOPEN(ip, port, ssl)) return -1; if (_state.cid < 0) return -1; cid = _state.cid;