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:
3:7ba95d6503e4
Parent:
2:8c58dd4197c6
Child:
5:e1ac66f8cd26
--- a/main.cpp	Sat Jan 04 07:58:48 2014 +0000
+++ b/main.cpp	Sat Jan 04 21:09: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() {
@@ -76,7 +81,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");
@@ -84,7 +89,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) {