I added functionality to get the RSSI, BER, and Cell Neighbor for reporting connection issues to M2X

Dependencies:   WncControllerK64F

Revision:
11:75cf1e1c921c
Parent:
9:9f0578ff157a
Child:
18:198e9b0acf11
--- a/Socket/TCPSocketConnection.cpp	Fri Oct 07 13:54:09 2016 +0000
+++ b/Socket/TCPSocketConnection.cpp	Mon Oct 31 13:54:21 2016 +0000
@@ -23,6 +23,8 @@
 #include "TCPSocketConnection.h"
 #include <cstring>
 
+#define READ_EVERYMS   500     //number of milliseconds between WNC socket reads
+
 TCPSocketConnection::TCPSocketConnection() :
         _is_blocking(0),
         _btimeout(0){
@@ -80,10 +82,11 @@
     if( s != WncController_fk::WncController::WNC_ON )
         return ret;
 
+    M_LOCK;
     t.start();
-    M_LOCK;
     do {
-        cnt = WNCInterface::_pwnc->read(0, (uint8_t *)readBuf, (uint32_t) length);
+        if( !(t.read_ms() % READ_EVERYMS) )
+          cnt = WNCInterface::_pwnc->read(0, (uint8_t *)readBuf, (uint32_t) length);
         if( _is_blocking )
             done = cnt;
         else
@@ -94,7 +97,7 @@
     M_ULOCK;
     
     if( WNCInterface::_pwnc->getWncStatus() == WNC_GOOD ) {
-        readBuf[cnt] = '\0';
+        //readBuf[cnt] = '\0';
         ret = (int)cnt;
         }
     else