FRDM-K64F, Avnet M14A2A, Grove Shield, to create smart home system. In use with AT&Ts M2x & Flow.
Dependencies: mbed FXOS8700CQ MODSERIAL
Diff: wnc_control.cpp
- Revision:
- 22:41e6c417ace1
- Parent:
- 19:f89baed3bd6f
- Child:
- 30:33be8e2992f3
diff -r d0038d14ee7c -r 41e6c417ace1 wnc_control.cpp --- a/wnc_control.cpp Wed Jul 13 18:34:56 2016 +0000 +++ b/wnc_control.cpp Wed Jul 13 19:39:56 2016 +0000 @@ -325,11 +325,17 @@ if (n <= 1500) { char num2str[6]; + itoa(n, num2str, 10); cmd_str += num2str; retries += 1; while (retries--) { + // Assuming someone is sending then calling this to receive response, invoke + // a pause to give the response some time to come back and then also + // between each retry. + wait_ms(10); + send_wnc_cmd(cmd_str.data(), &pRespStr, WNC_TIMEOUT_MS); size_t pos_start = pRespStr->find("\"") + 1; size_t pos_end = pRespStr->rfind("\"") - 1;