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
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/
ゲインスパン Wi-Fi モジュール ライブラリ
ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。
解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
GSwifi.h@2:c6e0e97901b3, 2012-07-12 (annotated)
- Committer:
- gsfan
- Date:
- Thu Jul 12 13:36:04 2012 +0000
- Revision:
- 2:c6e0e97901b3
- Parent:
- 1:b127c6c5241d
- Child:
- 4:a8d38857f3fd
fix powerSave
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gsfan | 0:2f6062c6d018 | 1 | /** |
gsfan | 0:2f6062c6d018 | 2 | * Gainspan wi-fi module library for mbed |
gsfan | 0:2f6062c6d018 | 3 | * Copyright (c) 2012 gsfan |
gsfan | 0:2f6062c6d018 | 4 | * Released under the MIT License: http://mbed.org/license/mit |
gsfan | 0:2f6062c6d018 | 5 | */ |
gsfan | 0:2f6062c6d018 | 6 | |
gsfan | 0:2f6062c6d018 | 7 | /** @file |
gsfan | 0:2f6062c6d018 | 8 | * @brief Gainspan wi-fi module library for mbed |
gsfan | 0:2f6062c6d018 | 9 | * GS1011MIC, GS1011MIP, GainSpan WiFi Breakout, etc. |
gsfan | 0:2f6062c6d018 | 10 | * module configuration: ATB=115200 |
gsfan | 0:2f6062c6d018 | 11 | */ |
gsfan | 0:2f6062c6d018 | 12 | |
gsfan | 0:2f6062c6d018 | 13 | #include "mbed.h" |
gsfan | 0:2f6062c6d018 | 14 | #include "RingBuffer.h" |
gsfan | 0:2f6062c6d018 | 15 | #include "host.h" |
gsfan | 0:2f6062c6d018 | 16 | #include "ipaddr.h" |
gsfan | 0:2f6062c6d018 | 17 | |
gsfan | 0:2f6062c6d018 | 18 | #define GS_BAUD 115200 |
gsfan | 1:b127c6c5241d | 19 | #define GS_UART_DIRECT |
gsfan | 0:2f6062c6d018 | 20 | |
gsfan | 0:2f6062c6d018 | 21 | #define GS_BULK |
gsfan | 0:2f6062c6d018 | 22 | |
gsfan | 0:2f6062c6d018 | 23 | #define GS_TIMEOUT 10000 // ms |
gsfan | 0:2f6062c6d018 | 24 | #define GS_TIMEOUT2 30000 // ms |
gsfan | 0:2f6062c6d018 | 25 | #define GS_CMD_SIZE 100 |
gsfan | 0:2f6062c6d018 | 26 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
gsfan | 0:2f6062c6d018 | 27 | #define GS_DATA_SIZE 1500 |
gsfan | 0:2f6062c6d018 | 28 | #elif defined(TARGET_LPC11U24) |
gsfan | 0:2f6062c6d018 | 29 | #define GS_DATA_SIZE 800 |
gsfan | 0:2f6062c6d018 | 30 | #endif |
gsfan | 0:2f6062c6d018 | 31 | |
gsfan | 0:2f6062c6d018 | 32 | /** |
gsfan | 0:2f6062c6d018 | 33 | * Wi-Fi security |
gsfan | 0:2f6062c6d018 | 34 | */ |
gsfan | 0:2f6062c6d018 | 35 | enum GSSECURITY { |
gsfan | 0:2f6062c6d018 | 36 | GSSEC_AUTO = 0, |
gsfan | 0:2f6062c6d018 | 37 | GSSEC_NONE = 0, |
gsfan | 0:2f6062c6d018 | 38 | GSSEC_OPEN = 1, |
gsfan | 0:2f6062c6d018 | 39 | GSSEC_WEP = 2, |
gsfan | 0:2f6062c6d018 | 40 | GSSEC_WPA_PSK = 4, |
gsfan | 0:2f6062c6d018 | 41 | GSSEC_WPA2_PSK = 8, |
gsfan | 0:2f6062c6d018 | 42 | GSSEC_WPA_ENT = 16, |
gsfan | 0:2f6062c6d018 | 43 | GSSEC_WPA2_ENT = 32, |
gsfan | 0:2f6062c6d018 | 44 | GSSEC_WPS_BUTTON = 64, |
gsfan | 0:2f6062c6d018 | 45 | }; |
gsfan | 0:2f6062c6d018 | 46 | |
gsfan | 0:2f6062c6d018 | 47 | /** |
gsfan | 0:2f6062c6d018 | 48 | * TCP/IP protocol |
gsfan | 0:2f6062c6d018 | 49 | */ |
gsfan | 0:2f6062c6d018 | 50 | enum GSPROTOCOL { |
gsfan | 0:2f6062c6d018 | 51 | GSPROT_UDP = 0, |
gsfan | 0:2f6062c6d018 | 52 | GSPROT_TCP = 1, |
gsfan | 0:2f6062c6d018 | 53 | GSPROT_HTTPGET, |
gsfan | 0:2f6062c6d018 | 54 | GSPROT_HTTPPOST, |
gsfan | 0:2f6062c6d018 | 55 | }; |
gsfan | 0:2f6062c6d018 | 56 | |
gsfan | 0:2f6062c6d018 | 57 | /** |
gsfan | 0:2f6062c6d018 | 58 | * Client/Server |
gsfan | 0:2f6062c6d018 | 59 | */ |
gsfan | 0:2f6062c6d018 | 60 | enum GSTYPE { |
gsfan | 0:2f6062c6d018 | 61 | GSTYPE_CLIENT = 0, |
gsfan | 0:2f6062c6d018 | 62 | GSTYPE_SERVER = 1, |
gsfan | 0:2f6062c6d018 | 63 | }; |
gsfan | 0:2f6062c6d018 | 64 | |
gsfan | 0:2f6062c6d018 | 65 | enum GSRESPONCE { |
gsfan | 0:2f6062c6d018 | 66 | GSRES_NORMAL, |
gsfan | 0:2f6062c6d018 | 67 | GSRES_CONNECT, |
gsfan | 0:2f6062c6d018 | 68 | GSRES_WPS, |
gsfan | 0:2f6062c6d018 | 69 | GSRES_MACADDRESS, |
gsfan | 0:2f6062c6d018 | 70 | GSRES_DHCP, |
gsfan | 0:2f6062c6d018 | 71 | GSRES_DNSLOOKUP, |
gsfan | 0:2f6062c6d018 | 72 | GSRES_HTTP, |
gsfan | 1:b127c6c5241d | 73 | GSRES_RSSI, |
gsfan | 0:2f6062c6d018 | 74 | }; |
gsfan | 0:2f6062c6d018 | 75 | |
gsfan | 0:2f6062c6d018 | 76 | enum GSMODE { |
gsfan | 0:2f6062c6d018 | 77 | GSMODE_COMMAND, |
gsfan | 0:2f6062c6d018 | 78 | GSMODE_DATA_RX, |
gsfan | 0:2f6062c6d018 | 79 | GSMODE_DATA_RXUDP, |
gsfan | 0:2f6062c6d018 | 80 | GSMODE_DATA_RX_BULK, |
gsfan | 0:2f6062c6d018 | 81 | GSMODE_DATA_RXUDP_BULK, |
gsfan | 0:2f6062c6d018 | 82 | GSMODE_DATA_RXHTTP, |
gsfan | 0:2f6062c6d018 | 83 | }; |
gsfan | 0:2f6062c6d018 | 84 | |
gsfan | 0:2f6062c6d018 | 85 | enum GSSTATUS { |
gsfan | 0:2f6062c6d018 | 86 | GSSTAT_READY, |
gsfan | 0:2f6062c6d018 | 87 | GSSTAT_STANDBY, |
gsfan | 0:2f6062c6d018 | 88 | GSSTAT_WAKEUP, |
gsfan | 0:2f6062c6d018 | 89 | GSSTAT_DEEPSLEEP, |
gsfan | 0:2f6062c6d018 | 90 | }; |
gsfan | 0:2f6062c6d018 | 91 | |
gsfan | 0:2f6062c6d018 | 92 | /** |
gsfan | 0:2f6062c6d018 | 93 | * data receive callback function |
gsfan | 0:2f6062c6d018 | 94 | */ |
gsfan | 1:b127c6c5241d | 95 | typedef void (*onGsReceiveFunc)(int cid, int len); |
gsfan | 0:2f6062c6d018 | 96 | |
gsfan | 0:2f6062c6d018 | 97 | struct GS_Socket { |
gsfan | 0:2f6062c6d018 | 98 | GSTYPE type; |
gsfan | 0:2f6062c6d018 | 99 | GSPROTOCOL protocol; |
gsfan | 0:2f6062c6d018 | 100 | bool connect; |
gsfan | 0:2f6062c6d018 | 101 | Host host; |
gsfan | 0:2f6062c6d018 | 102 | RingBuffer *data; |
gsfan | 1:b127c6c5241d | 103 | int lcid; |
gsfan | 0:2f6062c6d018 | 104 | int received; |
gsfan | 0:2f6062c6d018 | 105 | onGsReceiveFunc onGsReceive; |
gsfan | 0:2f6062c6d018 | 106 | }; |
gsfan | 0:2f6062c6d018 | 107 | |
gsfan | 0:2f6062c6d018 | 108 | /** |
gsfan | 0:2f6062c6d018 | 109 | * GSwifi class |
gsfan | 0:2f6062c6d018 | 110 | */ |
gsfan | 0:2f6062c6d018 | 111 | class GSwifi { |
gsfan | 0:2f6062c6d018 | 112 | public: |
gsfan | 0:2f6062c6d018 | 113 | /** |
gsfan | 0:2f6062c6d018 | 114 | * default constructor |
gsfan | 0:2f6062c6d018 | 115 | */ |
gsfan | 0:2f6062c6d018 | 116 | GSwifi (PinName p_tx, PinName p_rx); |
gsfan | 0:2f6062c6d018 | 117 | /** |
gsfan | 0:2f6062c6d018 | 118 | * Default constructor (with hardware fllow controll) |
gsfan | 0:2f6062c6d018 | 119 | */ |
gsfan | 0:2f6062c6d018 | 120 | GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts); |
gsfan | 0:2f6062c6d018 | 121 | /** |
gsfan | 0:2f6062c6d018 | 122 | * send command |
gsfan | 0:2f6062c6d018 | 123 | */ |
gsfan | 0:2f6062c6d018 | 124 | int command (char *cmd, GSRESPONCE res, int timeout = GS_TIMEOUT); |
gsfan | 0:2f6062c6d018 | 125 | /** |
gsfan | 0:2f6062c6d018 | 126 | * recv responce |
gsfan | 0:2f6062c6d018 | 127 | */ |
gsfan | 0:2f6062c6d018 | 128 | int cmdResponse (GSRESPONCE res, int ms); |
gsfan | 0:2f6062c6d018 | 129 | /** |
gsfan | 0:2f6062c6d018 | 130 | * associate infrastructure |
gsfan | 0:2f6062c6d018 | 131 | * @param sec GSSEC_OPEN, GSSEC_WEP, GSSEC_WPA_PSK, GSSEC_WPA2_PSK, GSSEC_WPS_BUTTON |
gsfan | 2:c6e0e97901b3 | 132 | * @param ssid SSID |
gsfan | 2:c6e0e97901b3 | 133 | * @param pass pass phrase |
gsfan | 2:c6e0e97901b3 | 134 | * @param dhcp 0:static ip, 1:dhcp |
gsfan | 2:c6e0e97901b3 | 135 | * @retval 0 success |
gsfan | 2:c6e0e97901b3 | 136 | * @retval -1 failure |
gsfan | 0:2f6062c6d018 | 137 | */ |
gsfan | 0:2f6062c6d018 | 138 | int connect (GSSECURITY sec, char *ssid, char *pass, int dhcp = 1); |
gsfan | 0:2f6062c6d018 | 139 | /** |
gsfan | 0:2f6062c6d018 | 140 | * adhock |
gsfan | 0:2f6062c6d018 | 141 | * @param sec GSSEC_OPEN or GSSEC_WEP |
gsfan | 2:c6e0e97901b3 | 142 | * @param ssid SSID |
gsfan | 2:c6e0e97901b3 | 143 | * @param pass 10 or 26 hexadecimal digits |
gsfan | 2:c6e0e97901b3 | 144 | * @param ipaddr my ip address |
gsfan | 2:c6e0e97901b3 | 145 | * @param netmask subnet mask |
gsfan | 2:c6e0e97901b3 | 146 | * @retval 0 success |
gsfan | 2:c6e0e97901b3 | 147 | * @retval -1 failure |
gsfan | 0:2f6062c6d018 | 148 | */ |
gsfan | 0:2f6062c6d018 | 149 | int adhock (GSSECURITY sec, char *ssid, char *pass, IpAddr ipaddr, IpAddr netmask); |
gsfan | 0:2f6062c6d018 | 150 | /** |
gsfan | 0:2f6062c6d018 | 151 | * limited AP |
gsfan | 0:2f6062c6d018 | 152 | * @param sec GSSEC_OPEN or GSSEC_WEP |
gsfan | 2:c6e0e97901b3 | 153 | * @param ssid SSID |
gsfan | 0:2f6062c6d018 | 154 | * @param pass 10 or 26 hexadecimal digits |
gsfan | 2:c6e0e97901b3 | 155 | * @param ipaddr my ip address (dhcp start address) |
gsfan | 2:c6e0e97901b3 | 156 | * @param netmask subnet mask |
gsfan | 2:c6e0e97901b3 | 157 | * @retval 0 success |
gsfan | 2:c6e0e97901b3 | 158 | * @retval -1 failure |
gsfan | 0:2f6062c6d018 | 159 | * firmware: s2w-secureweb, s2w-web, s2w-wpsweb |
gsfan | 0:2f6062c6d018 | 160 | */ |
gsfan | 0:2f6062c6d018 | 161 | int limitedap (GSSECURITY sec, char *ssid, char *pass, IpAddr ipaddr, IpAddr netmask); |
gsfan | 0:2f6062c6d018 | 162 | /** |
gsfan | 0:2f6062c6d018 | 163 | * unassociate |
gsfan | 0:2f6062c6d018 | 164 | */ |
gsfan | 0:2f6062c6d018 | 165 | int disconnect (); |
gsfan | 0:2f6062c6d018 | 166 | |
gsfan | 0:2f6062c6d018 | 167 | /** |
gsfan | 0:2f6062c6d018 | 168 | * use DHCP |
gsfan | 0:2f6062c6d018 | 169 | */ |
gsfan | 0:2f6062c6d018 | 170 | int setAddress (); |
gsfan | 0:2f6062c6d018 | 171 | /** |
gsfan | 0:2f6062c6d018 | 172 | * use static ip address |
gsfan | 0:2f6062c6d018 | 173 | */ |
gsfan | 0:2f6062c6d018 | 174 | int setAddress (IpAddr ipaddr, IpAddr netmask, IpAddr gateway, IpAddr nameserver); |
gsfan | 0:2f6062c6d018 | 175 | /** |
gsfan | 1:b127c6c5241d | 176 | * get ip address |
gsfan | 1:b127c6c5241d | 177 | */ |
gsfan | 1:b127c6c5241d | 178 | int getAddress (IpAddr &ipaddr, IpAddr &netmask, IpAddr &gateway, IpAddr &nameserver); |
gsfan | 1:b127c6c5241d | 179 | /** |
gsfan | 0:2f6062c6d018 | 180 | * resolv hostname |
gsfan | 2:c6e0e97901b3 | 181 | * @param name hostname |
gsfan | 2:c6e0e97901b3 | 182 | * @param addr resolved ip address |
gsfan | 2:c6e0e97901b3 | 183 | * @retval 0 success |
gsfan | 2:c6e0e97901b3 | 184 | * @retval -1 failure |
gsfan | 0:2f6062c6d018 | 185 | */ |
gsfan | 0:2f6062c6d018 | 186 | int getHostByName (const char* name, IpAddr &addr); |
gsfan | 0:2f6062c6d018 | 187 | /** |
gsfan | 0:2f6062c6d018 | 188 | * resolv hostname |
gsfan | 2:c6e0e97901b3 | 189 | * @param host.name hostname |
gsfan | 2:c6e0e97901b3 | 190 | * @param host.ipaddr resolved ip address |
gsfan | 2:c6e0e97901b3 | 191 | * @retval 0 success |
gsfan | 2:c6e0e97901b3 | 192 | * @retval -1 failure |
gsfan | 0:2f6062c6d018 | 193 | */ |
gsfan | 0:2f6062c6d018 | 194 | int getHostByName (Host &host); |
gsfan | 0:2f6062c6d018 | 195 | /** |
gsfan | 0:2f6062c6d018 | 196 | * RF power |
gsfan | 0:2f6062c6d018 | 197 | * @param power 0(high)-7(low) |
gsfan | 0:2f6062c6d018 | 198 | */ |
gsfan | 0:2f6062c6d018 | 199 | int setRFPower (int power); |
gsfan | 0:2f6062c6d018 | 200 | /** |
gsfan | 0:2f6062c6d018 | 201 | * power save mode |
gsfan | 2:c6e0e97901b3 | 202 | * @param active 0:switched off, 1:always on |
gsfan | 2:c6e0e97901b3 | 203 | * @param save 0:disable, 1:enable |
gsfan | 0:2f6062c6d018 | 204 | */ |
gsfan | 2:c6e0e97901b3 | 205 | int powerSave (int active, int save); |
gsfan | 0:2f6062c6d018 | 206 | /** |
gsfan | 0:2f6062c6d018 | 207 | * standby mode |
gsfan | 0:2f6062c6d018 | 208 | * @param msec wakeup after |
gsfan | 0:2f6062c6d018 | 209 | * wakeup after msec or alarm1/2 |
gsfan | 0:2f6062c6d018 | 210 | * core off, save to RTC ram |
gsfan | 0:2f6062c6d018 | 211 | */ |
gsfan | 0:2f6062c6d018 | 212 | int standby (int msec); |
gsfan | 0:2f6062c6d018 | 213 | /** |
gsfan | 0:2f6062c6d018 | 214 | * restore standby |
gsfan | 0:2f6062c6d018 | 215 | */ |
gsfan | 0:2f6062c6d018 | 216 | int wakeup (); |
gsfan | 0:2f6062c6d018 | 217 | /** |
gsfan | 0:2f6062c6d018 | 218 | * deep sleep mode |
gsfan | 0:2f6062c6d018 | 219 | */ |
gsfan | 0:2f6062c6d018 | 220 | int deepSleep (); |
gsfan | 0:2f6062c6d018 | 221 | /** |
gsfan | 0:2f6062c6d018 | 222 | * wifi connected |
gsfan | 0:2f6062c6d018 | 223 | */ |
gsfan | 0:2f6062c6d018 | 224 | bool isConnected (); |
gsfan | 0:2f6062c6d018 | 225 | /** |
gsfan | 0:2f6062c6d018 | 226 | * status |
gsfan | 2:c6e0e97901b3 | 227 | * @return GSSTATUS |
gsfan | 0:2f6062c6d018 | 228 | */ |
gsfan | 0:2f6062c6d018 | 229 | GSSTATUS getStatus (); |
gsfan | 1:b127c6c5241d | 230 | /** |
gsfan | 2:c6e0e97901b3 | 231 | * RSSI |
gsfan | 2:c6e0e97901b3 | 232 | * @return dBm |
gsfan | 1:b127c6c5241d | 233 | */ |
gsfan | 1:b127c6c5241d | 234 | int getRssi (); |
gsfan | 0:2f6062c6d018 | 235 | |
gsfan | 0:2f6062c6d018 | 236 | /** |
gsfan | 2:c6e0e97901b3 | 237 | * main polling |
gsfan | 0:2f6062c6d018 | 238 | */ |
gsfan | 0:2f6062c6d018 | 239 | void poll(); |
gsfan | 0:2f6062c6d018 | 240 | |
gsfan | 0:2f6062c6d018 | 241 | /** |
gsfan | 0:2f6062c6d018 | 242 | * tcp/udp client |
gsfan | 0:2f6062c6d018 | 243 | */ |
gsfan | 0:2f6062c6d018 | 244 | int open (Host &host, GSPROTOCOL pro, onGsReceiveFunc ponGsReceive = NULL); |
gsfan | 0:2f6062c6d018 | 245 | /** |
gsfan | 0:2f6062c6d018 | 246 | * tcp/udp server |
gsfan | 0:2f6062c6d018 | 247 | */ |
gsfan | 0:2f6062c6d018 | 248 | int listen (int port, GSPROTOCOL pro, onGsReceiveFunc ponGsReceive = NULL); |
gsfan | 0:2f6062c6d018 | 249 | /** |
gsfan | 0:2f6062c6d018 | 250 | * close client/server |
gsfan | 0:2f6062c6d018 | 251 | */ |
gsfan | 0:2f6062c6d018 | 252 | int close (int cid); |
gsfan | 0:2f6062c6d018 | 253 | /** |
gsfan | 0:2f6062c6d018 | 254 | * send data tcp(s/c), udp(c) |
gsfan | 0:2f6062c6d018 | 255 | */ |
gsfan | 0:2f6062c6d018 | 256 | int send (int cid, char *buf, int len); |
gsfan | 0:2f6062c6d018 | 257 | /** |
gsfan | 0:2f6062c6d018 | 258 | * send data udp(s) |
gsfan | 0:2f6062c6d018 | 259 | */ |
gsfan | 0:2f6062c6d018 | 260 | int send (int cid, char *buf, int len, Host &host); |
gsfan | 0:2f6062c6d018 | 261 | /** |
gsfan | 0:2f6062c6d018 | 262 | * recv data tcp(s/c), udp(c) |
gsfan | 0:2f6062c6d018 | 263 | */ |
gsfan | 0:2f6062c6d018 | 264 | int recv (int cid, char *buf, int len); |
gsfan | 0:2f6062c6d018 | 265 | /** |
gsfan | 0:2f6062c6d018 | 266 | * recv data udp(s) |
gsfan | 0:2f6062c6d018 | 267 | */ |
gsfan | 0:2f6062c6d018 | 268 | int recv (int cid, char *buf, int len, Host &host); |
gsfan | 0:2f6062c6d018 | 269 | /** |
gsfan | 0:2f6062c6d018 | 270 | * tcp/udp connected |
gsfan | 0:2f6062c6d018 | 271 | */ |
gsfan | 0:2f6062c6d018 | 272 | bool isConnected (int cid); |
gsfan | 0:2f6062c6d018 | 273 | |
gsfan | 0:2f6062c6d018 | 274 | /** |
gsfan | 0:2f6062c6d018 | 275 | * http request |
gsfan | 0:2f6062c6d018 | 276 | */ |
gsfan | 0:2f6062c6d018 | 277 | int httpGet (Host &host, char *uri, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL); |
gsfan | 0:2f6062c6d018 | 278 | /** |
gsfan | 0:2f6062c6d018 | 279 | * certificate |
gsfan | 0:2f6062c6d018 | 280 | */ |
gsfan | 0:2f6062c6d018 | 281 | int certAdd (char *name, char *cert, int len); |
gsfan | 0:2f6062c6d018 | 282 | |
gsfan | 0:2f6062c6d018 | 283 | void test (); |
gsfan | 0:2f6062c6d018 | 284 | int getc(); |
gsfan | 0:2f6062c6d018 | 285 | void putc(char c); |
gsfan | 0:2f6062c6d018 | 286 | int readable(); |
gsfan | 0:2f6062c6d018 | 287 | |
gsfan | 0:2f6062c6d018 | 288 | protected: |
gsfan | 0:2f6062c6d018 | 289 | int x2i (char c); |
gsfan | 0:2f6062c6d018 | 290 | char i2x (int i); |
gsfan | 0:2f6062c6d018 | 291 | void isr_recv (); |
gsfan | 2:c6e0e97901b3 | 292 | void newSock (int cid, GSTYPE type, GSPROTOCOL pro, onGsReceiveFunc ponGsReceive); |
gsfan | 0:2f6062c6d018 | 293 | |
gsfan | 0:2f6062c6d018 | 294 | private: |
gsfan | 0:2f6062c6d018 | 295 | Serial _gs; |
gsfan | 0:2f6062c6d018 | 296 | bool _rts; |
gsfan | 0:2f6062c6d018 | 297 | volatile bool _connect; |
gsfan | 0:2f6062c6d018 | 298 | volatile GSSTATUS _status; |
gsfan | 0:2f6062c6d018 | 299 | volatile int _gs_ok, _gs_failure, _gs_enter; |
gsfan | 0:2f6062c6d018 | 300 | GSMODE _gs_mode; |
gsfan | 0:2f6062c6d018 | 301 | int _escape; |
gsfan | 1:b127c6c5241d | 302 | int _cid, _rssi; |
gsfan | 0:2f6062c6d018 | 303 | IpAddr _ipaddr, _netmask, _gateway, _nameserver, _resolv; |
gsfan | 0:2f6062c6d018 | 304 | Host _from, _to; |
gsfan | 0:2f6062c6d018 | 305 | char mac[6]; |
gsfan | 0:2f6062c6d018 | 306 | RingBuffer _buf_cmd; |
gsfan | 0:2f6062c6d018 | 307 | struct GS_Socket _gs_sock[16]; |
gsfan | 0:2f6062c6d018 | 308 | }; |