From 8a516852a10cc98a84b5d956cc55815f60ca238b Mon Sep 17 00:00:00 2001 From: Maria Jorba Brosa Date: Mon, 17 Mar 2014 18:12:11 +0000 Subject: [PATCH] --- Project/applications/smartcities/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) diff --git a/Project/applications/smartcities/main.c b/Project/applications/smartcities/main.c index 07603d5..94809f6 100644 --- a/Project/applications/smartcities/main.c +++ b/Project/applications/smartcities/main.c @@ -23,8 +23,23 @@ int main(void) libwismart_PowerSave_Enable(); libwismart_PowerSave_HigherProfile(TRUE); libwismart_WiFiInit(); + //falta definir les variables de la xarxa libwismart_WiFiConnect(NETWORK_SSID, NETWORK_KEY , clientMode_wifiConnectedCb); + if(libwismart_IsConnected() == WISMART_NOT_CONNECTED) + { + printf("WiFi is not connected yet\n"); + } + else if(libwismart_IsConnected() == WISMART_NOT_CONNECTED) + { + printf("WiFi connected, no IP connectivity yet\n"); + } + else if(libwismart_IsConnected() == WISMART_CONNECT) + { + printf("WiFi connected, IP connection completed\n"); + } + + tcpClient_init(); printf("Hello, World!\n"); -- libgit2 0.22.2