The Hiking Pal tracking device firmware. See full description on the detail page: https://www.hackster.io/bowenfeng/hiking-pal-v1-07c02d

Dependencies:   FXOS8700CQ MODSERIAL mbed

Fork of Avnet_ATT_Cellular_IOT by Avnet

Files at this revision

API Documentation at this revision

Comitter:
fkellermavnet
Date:
Sun Jul 24 21:55:29 2016 +0000
Parent:
49:97f823273dc0
Child:
51:d9e5952545da
Commit message:
Made sockread char buffer larger to handle more data coming back from a server. For now, 10*1500 bytes.

Changed in this revision

config_me.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/config_me.h	Sun Jul 24 21:22:23 2016 +0000
+++ b/config_me.h	Sun Jul 24 21:55:29 2016 +0000
@@ -3,10 +3,13 @@
 
 // User must set these for own context:
 
+#define BUF_SIZE_FOR_N_MAX_SOCKREAD (10)
+#define MAX_WNC_SOCKREAD_PAYLOAD (1500)
+
 // This is the server's base URL name.  Example "www.google.com"
 // Note that when you Fork a FLOW, it will typically assign  either
 // "run-east.att.io" or "run-west.att.io", so be sure to check this.
-static const char * MY_SERVER_URL       = "run-west.att.io";
+static const char * MY_SERVER_URL       = "www.google.com"; // "run-west.att.io";
 
 // These are FLOW fields from the Endpoints tab:
 #define FLOW_BASE_URL                   "/1e464b19cdcde/774c88d68202/86694923d5bf28a/in/flow"
--- a/main.cpp	Sun Jul 24 21:22:23 2016 +0000
+++ b/main.cpp	Sun Jul 24 21:55:29 2016 +0000
@@ -517,7 +517,7 @@
                 }
                 printf(YEL "Read back : %s" DEF "\r\n", &MySocketData[0]);
                 char myJsonResponse[512];
-                char stringToCharBuf[1501]; // WNC can return max of 1500
+                char stringToCharBuf[BUF_SIZE_FOR_N_MAX_SOCKREAD*MAX_WNC_SOCKREAD_PAYLOAD+1]; // WNC can return max of 1500 (per sockread)
                 strcpy(stringToCharBuf, MySocketData.c_str());
                 if (extract_JSON(stringToCharBuf, &myJsonResponse[0]))
                 {