A library for talking to Multi-Tech's Cellular SocketModem Devices.

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

Files at this revision

API Documentation at this revision

Comitter:
mfiore
Date:
Tue Dec 31 15:11:04 2013 +0000
Parent:
104:93f448577daf
Child:
106:358972176b89
Commit message:
fixed ping test

Changed in this revision

tests/blinky_ping_test.h Show annotated file Show diff for this revision Revisions of this file
--- a/tests/blinky_ping_test.h	Mon Dec 30 23:57:23 2013 +0000
+++ b/tests/blinky_ping_test.h	Tue Dec 31 15:11:04 2013 +0000
@@ -1,6 +1,8 @@
 #include "mbed.h"
 #include "include_me.h"
 
+using namespace mts;
+
 #define MAX_TRIES 5
 #define MAX_REGISTRATION_TRIES 10
 
@@ -30,7 +32,8 @@
     
     MTSSerialFlowControl* serial = new MTSSerialFlowControl(PTD3, PTD2, PTA12, PTC8);
     serial->baud(115200);
-    Cellular* cell = Cellular::getInstance(serial);
+    Cellular* cell = Cellular::getInstance();
+    cell->init(serial);
     
     printf("waiting for radio to come up\n\r");
     wait(30);
@@ -52,7 +55,7 @@
     i = 0;
     printf("setting APN to %s\n\r", apn.c_str());
     while (i++ < MAX_TRIES) {
-        if (cell->setApn(apn) == Cellular::CELL_OK) {
+        if (cell->setApn(apn) == SUCCESS) {
             printf("successfully set APN\n\r");
             break;
         } else if (i >= MAX_TRIES) {