Sample project to connect to AT&T M2X from the STM32 Nucleo + MTS WiFi shield

Dependencies:   M2XStreamClient SocketModem jsonlite mbed

Fork of STM32_MTS_Wifi_Connect_M2X by AT&T Developer Summit Hackathon 2016

Revision:
8:fa93a2d07116
Parent:
6:7c2bdcf9d302
Child:
11:a9117a40bde7
--- a/main.cpp	Sat Jan 04 21:12:06 2014 +0000
+++ b/main.cpp	Sat Jan 04 21:37:02 2014 +0000
@@ -33,7 +33,11 @@
     //Setup and check connection
     printf("Set Network: %s\n\r", getCodeNames(wifi->setNetwork(ssid, securityType, securityKey)).c_str());
     printf("Set DHCP: %s\n\r", getCodeNames(wifi->setDeviceIP("DHCP")).c_str());
-    printf("Connect: %s\n\r", wifi->connect() ? "Success" : "Failure");
+    while (! wifi->connect()) {
+        printf("Connect: Failure\r\n");
+        wait(1);
+    }
+    printf("Connect: Success\r\n");
     printf("Is Connected: %s\n\r", wifi->isConnected() ? "True" : "False");
     
     //Ping