GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Fork of GSwifi_old by gs fan

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/

Information

Please change the baud rate in advance.

  • ATB=115200
  • AT&W0

It may be better and sometimes faster.
GSwifi gs(p13, p14, baud);

Heavily modified new library: http://mbed.org/users/gsfan/code/GSwifi

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

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

解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Information

モジュールはあらかじめ次のコマンドでボーレートを変更しておく。

  • ATB=115200
  • AT&W0

場合によってはもっと高速の方がいいかもしれない。クラス宣言時にレート設定をする。
GSwifi gs(p13, p14, baud);

大幅に更新された新しいライブラリ: http://mbed.org/users/gsfan/code/GSwifi

Committer:
gsfan
Date:
Tue Oct 09 16:05:40 2012 +0000
Revision:
15:5febfc399099
Parent:
12:63e714550791
Child:
16:aea56cce3bf5
add httpPost, http auth

Who changed what in which revision?

UserRevisionLine numberNew 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 7:b75b7fc144ff 13 #ifndef _GSWIFI_H_
gsfan 7:b75b7fc144ff 14 #define _GSWIFI_H_
gsfan 7:b75b7fc144ff 15
gsfan 0:2f6062c6d018 16 #include "mbed.h"
gsfan 0:2f6062c6d018 17 #include "RingBuffer.h"
gsfan 0:2f6062c6d018 18 #include "host.h"
gsfan 0:2f6062c6d018 19 #include "ipaddr.h"
gsfan 0:2f6062c6d018 20
gsfan 0:2f6062c6d018 21 #define GS_BAUD 115200
gsfan 1:b127c6c5241d 22 #define GS_UART_DIRECT
gsfan 0:2f6062c6d018 23
gsfan 0:2f6062c6d018 24 #define GS_BULK
gsfan 0:2f6062c6d018 25
gsfan 0:2f6062c6d018 26 #define GS_TIMEOUT 10000 // ms
gsfan 0:2f6062c6d018 27 #define GS_TIMEOUT2 30000 // ms
gsfan 0:2f6062c6d018 28 #define GS_CMD_SIZE 100
gsfan 0:2f6062c6d018 29 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
gsfan 0:2f6062c6d018 30 #define GS_DATA_SIZE 1500
gsfan 0:2f6062c6d018 31 #elif defined(TARGET_LPC11U24)
gsfan 0:2f6062c6d018 32 #define GS_DATA_SIZE 800
gsfan 0:2f6062c6d018 33 #endif
gsfan 0:2f6062c6d018 34
gsfan 0:2f6062c6d018 35 /**
gsfan 0:2f6062c6d018 36 * Wi-Fi security
gsfan 0:2f6062c6d018 37 */
gsfan 0:2f6062c6d018 38 enum GSSECURITY {
gsfan 0:2f6062c6d018 39 GSSEC_AUTO = 0,
gsfan 0:2f6062c6d018 40 GSSEC_NONE = 0,
gsfan 0:2f6062c6d018 41 GSSEC_OPEN = 1,
gsfan 0:2f6062c6d018 42 GSSEC_WEP = 2,
gsfan 0:2f6062c6d018 43 GSSEC_WPA_PSK = 4,
gsfan 0:2f6062c6d018 44 GSSEC_WPA2_PSK = 8,
gsfan 0:2f6062c6d018 45 GSSEC_WPA_ENT = 16,
gsfan 0:2f6062c6d018 46 GSSEC_WPA2_ENT = 32,
gsfan 0:2f6062c6d018 47 GSSEC_WPS_BUTTON = 64,
gsfan 0:2f6062c6d018 48 };
gsfan 0:2f6062c6d018 49
gsfan 0:2f6062c6d018 50 /**
gsfan 0:2f6062c6d018 51 * TCP/IP protocol
gsfan 0:2f6062c6d018 52 */
gsfan 0:2f6062c6d018 53 enum GSPROTOCOL {
gsfan 0:2f6062c6d018 54 GSPROT_UDP = 0,
gsfan 0:2f6062c6d018 55 GSPROT_TCP = 1,
gsfan 0:2f6062c6d018 56 GSPROT_HTTPGET,
gsfan 0:2f6062c6d018 57 GSPROT_HTTPPOST,
gsfan 0:2f6062c6d018 58 };
gsfan 0:2f6062c6d018 59
gsfan 0:2f6062c6d018 60 /**
gsfan 0:2f6062c6d018 61 * Client/Server
gsfan 0:2f6062c6d018 62 */
gsfan 0:2f6062c6d018 63 enum GSTYPE {
gsfan 0:2f6062c6d018 64 GSTYPE_CLIENT = 0,
gsfan 0:2f6062c6d018 65 GSTYPE_SERVER = 1,
gsfan 0:2f6062c6d018 66 };
gsfan 0:2f6062c6d018 67
gsfan 0:2f6062c6d018 68 enum GSRESPONCE {
gsfan 0:2f6062c6d018 69 GSRES_NORMAL,
gsfan 0:2f6062c6d018 70 GSRES_CONNECT,
gsfan 0:2f6062c6d018 71 GSRES_WPS,
gsfan 0:2f6062c6d018 72 GSRES_MACADDRESS,
gsfan 0:2f6062c6d018 73 GSRES_DHCP,
gsfan 0:2f6062c6d018 74 GSRES_DNSLOOKUP,
gsfan 0:2f6062c6d018 75 GSRES_HTTP,
gsfan 1:b127c6c5241d 76 GSRES_RSSI,
gsfan 5:6def1d0df519 77 GSRES_TIME,
gsfan 0:2f6062c6d018 78 };
gsfan 0:2f6062c6d018 79
gsfan 0:2f6062c6d018 80 enum GSMODE {
gsfan 0:2f6062c6d018 81 GSMODE_COMMAND,
gsfan 0:2f6062c6d018 82 GSMODE_DATA_RX,
gsfan 0:2f6062c6d018 83 GSMODE_DATA_RXUDP,
gsfan 0:2f6062c6d018 84 GSMODE_DATA_RX_BULK,
gsfan 0:2f6062c6d018 85 GSMODE_DATA_RXUDP_BULK,
gsfan 0:2f6062c6d018 86 GSMODE_DATA_RXHTTP,
gsfan 0:2f6062c6d018 87 };
gsfan 0:2f6062c6d018 88
gsfan 0:2f6062c6d018 89 enum GSSTATUS {
gsfan 0:2f6062c6d018 90 GSSTAT_READY,
gsfan 0:2f6062c6d018 91 GSSTAT_STANDBY,
gsfan 0:2f6062c6d018 92 GSSTAT_WAKEUP,
gsfan 0:2f6062c6d018 93 GSSTAT_DEEPSLEEP,
gsfan 0:2f6062c6d018 94 };
gsfan 0:2f6062c6d018 95
gsfan 0:2f6062c6d018 96 /**
gsfan 0:2f6062c6d018 97 * data receive callback function
gsfan 0:2f6062c6d018 98 */
gsfan 1:b127c6c5241d 99 typedef void (*onGsReceiveFunc)(int cid, int len);
gsfan 0:2f6062c6d018 100
gsfan 0:2f6062c6d018 101 struct GS_Socket {
gsfan 0:2f6062c6d018 102 GSTYPE type;
gsfan 0:2f6062c6d018 103 GSPROTOCOL protocol;
gsfan 0:2f6062c6d018 104 bool connect;
gsfan 0:2f6062c6d018 105 Host host;
gsfan 0:2f6062c6d018 106 RingBuffer *data;
gsfan 1:b127c6c5241d 107 int lcid;
gsfan 0:2f6062c6d018 108 int received;
gsfan 0:2f6062c6d018 109 onGsReceiveFunc onGsReceive;
gsfan 0:2f6062c6d018 110 };
gsfan 0:2f6062c6d018 111
gsfan 0:2f6062c6d018 112 /**
gsfan 0:2f6062c6d018 113 * GSwifi class
gsfan 0:2f6062c6d018 114 */
gsfan 0:2f6062c6d018 115 class GSwifi {
gsfan 0:2f6062c6d018 116 public:
gsfan 0:2f6062c6d018 117 /**
gsfan 0:2f6062c6d018 118 * default constructor
gsfan 0:2f6062c6d018 119 */
gsfan 10:698c5e96b5b1 120 GSwifi (PinName p_tx, PinName p_rx, int baud = GS_BAUD);
gsfan 0:2f6062c6d018 121 /**
gsfan 0:2f6062c6d018 122 * Default constructor (with hardware fllow controll)
gsfan 0:2f6062c6d018 123 */
gsfan 10:698c5e96b5b1 124 GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts, int baud = GS_BAUD);
gsfan 0:2f6062c6d018 125 /**
gsfan 0:2f6062c6d018 126 * send command
gsfan 0:2f6062c6d018 127 */
gsfan 12:63e714550791 128 int command (const char *cmd, GSRESPONCE res, int timeout = GS_TIMEOUT);
gsfan 0:2f6062c6d018 129 /**
gsfan 0:2f6062c6d018 130 * recv responce
gsfan 0:2f6062c6d018 131 */
gsfan 0:2f6062c6d018 132 int cmdResponse (GSRESPONCE res, int ms);
gsfan 0:2f6062c6d018 133 /**
gsfan 0:2f6062c6d018 134 * associate infrastructure
gsfan 0:2f6062c6d018 135 * @param sec GSSEC_OPEN, GSSEC_WEP, GSSEC_WPA_PSK, GSSEC_WPA2_PSK, GSSEC_WPS_BUTTON
gsfan 2:c6e0e97901b3 136 * @param ssid SSID
gsfan 2:c6e0e97901b3 137 * @param pass pass phrase
gsfan 2:c6e0e97901b3 138 * @param dhcp 0:static ip, 1:dhcp
gsfan 2:c6e0e97901b3 139 * @retval 0 success
gsfan 2:c6e0e97901b3 140 * @retval -1 failure
gsfan 0:2f6062c6d018 141 */
gsfan 0:2f6062c6d018 142 int connect (GSSECURITY sec, char *ssid, char *pass, int dhcp = 1);
gsfan 0:2f6062c6d018 143 /**
gsfan 0:2f6062c6d018 144 * adhock
gsfan 0:2f6062c6d018 145 * @param sec GSSEC_OPEN or GSSEC_WEP
gsfan 2:c6e0e97901b3 146 * @param ssid SSID
gsfan 2:c6e0e97901b3 147 * @param pass 10 or 26 hexadecimal digits
gsfan 2:c6e0e97901b3 148 * @param ipaddr my ip address
gsfan 2:c6e0e97901b3 149 * @param netmask subnet mask
gsfan 2:c6e0e97901b3 150 * @retval 0 success
gsfan 2:c6e0e97901b3 151 * @retval -1 failure
gsfan 0:2f6062c6d018 152 */
gsfan 0:2f6062c6d018 153 int adhock (GSSECURITY sec, char *ssid, char *pass, IpAddr ipaddr, IpAddr netmask);
gsfan 0:2f6062c6d018 154 /**
gsfan 0:2f6062c6d018 155 * limited AP
gsfan 0:2f6062c6d018 156 * @param sec GSSEC_OPEN or GSSEC_WEP
gsfan 2:c6e0e97901b3 157 * @param ssid SSID
gsfan 0:2f6062c6d018 158 * @param pass 10 or 26 hexadecimal digits
gsfan 2:c6e0e97901b3 159 * @param ipaddr my ip address (dhcp start address)
gsfan 2:c6e0e97901b3 160 * @param netmask subnet mask
gsfan 2:c6e0e97901b3 161 * @retval 0 success
gsfan 2:c6e0e97901b3 162 * @retval -1 failure
gsfan 0:2f6062c6d018 163 * firmware: s2w-secureweb, s2w-web, s2w-wpsweb
gsfan 0:2f6062c6d018 164 */
gsfan 0:2f6062c6d018 165 int limitedap (GSSECURITY sec, char *ssid, char *pass, IpAddr ipaddr, IpAddr netmask);
gsfan 0:2f6062c6d018 166 /**
gsfan 0:2f6062c6d018 167 * unassociate
gsfan 0:2f6062c6d018 168 */
gsfan 0:2f6062c6d018 169 int disconnect ();
gsfan 0:2f6062c6d018 170
gsfan 0:2f6062c6d018 171 /**
gsfan 0:2f6062c6d018 172 * use DHCP
gsfan 0:2f6062c6d018 173 */
gsfan 0:2f6062c6d018 174 int setAddress ();
gsfan 0:2f6062c6d018 175 /**
gsfan 0:2f6062c6d018 176 * use static ip address
gsfan 0:2f6062c6d018 177 */
gsfan 0:2f6062c6d018 178 int setAddress (IpAddr ipaddr, IpAddr netmask, IpAddr gateway, IpAddr nameserver);
gsfan 0:2f6062c6d018 179 /**
gsfan 1:b127c6c5241d 180 * get ip address
gsfan 1:b127c6c5241d 181 */
gsfan 1:b127c6c5241d 182 int getAddress (IpAddr &ipaddr, IpAddr &netmask, IpAddr &gateway, IpAddr &nameserver);
gsfan 1:b127c6c5241d 183 /**
gsfan 0:2f6062c6d018 184 * resolv hostname
gsfan 2:c6e0e97901b3 185 * @param name hostname
gsfan 2:c6e0e97901b3 186 * @param addr resolved ip address
gsfan 0:2f6062c6d018 187 */
gsfan 0:2f6062c6d018 188 int getHostByName (const char* name, IpAddr &addr);
gsfan 0:2f6062c6d018 189 /**
gsfan 0:2f6062c6d018 190 * resolv hostname
gsfan 2:c6e0e97901b3 191 * @param host.name hostname
gsfan 2:c6e0e97901b3 192 * @param host.ipaddr resolved ip address
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 6:a423f0d197de 202 * @param active rx radio 0:switched off, 1:always on
gsfan 6:a423f0d197de 203 * @param save power 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 6:a423f0d197de 232 * @return RSSI (dBm)
gsfan 1:b127c6c5241d 233 */
gsfan 1:b127c6c5241d 234 int getRssi ();
gsfan 5:6def1d0df519 235 /**
gsfan 5:6def1d0df519 236 * set NTP server
gsfan 6:a423f0d197de 237 * @param host SNTP server
gsfan 6:a423f0d197de 238 * @param sec time sync interval, 0:one time
gsfan 5:6def1d0df519 239 */
gsfan 5:6def1d0df519 240 int ntpdate (Host host, int sec = 0);
gsfan 5:6def1d0df519 241 /**
gsfan 6:a423f0d197de 242 * set system time
gsfan 6:a423f0d197de 243 * @param time date time (UTC)
gsfan 5:6def1d0df519 244 */
gsfan 5:6def1d0df519 245 int setTime (time_t time);
gsfan 6:a423f0d197de 246 /**
gsfan 5:6def1d0df519 247 * get RTC time
gsfan 6:a423f0d197de 248 * @return date time (UTC)
gsfan 5:6def1d0df519 249 */
gsfan 5:6def1d0df519 250 time_t getTime ();
gsfan 6:a423f0d197de 251 /**
gsfan 6:a423f0d197de 252 * GPIO output
gsfan 6:a423f0d197de 253 * @param port 10,11,30,31
gsfan 6:a423f0d197de 254 * @param out 0:set(high), 1:reset(low)
gsfan 6:a423f0d197de 255 */
gsfan 6:a423f0d197de 256 int gpioOut (int port, int out);
gsfan 0:2f6062c6d018 257
gsfan 0:2f6062c6d018 258 /**
gsfan 2:c6e0e97901b3 259 * main polling
gsfan 0:2f6062c6d018 260 */
gsfan 0:2f6062c6d018 261 void poll();
gsfan 0:2f6062c6d018 262
gsfan 0:2f6062c6d018 263 /**
gsfan 0:2f6062c6d018 264 * tcp/udp client
gsfan 6:a423f0d197de 265 * @return CID, -1:failure
gsfan 0:2f6062c6d018 266 */
gsfan 0:2f6062c6d018 267 int open (Host &host, GSPROTOCOL pro, onGsReceiveFunc ponGsReceive = NULL);
gsfan 0:2f6062c6d018 268 /**
gsfan 0:2f6062c6d018 269 * tcp/udp server
gsfan 6:a423f0d197de 270 * @return CID, -1:failure
gsfan 0:2f6062c6d018 271 */
gsfan 0:2f6062c6d018 272 int listen (int port, GSPROTOCOL pro, onGsReceiveFunc ponGsReceive = NULL);
gsfan 0:2f6062c6d018 273 /**
gsfan 0:2f6062c6d018 274 * close client/server
gsfan 0:2f6062c6d018 275 */
gsfan 0:2f6062c6d018 276 int close (int cid);
gsfan 0:2f6062c6d018 277 /**
gsfan 0:2f6062c6d018 278 * send data tcp(s/c), udp(c)
gsfan 0:2f6062c6d018 279 */
gsfan 0:2f6062c6d018 280 int send (int cid, char *buf, int len);
gsfan 0:2f6062c6d018 281 /**
gsfan 0:2f6062c6d018 282 * send data udp(s)
gsfan 0:2f6062c6d018 283 */
gsfan 0:2f6062c6d018 284 int send (int cid, char *buf, int len, Host &host);
gsfan 0:2f6062c6d018 285 /**
gsfan 0:2f6062c6d018 286 * recv data tcp(s/c), udp(c)
gsfan 6:a423f0d197de 287 * @return length
gsfan 0:2f6062c6d018 288 */
gsfan 0:2f6062c6d018 289 int recv (int cid, char *buf, int len);
gsfan 0:2f6062c6d018 290 /**
gsfan 0:2f6062c6d018 291 * recv data udp(s)
gsfan 6:a423f0d197de 292 * @return length
gsfan 0:2f6062c6d018 293 */
gsfan 0:2f6062c6d018 294 int recv (int cid, char *buf, int len, Host &host);
gsfan 0:2f6062c6d018 295 /**
gsfan 0:2f6062c6d018 296 * tcp/udp connected
gsfan 0:2f6062c6d018 297 */
gsfan 0:2f6062c6d018 298 bool isConnected (int cid);
gsfan 0:2f6062c6d018 299
gsfan 0:2f6062c6d018 300 /**
gsfan 0:2f6062c6d018 301 * http request
gsfan 6:a423f0d197de 302 * @return CID, -1:failure
gsfan 6:a423f0d197de 303 * If you use ssl, please set system time.
gsfan 0:2f6062c6d018 304 */
gsfan 15:5febfc399099 305 int httpGet (Host &host, char *uri, int ssl, char *user, char *pwd, onGsReceiveFunc ponGsReceive = NULL);
gsfan 0:2f6062c6d018 306 int httpGet (Host &host, char *uri, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL);
gsfan 0:2f6062c6d018 307 /**
gsfan 15:5febfc399099 308 * http request
gsfan 15:5febfc399099 309 * @return CID, -1:failure
gsfan 15:5febfc399099 310 * If you use ssl, please set system time.
gsfan 15:5febfc399099 311 */
gsfan 15:5febfc399099 312 int httpPost (Host &host, char *uri, char *body, int ssl, char *user, char *pwd, onGsReceiveFunc ponGsReceive = NULL);
gsfan 15:5febfc399099 313 int httpPost (Host &host, char *uri, char *body, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL);
gsfan 15:5febfc399099 314 /**
gsfan 0:2f6062c6d018 315 * certificate
gsfan 0:2f6062c6d018 316 */
gsfan 0:2f6062c6d018 317 int certAdd (char *name, char *cert, int len);
gsfan 0:2f6062c6d018 318
gsfan 15:5febfc399099 319 int base64encode (const char *input, int length, char *output, int len);
gsfan 15:5febfc399099 320 int urlencode (char *str, char *buf, int len);
gsfan 15:5febfc399099 321
gsfan 0:2f6062c6d018 322 void test ();
gsfan 0:2f6062c6d018 323 int getc();
gsfan 0:2f6062c6d018 324 void putc(char c);
gsfan 0:2f6062c6d018 325 int readable();
gsfan 0:2f6062c6d018 326
gsfan 0:2f6062c6d018 327 protected:
gsfan 0:2f6062c6d018 328 int x2i (char c);
gsfan 0:2f6062c6d018 329 char i2x (int i);
gsfan 0:2f6062c6d018 330 void isr_recv ();
gsfan 2:c6e0e97901b3 331 void newSock (int cid, GSTYPE type, GSPROTOCOL pro, onGsReceiveFunc ponGsReceive);
gsfan 0:2f6062c6d018 332
gsfan 0:2f6062c6d018 333 private:
gsfan 0:2f6062c6d018 334 Serial _gs;
gsfan 0:2f6062c6d018 335 bool _rts;
gsfan 0:2f6062c6d018 336 volatile bool _connect;
gsfan 0:2f6062c6d018 337 volatile GSSTATUS _status;
gsfan 0:2f6062c6d018 338 volatile int _gs_ok, _gs_failure, _gs_enter;
gsfan 0:2f6062c6d018 339 GSMODE _gs_mode;
gsfan 0:2f6062c6d018 340 int _escape;
gsfan 1:b127c6c5241d 341 int _cid, _rssi;
gsfan 0:2f6062c6d018 342 IpAddr _ipaddr, _netmask, _gateway, _nameserver, _resolv;
gsfan 0:2f6062c6d018 343 Host _from, _to;
gsfan 4:a8d38857f3fd 344 char _mac[6];
gsfan 0:2f6062c6d018 345 RingBuffer _buf_cmd;
gsfan 0:2f6062c6d018 346 struct GS_Socket _gs_sock[16];
gsfan 5:6def1d0df519 347 time_t _time;
gsfan 0:2f6062c6d018 348 };
gsfan 7:b75b7fc144ff 349
gsfan 7:b75b7fc144ff 350 #endif