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");