ARM mbed M2X API Client: The ARM mbed client library is used to send/receive data to/from AT&T's M2X service from mbed LPC1768 microcontrollers.

Dependents:   m2x-demo-all M2X_MTS_ACCEL_DEMO M2X_MTS_Accel M2X_K64F_ACCEL ... more

Files at this revision

API Documentation at this revision

Comitter:
citrusbyte
Date:
Mon Apr 27 15:40:13 2015 +0000
Parent:
14:205076b587fe
Child:
16:7903152de19f
Commit message:
Fix content length bug

Changed in this revision

M2XStreamClient.h Show annotated file Show diff for this revision Revisions of this file
M2XStreamClient_template.h Show annotated file Show diff for this revision Revisions of this file
--- a/M2XStreamClient.h	Sun Jan 04 05:26:33 2015 +0000
+++ b/M2XStreamClient.h	Mon Apr 27 15:40:13 2015 +0000
@@ -8,7 +8,7 @@
 #ifdef ARDUINO_PLATFORM
 #include "Arduino.h"
 
-#define USER_AGENT "User-Agent: M2X Arduino Client/2.0.0"
+#define USER_AGENT "User-Agent: M2X Arduino Client/2.0.2"
 #endif
 
 #ifdef MBED_PLATFORM
--- a/M2XStreamClient_template.h	Sun Jan 04 05:26:33 2015 +0000
+++ b/M2XStreamClient_template.h	Mon Apr 27 15:40:13 2015 +0000
@@ -10,11 +10,11 @@
   if (_client->connect(_host, _port)) {
     DBGLN("%s", "Connected to M2X server!");
     writePutHeader(deviceId, streamName,
-                   //  for {"value": and }
-                   _null_print.print(value) + 10);
-    _client->print("{\"value\":");
+                   //  for {"value":" and "}
+                   _null_print.print(value) + 12);
+    _client->print("{\"value\":\"");
     _client->print(value);
-    _client->print("}");
+    _client->print("\"}");
   } else {
     DBGLN("%s", "ERROR: Cannot connect to M2X server!");
     return E_NOCONNECTION;