Commit 1e5e0524992c05aa03cad73e85fd0ee505de325c

Authored by Maria Jorba Brosa
1 parent 21a95438

--no commit message

Project/applications/smartcities/main.c
@@ -7,9 +7,10 @@ @@ -7,9 +7,10 @@
7 7
8 #define WIFI_MODE WIFI_MODE_CLIENT 8 #define WIFI_MODE WIFI_MODE_CLIENT
9 9
10 -#define NETWORK_SSID "eConais"  
11 -#define NETWORK_KEY "!oTp0wer"  
12 - 10 +#define NETWORK_SSID "linksys"
  11 +#define NETWORK_KEY ""
  12 +#define SERVER_IP "192.168.1.11"
  13 +#define SERVER_PORT (55000)
13 14
14 void initLibwismart() 15 void initLibwismart()
15 { 16 {
@@ -19,12 +20,18 @@ void initLibwismart() @@ -19,12 +20,18 @@ void initLibwismart()
19 20
20 int main(void) 21 int main(void)
21 { 22 {
  23 + wpa_param *wpa;
  24 + wpa->eap_method = WISMART_EAP_METHOD_PEAP;
  25 + wpa->peap.identity="smarcities";
  26 + wpa->peap.password="superpass";
  27 +
  28 +
22 initLibwismart(); 29 initLibwismart();
23 libwismart_PowerSave_Enable(); 30 libwismart_PowerSave_Enable();
24 libwismart_PowerSave_HigherProfile(TRUE); 31 libwismart_PowerSave_HigherProfile(TRUE);
25 libwismart_WiFiInit(); 32 libwismart_WiFiInit();
26 //falta definir les variables de la xarxa 33 //falta definir les variables de la xarxa
27 - libwismart_WiFiConnect(NETWORK_SSID, NETWORK_KEY , clientMode_wifiConnectedCb); 34 + libwismart_WiFiConnectEnterprise(NETWORK_SSID, &wpa, wificonnect_callback wificb);
28 35
29 if(libwismart_IsConnected() == WISMART_NOT_CONNECTED) 36 if(libwismart_IsConnected() == WISMART_NOT_CONNECTED)
30 { 37 {
@@ -39,6 +46,7 @@ int main(void) @@ -39,6 +46,7 @@ int main(void)
39 printf("WiFi connected, IP connection completed\n"); 46 printf("WiFi connected, IP connection completed\n");
40 } 47 }
41 48
  49 + printWifiInfo(WIFI_MODE_CLIENT);
42 50
43 tcpClient_init(); 51 tcpClient_init();
44 52