ThingPlug Test

Dependents:   WizFi310_ThingPlug_Test WizFi310_ThingPlug_Test_P

Fork of WizFi310Interface by WIZnet

Committer:
cliff1
Date:
Wed Nov 15 06:28:23 2017 +0000
Revision:
12:77cd2133312c
Parent:
8:08588dd2a66f
20171115_2;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jehoon 0:df571f8f8c03 1 /* Copyright (C) 2013 gsfan, MIT License
jehoon 0:df571f8f8c03 2 *
jehoon 0:df571f8f8c03 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
jehoon 0:df571f8f8c03 4 * and associated documentation files (the "Software"), to deal in the Software without restriction,
jehoon 0:df571f8f8c03 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
jehoon 0:df571f8f8c03 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
jehoon 0:df571f8f8c03 7 * furnished to do so, subject to the following conditions:
jehoon 0:df571f8f8c03 8 *
jehoon 0:df571f8f8c03 9 * The above copyright notice and this permission notice shall be included in all copies or
jehoon 0:df571f8f8c03 10 * substantial portions of the Software.
jehoon 0:df571f8f8c03 11 *
jehoon 0:df571f8f8c03 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
jehoon 0:df571f8f8c03 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
jehoon 0:df571f8f8c03 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
jehoon 0:df571f8f8c03 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
jehoon 0:df571f8f8c03 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
jehoon 0:df571f8f8c03 17 */
jehoon 0:df571f8f8c03 18 /* Copyright (C) 2014 Wiznet, MIT License
jehoon 0:df571f8f8c03 19 * port to the Wiznet Module WizFi310
jehoon 0:df571f8f8c03 20 */
jehoon 0:df571f8f8c03 21
jehoon 0:df571f8f8c03 22 #ifndef WIZFI310_H_
jehoon 0:df571f8f8c03 23 #define WIZFI310_H_
jehoon 0:df571f8f8c03 24
jehoon 0:df571f8f8c03 25 #include "WizFi310_conf.h"
jehoon 0:df571f8f8c03 26
jehoon 0:df571f8f8c03 27 #include "mbed.h"
jehoon 0:df571f8f8c03 28 #include "RawSerial.h"
jehoon 0:df571f8f8c03 29 #include "Serial.h"
jehoon 0:df571f8f8c03 30 #include "CBuffer.h"
jehoon 0:df571f8f8c03 31 #include <ctype.h>
jehoon 0:df571f8f8c03 32 #include <stdlib.h>
jehoon 0:df571f8f8c03 33 #include <string>
jehoon 0:df571f8f8c03 34 #include "WiFiInterface.h"
jehoon 0:df571f8f8c03 35
jehoon 0:df571f8f8c03 36 using namespace std;
jehoon 0:df571f8f8c03 37
jehoon 0:df571f8f8c03 38 #define BUF_SIZE 1600
jehoon 0:df571f8f8c03 39
jehoon 0:df571f8f8c03 40 //Debug is disabled by default
jehoon 0:df571f8f8c03 41 #if 1
jehoon 0:df571f8f8c03 42 #define WIZ_DBG(x, ...) std::printf("[WizFi310: DBG]" x "\r\n", ##__VA_ARGS__);
jehoon 0:df571f8f8c03 43 #define WIZ_WARN(x, ...) std::printf("[WizFi310: WARN]" x "\r\n", ##__VA_ARGS__);
jehoon 0:df571f8f8c03 44 #define WIZ_ERR(x, ...) std::printf("[WizFi310: ERR]" x "\r\n", ##__VA_ARGS__);
jehoon 0:df571f8f8c03 45 #define WIZ_INFO(x, ...) std::printf("[WizFi310: INFO]" x "\r\n", ##__VA_ARGS__);
jehoon 0:df571f8f8c03 46 #else
jehoon 0:df571f8f8c03 47 #define WIZ_DBG(x, ...)
jehoon 0:df571f8f8c03 48 #define WIZ_WARN(x, ...)
jehoon 0:df571f8f8c03 49 #define WIZ_ERR(x, ...)
jehoon 0:df571f8f8c03 50 #define WIZ_INFO(x, ...)
jehoon 0:df571f8f8c03 51 #endif
jehoon 0:df571f8f8c03 52
jehoon 0:df571f8f8c03 53
jehoon 0:df571f8f8c03 54 class WizFi310
jehoon 0:df571f8f8c03 55 {
jehoon 0:df571f8f8c03 56 public:
jehoon 0:df571f8f8c03 57
jehoon 0:df571f8f8c03 58 enum AntennaMode{
jehoon 0:df571f8f8c03 59 PCB = 0,
jehoon 0:df571f8f8c03 60 UFL = 1,
jehoon 0:df571f8f8c03 61 AUTO = 3,
jehoon 0:df571f8f8c03 62 };
jehoon 0:df571f8f8c03 63
jehoon 0:df571f8f8c03 64 enum WiFiMode {
jehoon 0:df571f8f8c03 65 WM_STATION = 0,
jehoon 0:df571f8f8c03 66 WM_AP = 1,
jehoon 0:df571f8f8c03 67 };
jehoon 0:df571f8f8c03 68
jehoon 0:df571f8f8c03 69 /** Wi-Fi security
jehoon 0:df571f8f8c03 70 */
jehoon 0:df571f8f8c03 71 enum Security {
jehoon 0:df571f8f8c03 72 // kaizen need to change
jehoon 0:df571f8f8c03 73 SEC_AUTO = 0,
jehoon 0:df571f8f8c03 74 SEC_OPEN = 1,
jehoon 0:df571f8f8c03 75 SEC_WEP = 2,
jehoon 0:df571f8f8c03 76 SEC_WPA_TKIP = 3,
jehoon 0:df571f8f8c03 77 SEC_WPA_AES = 4,
jehoon 0:df571f8f8c03 78 SEC_WPA2_AES = 5,
jehoon 0:df571f8f8c03 79 SEC_WPA2_TKIP = 6,
jehoon 0:df571f8f8c03 80 SEC_WPA2_MIXED = 7,
jehoon 0:df571f8f8c03 81 };
jehoon 0:df571f8f8c03 82
jehoon 0:df571f8f8c03 83 /** TCP/IP protocol
jehoon 0:df571f8f8c03 84 */
jehoon 0:df571f8f8c03 85 enum Protocol {
jehoon 0:df571f8f8c03 86 PROTO_UDP = 0,
jehoon 0:df571f8f8c03 87 PROTO_TCP = 1,
jehoon 0:df571f8f8c03 88 };
jehoon 0:df571f8f8c03 89
jehoon 0:df571f8f8c03 90 /** Client/Server
jehoon 0:df571f8f8c03 91 */
jehoon 0:df571f8f8c03 92 enum Type {
jehoon 0:df571f8f8c03 93 TYPE_CLIENT = 0,
jehoon 0:df571f8f8c03 94 TYPE_SERVER = 1,
jehoon 0:df571f8f8c03 95 };
jehoon 0:df571f8f8c03 96
jehoon 0:df571f8f8c03 97 enum Response {
jehoon 0:df571f8f8c03 98 RES_NULL,
jehoon 0:df571f8f8c03 99 RES_MACADDRESS,
jehoon 0:df571f8f8c03 100 RES_WJOIN,
jehoon 0:df571f8f8c03 101 RES_CONNECT,
jehoon 0:df571f8f8c03 102 RES_SSEND,
jehoon 0:df571f8f8c03 103 RES_FDNS,
jehoon 0:df571f8f8c03 104 RES_SMGMT,
jehoon 0:df571f8f8c03 105 RES_WSTATUS,
jehoon 1:16e57103a7dd 106
jehoon 0:df571f8f8c03 107 };
jehoon 0:df571f8f8c03 108
jehoon 0:df571f8f8c03 109 enum Mode {
jehoon 0:df571f8f8c03 110 MODE_COMMAND,
jehoon 0:df571f8f8c03 111 MODE_CMDRESP,
jehoon 0:df571f8f8c03 112 MODE_DATA_RX,
jehoon 0:df571f8f8c03 113 MODE_DATA_RXUDP,
jehoon 0:df571f8f8c03 114 MODE_DATA_RXUDP_BULK,
jehoon 0:df571f8f8c03 115 };
jehoon 0:df571f8f8c03 116
jehoon 0:df571f8f8c03 117 enum Status {
jehoon 0:df571f8f8c03 118 STAT_NONE,
jehoon 0:df571f8f8c03 119 STAT_READY,
jehoon 0:df571f8f8c03 120 STAT_STANDBY,
jehoon 0:df571f8f8c03 121 STAT_WAKEUP,
jehoon 0:df571f8f8c03 122 STAT_DEEPSLEEP,
jehoon 0:df571f8f8c03 123 };
jehoon 0:df571f8f8c03 124
jehoon 0:df571f8f8c03 125
jehoon 0:df571f8f8c03 126 WizFi310 (PinName tx, PinName rx, PinName cts, PinName rts, PinName reset, PinName alarm = NC, int baud = 115200);
jehoon 0:df571f8f8c03 127
jehoon 0:df571f8f8c03 128 // --------- WizFi250_at.cpp ---------
jehoon 0:df571f8f8c03 129 void clearFlags ();
jehoon 0:df571f8f8c03 130 int sendCommand (const char * cmd, Response res = RES_NULL, int timeout = DEFAULT_WAIT_RESP_TIMEOUT, int opt = 2);
jehoon 0:df571f8f8c03 131
jehoon 0:df571f8f8c03 132 int cmdAT ();
jehoon 0:df571f8f8c03 133 int cmdMECHO (bool flg);
jehoon 0:df571f8f8c03 134 int cmdUSET (int baud, char *flow);
jehoon 0:df571f8f8c03 135 int cmdMMAC (const char *mac = NULL);
jehoon 0:df571f8f8c03 136 int cmdWSET (WiFiMode mode, const char *ssid, const char *bssid = NULL, int channel = 1);
jehoon 0:df571f8f8c03 137 int cmdWANT (AntennaMode mode);
jehoon 0:df571f8f8c03 138 int cmdWNET (bool is_dhcp);
jehoon 0:df571f8f8c03 139 int cmdWSEC (WiFiMode mode, const char *key, const char *sec = NULL);
jehoon 0:df571f8f8c03 140 int cmdWJOIN ();
jehoon 0:df571f8f8c03 141 int cmdWLEAVE ();
jehoon 0:df571f8f8c03 142 int cmdWSTATUS ();
jehoon 0:df571f8f8c03 143 int cmdSCON ( const char *openType, const char *socketType, int localPort, const char *dataMode = "0");
jehoon 0:df571f8f8c03 144 int cmdSCON ( const char *openType, const char *socketType, const char *remoteIp, int remotePort, int localPort = 0, const char *dataMode = "0");
jehoon 0:df571f8f8c03 145 int cmdSSEND ( const char *data, int cid, int sendSize, const char *remoteIp = NULL, int remotePort = 0, int Timeout = 2000 );
jehoon 0:df571f8f8c03 146 int cmdCLOSE ( int cid );
jehoon 0:df571f8f8c03 147 int cmdFDNS (const char *host);
jehoon 0:df571f8f8c03 148 int cmdSMGMT ( int cid );
cliff1 7:b7019399eb1e 149
cliff1 7:b7019399eb1e 150
cliff1 7:b7019399eb1e 151 int cmdSKTPCON (const char *openType);
cliff1 7:b7019399eb1e 152 int cmdSKTPCON (const char *openType, const char *clientId, const char *credentialId, const char *serviceId, const char *devId);
cliff1 7:b7019399eb1e 153 int cmdSKTPDEVICE (const char *openType, const char *devId);
cliff1 7:b7019399eb1e 154 int cmdSKTPCONTAINER (const char *openType, const char *containerName);
cliff1 7:b7019399eb1e 155 int cmdSKTPCMD (const char *openType, const char *commandName);
cliff1 7:b7019399eb1e 156 int cmdSKTPSEND (const char *containerName, const char *sendData);
cliff1 8:08588dd2a66f 157 int cmdSKTPRESULT (const char *commandName, int executeStatus, int executeResult);
jehoon 0:df571f8f8c03 158
jehoon 0:df571f8f8c03 159
jehoon 0:df571f8f8c03 160 static WizFi310 * getInstance() {
jehoon 0:df571f8f8c03 161 return _inst;
jehoon 0:df571f8f8c03 162 };
jehoon 0:df571f8f8c03 163
jehoon 0:df571f8f8c03 164
jehoon 0:df571f8f8c03 165 // --------- WizFi2550_sock.cpp ---------
jehoon 0:df571f8f8c03 166 int getHostByName (const char * host, char *ip);
jehoon 0:df571f8f8c03 167 int open (Protocol proto, const char *ip, int remotePort, int localPort = 0, void(*func)(int) = NULL);
jehoon 0:df571f8f8c03 168 int listen (Protocol proto, int port, void(*func)(int)=NULL);
jehoon 0:df571f8f8c03 169 int close (int cid);
jehoon 0:df571f8f8c03 170 void initCon (int cid, bool connected);
jehoon 0:df571f8f8c03 171 int send (int cid, const char *buf, int len);
jehoon 0:df571f8f8c03 172 int sendto (int cid, const char *buf, int len, const char *ip, int port);
jehoon 0:df571f8f8c03 173 int recv (int cid, char *buf, int len);
jehoon 0:df571f8f8c03 174 int recvfrom (int cid, char *buf, int len, char *ip, int *port);
jehoon 0:df571f8f8c03 175 int readable (int cid);
jehoon 0:df571f8f8c03 176 bool isConnected (int cid);
jehoon 0:df571f8f8c03 177 int accept (int cid);
jehoon 0:df571f8f8c03 178 int getRemote (int cid, char **ip, int *port);
jehoon 0:df571f8f8c03 179
jehoon 0:df571f8f8c03 180
jehoon 0:df571f8f8c03 181 protected:
jehoon 0:df571f8f8c03 182 static WizFi310 * _inst;
jehoon 0:df571f8f8c03 183
jehoon 0:df571f8f8c03 184
jehoon 0:df571f8f8c03 185 // Serial _wizfi
jehoon 0:df571f8f8c03 186 RawSerial _wizfi;
jehoon 0:df571f8f8c03 187 int _baud;
jehoon 0:df571f8f8c03 188 DigitalIn *_cts;
jehoon 0:df571f8f8c03 189 DigitalOut *_rts;
jehoon 0:df571f8f8c03 190 int _flow;
jehoon 0:df571f8f8c03 191
jehoon 0:df571f8f8c03 192 DigitalInOut _reset;
jehoon 0:df571f8f8c03 193
jehoon 0:df571f8f8c03 194 struct STATE {
jehoon 0:df571f8f8c03 195 WiFiMode wm;
jehoon 0:df571f8f8c03 196
jehoon 0:df571f8f8c03 197 //daniel
jehoon 0:df571f8f8c03 198 //Security sec;
jehoon 0:df571f8f8c03 199 nsapi_security_t sec;
jehoon 0:df571f8f8c03 200 char ssid[35];
jehoon 0:df571f8f8c03 201 char pass[66];
jehoon 0:df571f8f8c03 202 char ip[16];
jehoon 0:df571f8f8c03 203 char netmask[16];
jehoon 0:df571f8f8c03 204 char gateway[16];
jehoon 0:df571f8f8c03 205 char nameserver[16];
jehoon 0:df571f8f8c03 206 char mac[18];
jehoon 0:df571f8f8c03 207 char resolv[16];
jehoon 0:df571f8f8c03 208 char name[32];
jehoon 0:df571f8f8c03 209 int rssi;
jehoon 0:df571f8f8c03 210 bool dhcp;
jehoon 0:df571f8f8c03 211 time_t time;
jehoon 0:df571f8f8c03 212
jehoon 0:df571f8f8c03 213 bool initialized;
jehoon 0:df571f8f8c03 214 bool associated;
jehoon 0:df571f8f8c03 215 volatile Mode mode;
jehoon 0:df571f8f8c03 216 volatile Status status;
jehoon 0:df571f8f8c03 217 bool escape;
jehoon 0:df571f8f8c03 218 volatile bool ok, failure;
jehoon 0:df571f8f8c03 219 volatile Response res;
jehoon 0:df571f8f8c03 220 int cid;
jehoon 0:df571f8f8c03 221 int n;
jehoon 0:df571f8f8c03 222 CircBuffer<char> *buf;
jehoon 0:df571f8f8c03 223 char dbgRespBuf[BUF_SIZE];
jehoon 0:df571f8f8c03 224 //char dummyBuf[BUF_SIZE];
jehoon 0:df571f8f8c03 225 } _state;
jehoon 0:df571f8f8c03 226
jehoon 0:df571f8f8c03 227
jehoon 0:df571f8f8c03 228 public:
jehoon 0:df571f8f8c03 229 struct CONNECTION {
jehoon 0:df571f8f8c03 230 Protocol protocol;
jehoon 0:df571f8f8c03 231 Type type;
jehoon 0:df571f8f8c03 232 bool connected;
jehoon 0:df571f8f8c03 233 char ip[16];
jehoon 0:df571f8f8c03 234 int port;
jehoon 0:df571f8f8c03 235 int send_length;
jehoon 0:df571f8f8c03 236 int recv_length;
jehoon 0:df571f8f8c03 237 CircBuffer<char> *buf;
jehoon 0:df571f8f8c03 238 volatile bool received;
jehoon 0:df571f8f8c03 239 volatile int parent;
jehoon 0:df571f8f8c03 240 volatile bool accept;
jehoon 0:df571f8f8c03 241 void(*func)(int);
jehoon 0:df571f8f8c03 242 } _con[8];
jehoon 0:df571f8f8c03 243
jehoon 0:df571f8f8c03 244 // --------- WizFi310.cpp ---------
jehoon 0:df571f8f8c03 245
jehoon 0:df571f8f8c03 246 int join(WiFiMode mode);
jehoon 0:df571f8f8c03 247 bool isAssociated();
jehoon 0:df571f8f8c03 248
jehoon 0:df571f8f8c03 249 //int limitedap ();
jehoon 0:df571f8f8c03 250 //int dissociate ();
jehoon 0:df571f8f8c03 251 /*
jehoon 0:df571f8f8c03 252 int disconnect () {
jehoon 0:df571f8f8c03 253 return dissociate();
jehoon 0:df571f8f8c03 254 }
jehoon 0:df571f8f8c03 255 */
jehoon 0:df571f8f8c03 256
jehoon 0:df571f8f8c03 257 Status getStatus ();
jehoon 0:df571f8f8c03 258
jehoon 0:df571f8f8c03 259 int setMacAddress (const char *mac);
jehoon 0:df571f8f8c03 260 int getMacAddress (char *mac);
jehoon 0:df571f8f8c03 261 int setAddress (const char *name = NULL);
jehoon 0:df571f8f8c03 262 int setAddress (const char *ip, const char *netmask, const char *gateway, const char *dns = NULL, const char *name = NULL);
jehoon 0:df571f8f8c03 263 int getAddress (char *ip, char *netmask, char *gateway);
jehoon 0:df571f8f8c03 264 int setSsid (const char *ssid);
jehoon 0:df571f8f8c03 265 //daniel
jehoon 0:df571f8f8c03 266 // int setSec (Security sec, const char *phrase);
jehoon 0:df571f8f8c03 267 int setSec (nsapi_security_t sec, const char *phrase);
jehoon 0:df571f8f8c03 268
jehoon 0:df571f8f8c03 269 const char* getIPAddress (void);
jehoon 0:df571f8f8c03 270 const char* getMACAddress (void);
cliff1 7:b7019399eb1e 271
cliff1 7:b7019399eb1e 272
cliff1 7:b7019399eb1e 273 int joinTP (const char *clientId, const char *credentialId, const char *serviceId, const char *devId, const char *containerNm);
cliff1 7:b7019399eb1e 274
jehoon 0:df571f8f8c03 275
jehoon 0:df571f8f8c03 276 // --------- WizFi250_msg.cpp ---------
jehoon 0:df571f8f8c03 277 void recvData ( char c );
jehoon 0:df571f8f8c03 278 int parseMessage ();
jehoon 0:df571f8f8c03 279 void msgOk (const char *buf);
jehoon 0:df571f8f8c03 280 void msgError (const char *buf);
jehoon 0:df571f8f8c03 281 void msgConnect (const char *buf);
jehoon 0:df571f8f8c03 282 void msgDisconnect (const char *buf);
jehoon 0:df571f8f8c03 283 void msgListen (const char *buf);
jehoon 1:16e57103a7dd 284 //daniel
jehoon 1:16e57103a7dd 285 void msgMQTTConnect (const char *buf);
jehoon 1:16e57103a7dd 286 void msgMQTTDisconnect (const char *buf);
jehoon 0:df571f8f8c03 287
jehoon 0:df571f8f8c03 288 void resMacAddress (const char *buf);
jehoon 0:df571f8f8c03 289 void resWJOIN (const char *buf);
jehoon 0:df571f8f8c03 290 void resConnect (const char *buf);
jehoon 0:df571f8f8c03 291 void resSSEND (const char *buf);
jehoon 0:df571f8f8c03 292 void resFDNS (const char *buf);
jehoon 0:df571f8f8c03 293 void resSMGMT (const char *buf);
jehoon 0:df571f8f8c03 294 void resWSTATUS (const char *buf);
jehoon 0:df571f8f8c03 295
cliff1 7:b7019399eb1e 296 void resSKTPCON (const char *buf);
jehoon 0:df571f8f8c03 297
jehoon 0:df571f8f8c03 298 // --------- WizFi250_hal.cpp ---------
jehoon 0:df571f8f8c03 299 void setReset (bool flg);
jehoon 0:df571f8f8c03 300 void isrUart ();
jehoon 0:df571f8f8c03 301 int getUart ();
jehoon 0:df571f8f8c03 302 void putUart (char c);
jehoon 0:df571f8f8c03 303 void setRts (bool flg);
jehoon 0:df571f8f8c03 304 int lockUart (int ms);
jehoon 0:df571f8f8c03 305 void unlockUart ();
jehoon 0:df571f8f8c03 306 void initUart (PinName cts, PinName rts, PinName alarm, int baud);
jehoon 0:df571f8f8c03 307
jehoon 0:df571f8f8c03 308
jehoon 0:df571f8f8c03 309 // --------- WizFi2550_util.cpp ---------
jehoon 0:df571f8f8c03 310 int x2i (char c);
jehoon 0:df571f8f8c03 311 int i2x (int i);
jehoon 0:df571f8f8c03 312
jehoon 0:df571f8f8c03 313 // --------- WizFi250_ifc.cpp (For NetworkSocketAPI) ---------
jehoon 0:df571f8f8c03 314 /**
jehoon 0:df571f8f8c03 315 * Startup the WizFi310
jehoon 0:df571f8f8c03 316 *
jehoon 0:df571f8f8c03 317 * @return true only if WizFi310 was setup correctly
jehoon 0:df571f8f8c03 318 */
jehoon 0:df571f8f8c03 319 bool startup(void);
jehoon 0:df571f8f8c03 320
jehoon 0:df571f8f8c03 321 /**
jehoon 0:df571f8f8c03 322 * Reset WizFi310
jehoon 0:df571f8f8c03 323 *
jehoon 0:df571f8f8c03 324 * @return true only if WizFi310 resets successfully
jehoon 0:df571f8f8c03 325 */
jehoon 0:df571f8f8c03 326 bool reset(void);
jehoon 0:df571f8f8c03 327
jehoon 0:df571f8f8c03 328 /**
jehoon 0:df571f8f8c03 329 * Disconnect WizFi310 from AP
jehoon 0:df571f8f8c03 330 *
jehoon 0:df571f8f8c03 331 * @return true only if WizFi310 is disconnected successfully
jehoon 0:df571f8f8c03 332 */
jehoon 0:df571f8f8c03 333 bool disconnect(void);
jehoon 0:df571f8f8c03 334
jehoon 0:df571f8f8c03 335 /**
jehoon 0:df571f8f8c03 336 * Check if WizFi310 is conenected
jehoon 0:df571f8f8c03 337 *
jehoon 0:df571f8f8c03 338 * @return true only if the chip has an IP address
jehoon 0:df571f8f8c03 339 */
jehoon 0:df571f8f8c03 340 bool isConnected(void);
jehoon 1:16e57103a7dd 341
jehoon 1:16e57103a7dd 342
jehoon 1:16e57103a7dd 343 //daniel for mqtt
jehoon 1:16e57103a7dd 344 char rcvd_mqtt_topic[128];
jehoon 0:df571f8f8c03 345
jehoon 0:df571f8f8c03 346 };
jehoon 0:df571f8f8c03 347
jehoon 0:df571f8f8c03 348 #endif /* WIZFI250_H_ */