From 1e5e0524992c05aa03cad73e85fd0ee505de325c Mon Sep 17 00:00:00 2001 From: Maria Jorba Brosa Date: Tue, 18 Mar 2014 11:44:08 +0000 Subject: [PATCH] --- Project/applications/smartcities/main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Project/applications/smartcities/main.c b/Project/applications/smartcities/main.c index b8f823e..c6da950 100644 --- a/Project/applications/smartcities/main.c +++ b/Project/applications/smartcities/main.c @@ -7,9 +7,10 @@ #define WIFI_MODE WIFI_MODE_CLIENT -#define NETWORK_SSID "eConais" -#define NETWORK_KEY "!oTp0wer" - +#define NETWORK_SSID "linksys" +#define NETWORK_KEY "" +#define SERVER_IP "192.168.1.11" +#define SERVER_PORT (55000) void initLibwismart() { @@ -19,12 +20,18 @@ void initLibwismart() int main(void) { + wpa_param *wpa; + wpa->eap_method = WISMART_EAP_METHOD_PEAP; + wpa->peap.identity="smarcities"; + wpa->peap.password="superpass"; + + initLibwismart(); libwismart_PowerSave_Enable(); libwismart_PowerSave_HigherProfile(TRUE); libwismart_WiFiInit(); //falta definir les variables de la xarxa - libwismart_WiFiConnect(NETWORK_SSID, NETWORK_KEY , clientMode_wifiConnectedCb); + libwismart_WiFiConnectEnterprise(NETWORK_SSID, &wpa, wificonnect_callback wificb); if(libwismart_IsConnected() == WISMART_NOT_CONNECTED) { @@ -39,6 +46,7 @@ int main(void) printf("WiFi connected, IP connection completed\n"); } + printWifiInfo(WIFI_MODE_CLIENT); tcpClient_init(); -- libgit2 0.22.2