Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Revision:
74:ca3001991fdc
Parent:
41:804f6a0bda26
Child:
77:f6717e4eccc4
--- a/DeviceInfo.cpp	Tue Feb 17 16:31:30 2015 +0000
+++ b/DeviceInfo.cpp	Wed Feb 18 10:17:29 2015 +0000
@@ -1,6 +1,7 @@
-#include "DeviceInfo.h"
 #include <stdlib.h>
 #include <string.h>
+#include "DeviceInfo.h"
+#include "logging.h"
 
 DeviceInfo::DeviceInfo(MDMSerial& mdm, MDMParser::DevStatus& devStatus) :
     _mdm(mdm)
@@ -39,11 +40,16 @@
 DeviceInfo::SignalQuality * DeviceInfo::signalQuality()
 {
     memset(&_signalQuality, 0, sizeof(DeviceInfo::SignalQuality));
-    if (!refreshNetStatus())
+    if (!refreshNetStatus()) {
+        aError("Can not refresh network status!\r\n");
         return NULL;
+    }
     
-    if ((_netStatus.rssi == 0) || (_netStatus.ber == 0))
-        return NULL;
+//    if ((_netStatus.rssi == 0) || (_netStatus.ber == 0)) {
+//        aWarning("Network status is unavailable!\r\n");
+//        aDebug("RSSI: %d dBm, BER: %d%%\r\n", _netStatus.rssi, _netStatus.ber);
+//        return NULL;
+//    }
 
     _signalQuality.rssi = _netStatus.rssi;
     _signalQuality.ber = _netStatus.ber;