Remote I/O Sensor bus with AT&T flow and M2X cloud

Dependencies:   DHT11 FXOS8700CQ MODSERIAL mbed

Fork of Avnet_ATT_Cellular_IOT by Avnet

Files at this revision

API Documentation at this revision

Comitter:
fkellermavnet
Date:
Tue Aug 16 13:55:59 2016 +0000
Parent:
79:ff3014b3637e
Child:
81:f236ef0ee0c5
Commit message:
If WNC returns more than 1 IP address, fixed control software to pick just 1 of them instread of all of them. Found a pc.printf replaced with PRINTF.

Changed in this revision

wnc_control.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ff3014b3637e -r d635c0eddd6e wnc_control.cpp
--- a/wnc_control.cpp	Mon Aug 15 22:40:14 2016 +0000
+++ b/wnc_control.cpp	Tue Aug 16 13:55:59 2016 +0000
@@ -385,7 +385,7 @@
      
   if (cmdRes == -3) {
      WNC_MDM_ERR = WNC_EXTERR;
-     pc.printf("[[WNC_MDM_ERR = WNC_EXTERR]] \r\n");
+     PRINTF("[[WNC_MDM_ERR = WNC_EXTERR]] \r\n");
   }
 
  if (cmdRes == 0)
@@ -565,7 +565,7 @@
   if (send_wnc_cmd(str.c_str(), &pRespStr, 60000) == 0)
   {
     size_t pos_start = pRespStr->find(":\"") + 2;
-    size_t pos_end = pRespStr->rfind("\"") - 1;
+    size_t pos_end = pRespStr->find("\"", pos_start) - 1;
     if ((pos_start !=  string::npos) && (pos_end != string::npos))
     {
         if (pos_end > pos_start)