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_msg.cpp
- Revision:
- 15:086d1a33a197
- Parent:
- 14:1e89a3f0282d
- Child:
- 16:105b56570533
--- a/GSwifi/GSwifi_msg.cpp Fri Jan 10 14:23:33 2014 +0000 +++ b/GSwifi/GSwifi_msg.cpp Thu Jan 30 15:10:14 2014 +0000 @@ -27,10 +27,10 @@ static int cid, sub, len, count; #ifdef DEBUG_DUMP - if (c < 0x20) { - DBG("%02x_", c); + if (c < 0x20 || c >= 0x7f) { + std::printf("_%02x", c); } else { - DBG("%c_", c); + std::printf("_%c", c); } #endif switch (_state.mode) { @@ -60,9 +60,9 @@ case 0x0d: // CR // _state.buf->queue(c); if (_flow == 2) setRts(false); + _state.mode = MODE_COMMAND; parseMessage(); if (_flow == 2) setRts(true); - _state.mode = MODE_COMMAND; break; case 0x1b: // ESC _state.mode = MODE_ESCAPE; @@ -363,6 +363,15 @@ _con[acid].parent = cid; _con[acid].func = _con[cid].func; _con[acid].accept = true; + +#ifdef CFG_ENABLE_HTTPD + if (_con[acid].protocol == PROTO_HTTPD) { + _httpd[acid].mode = HTTPDMODE_REQUEST; +#ifdef CFG_ENABLE_WEBSOCKET + _httpd[acid].websocket = 0; +#endif + } +#endif } void GSwifi::msgDisconnect (const char *buf) {