![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
I added functionality to get the RSSI, BER, and Cell Neighbor for reporting connection issues to M2X
Dependencies: mbed FXOS8700CQ mbed-rtos WNCInterface M2XStreamClient-JMF jsonlite
Diff: main.cpp
- Revision:
- 12:0dfd0129f75d
- Parent:
- 9:3f5dfac96ac1
diff -r 62e995e72c3b -r 0dfd0129f75d main.cpp --- a/main.cpp Thu Oct 26 04:29:26 2017 +0000 +++ b/main.cpp Thu Apr 18 21:30:09 2019 +0000 @@ -357,6 +357,22 @@ pc.printf("Post postDeviceUpdate (accelerometer [%.2f,%.2f,%.2f])..." CRLF, SENSOR_DATA.AccelX, SENSOR_DATA.AccelY, SENSOR_DATA.AccelZ); response = m2xClient.postDeviceUpdate(deviceId, 3, accelStreamNames, (float []){SENSOR_DATA.AccelX, SENSOR_DATA.AccelY, SENSOR_DATA.AccelZ}); pc.printf("Post response code: %d" CRLF, response); + + // post the signal value + pc.printf("Post updateStreamValue (signal = %.2f)..." CRLF, SENSOR_DATA.Signal_Strength); + response = m2xClient.updateStreamValue(deviceId, sStreamName, SENSOR_DATA.Signal_Strength); + pc.printf("Post response code: %d" CRLF, response); + + // post the signal error value + pc.printf("Post updateStreamValue (error = %d)..." CRLF, SENSOR_DATA.Error); + response = m2xClient.updateStreamValue(deviceId, eStreamName, SENSOR_DATA.Error); + pc.printf("Post response code: %d" CRLF, response); + + // post the neighbor value + pc.printf("Post updateStreamValue (neighbor = %s)..." CRLF, SENSOR_DATA.Neighbor); + //response = m2xClient.updateStreamValues(deviceId, nStreamName, SENSOR_DATA.Neighbor); + pc.printf("Post response code: %d" CRLF, response); + #else // post all values at one pc.printf("Post all stream values [%.2f,%.2f,%.2f,%.2f,%.2f])..." CRLF, SENSOR_DATA.Humidity, SENSOR_DATA.Temperature, SENSOR_DATA.AccelX, SENSOR_DATA.AccelY, SENSOR_DATA.AccelZ);