Commit 8a516852a10cc98a84b5d956cc55815f60ca238b

Authored by Maria Jorba Brosa
1 parent 4686809b

--no commit message

Project/applications/smartcities/main.c
@@ -23,8 +23,23 @@ int main(void) @@ -23,8 +23,23 @@ int main(void)
23 libwismart_PowerSave_Enable(); 23 libwismart_PowerSave_Enable();
24 libwismart_PowerSave_HigherProfile(TRUE); 24 libwismart_PowerSave_HigherProfile(TRUE);
25 libwismart_WiFiInit(); 25 libwismart_WiFiInit();
  26 + //falta definir les variables de la xarxa
26 libwismart_WiFiConnect(NETWORK_SSID, NETWORK_KEY , clientMode_wifiConnectedCb); 27 libwismart_WiFiConnect(NETWORK_SSID, NETWORK_KEY , clientMode_wifiConnectedCb);
27 28
  29 + if(libwismart_IsConnected() == WISMART_NOT_CONNECTED)
  30 + {
  31 + printf("WiFi is not connected yet\n");
  32 + }
  33 + else if(libwismart_IsConnected() == WISMART_NOT_CONNECTED)
  34 + {
  35 + printf("WiFi connected, no IP connectivity yet\n");
  36 + }
  37 + else if(libwismart_IsConnected() == WISMART_CONNECT)
  38 + {
  39 + printf("WiFi connected, IP connection completed\n");
  40 + }
  41 +
  42 +
28 tcpClient_init(); 43 tcpClient_init();
29 44
30 printf("Hello, World!\n"); 45 printf("Hello, World!\n");