Example program for MTS Universal Socked Modem Shield and WiFi Shield. Test that you can connect to Axeda with your account.

Dependencies:   AxedaWrapper SocketModem mbed

Fork of axeda_wrapper_dev by Mike Fiore

Revision:
5:e1ac66f8cd26
Parent:
4:bb9bfd6be913
Parent:
3:7ba95d6503e4
diff -r bb9bfd6be913 -r e1ac66f8cd26 main.cpp
--- a/main.cpp	Sun Jan 05 05:56:03 2014 +0000
+++ b/main.cpp	Sun Jan 05 05:57:42 2014 +0000
@@ -4,10 +4,15 @@
 
 // set to 1 for cellular shield board
 // set to 0 for wifi shield board
-#define CELL_SHIELD 0
+#define CELL_SHIELD 1
 
+// wifi ssid and phrase for event
 std::string ssid = "belkin54g";
+std::string phrase = "hackathon";
 
+// https://connect.axeda.com/apps/connectiontest/index.html#login
+std::string serial_num = "ATT_Summit_Hackathon";    // add your serial number here but test with this
+    
 using namespace mts;
 
 int main() {
@@ -71,7 +76,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, Wifi::WPA, 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");
@@ -79,7 +84,6 @@
     printf("Is Connected: %s\n\r", wifi->isConnected() ? "True" : "False");
 #endif
     
-    std::string serial_num = "MWF-0001";
     AxedaWrapper* client = new AxedaWrapper(serial_num);
     bool retval;
     while (true) {