Error with receive value from M2X, sharing it for debug purpose

Dependencies:   SocketModem jsonlite mbed

Fork of MTS_M2x_Example by Multi-Hackers

Revision:
5:d4a4e2577be3
Parent:
2:76e0d5968991
Child:
6:0dbcf434679b
diff -r 76e0d5968991 -r d4a4e2577be3 main.cpp
--- a/main.cpp	Sat Jan 04 06:37:50 2014 +0000
+++ b/main.cpp	Sun Jan 05 07:00:38 2014 +0000
@@ -4,8 +4,8 @@
 
 using namespace mts;
 
-const char key[] = "b26a78445f81fcc56e42ffa42350fb09";
-const char feed[] = "9ed5d71fe2b0b2ea6ddd7d8d65206250";
+const char key[] = "";
+const char feed[] = "";
 const char stream[] = "amb-temp";
 
 // set to 1 for cellular shield board
@@ -13,14 +13,11 @@
 #define CELL_SHIELD 0
 
 std::string ssid = "belkin54g";
+std::string phrase = "hackathon";
+Wifi::SecurityType security_type = Wifi::WPA;
 
 int main() {
 #if CELL_SHIELD
-    for (int i = 30; i >= 0; i = i - 2) {
-        wait(2);
-        printf("Waiting %d seconds...\n\r", i);
-    }
-    
     MTSSerialFlowControl* serial = new MTSSerialFlowControl(PTD3, PTD2, PTA12, PTC8);
     serial->baud(115200);
     Transport::setTransport(Transport::CELLULAR);
@@ -80,7 +77,7 @@
     Transport::setTransport(Transport::WIFI);
     Wifi* wifi = Wifi::getInstance();
     printf("Init: %s\n\r", wifi->init(serial) ? "SUCCESS" : "FAILURE");
-    printf("Set Network: %s\n\r", getCodeNames(wifi->setNetwork(ssid, Wifi::NONE, "")).c_str());
+    printf("Set Network: %s\n\r", getCodeNames(wifi->setNetwork(ssid, security_type, phrase)).c_str());
     printf("Set DHCP: %s\n\r", getCodeNames(wifi->setDeviceIP("DHCP")).c_str());
     printf("Signal Strnegth (dBm): %d\n\r", wifi->getSignalStrength());
     printf("Is Connected: %s\n\r", wifi->isConnected() ? "True" : "False");