![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
FRDM-K64F, Avnet M14A2A, Grove Shield, to create smart home system. In use with AT&Ts M2x & Flow.
Dependencies: mbed FXOS8700CQ MODSERIAL
Diff: main.cpp
- Revision:
- 46:da9d788f5d5a
- Parent:
- 43:6821a9c78c4b
- Child:
- 47:c07656706ca1
--- a/main.cpp Sun Jul 24 17:50:42 2016 +0000 +++ b/main.cpp Sun Jul 24 19:33:23 2016 +0000 @@ -507,6 +507,7 @@ printf(BLU "Sending to modem : %s" DEF "\n", modem_string); sockwrite_mdm(modem_string); sockread_mdm(&MySocketData, 1024, 20); + printf("DONE with READ!\r\n"); // If any non-zero response from server, make it GREEN one-time // then the actual FLOW responses will set the color. @@ -516,9 +517,11 @@ SetLedColor(0x2); } - printf(BLU "Read back : %s" DEF "\n", &MySocketData[0]); + printf(BLU "Read back : %s" DEF "\n", MySocketData.c_str()); char myJsonResponse[512]; - if (extract_JSON(&MySocketData[0], &myJsonResponse[0])) + char stringToCharBuf[1501]; // 1500 is the max length WNC can return + strcpy(stringToCharBuf, MySocketData.c_str()); + if (extract_JSON(stringToCharBuf, &myJsonResponse[0])) { printf(GRN "JSON : %s" DEF "\n", &myJsonResponse[0]); parse_JSON(&myJsonResponse[0]);