Modified example with AT command traces for AT%MEAS, AT%PCONI and AT%CGEQOS. Loading times calculated for each cloud transfer
Dependencies: FXOS8700CQ MODSERIAL mbed
Fork of Avnet_ATT_Cellular_IOT by
Diff: wnc_control.cpp
- Revision:
- 82:340a51ed8760
- Parent:
- 80:d635c0eddd6e
diff -r f236ef0ee0c5 -r 340a51ed8760 wnc_control.cpp --- a/wnc_control.cpp Thu Nov 17 18:21:52 2016 +0000 +++ b/wnc_control.cpp Thu Dec 14 00:23:22 2017 +0000 @@ -26,8 +26,8 @@ #define WNC_CMD_DEBUG_ON // Full debug output, longer cmds and extra cellular status checking -#undef WNC_CMD_DEBUG_ON_VERBOSE - +#define WNC_CMD_DEBUG_ON_VERBOSE +Timer t1; extern string MyServerIpAddress; extern string MySocketData; @@ -271,6 +271,7 @@ int check_wnc_ready(void) { + t1.start(); string * pRespStr; size_t pos; int regSts; @@ -301,6 +302,7 @@ // SIM card OK, now check for signal and cellular network registration cmdRes1 = at_send_wnc_cmd("AT+CREG?", &pRespStr, WNC_TIMEOUT_MS); // Check if registered on network + if (pRespStr->size() > 0) { pos = pRespStr->find("CREG: "); @@ -330,7 +332,15 @@ #endif return (-2); } - + int cmdRes4 = at_send_wnc_cmd("AT%MEAS=\"8\"", &pRespStr, WNC_TIMEOUT_MS); + float m=t1.read(); + PRINTF("\n time for Meas: %f \n",m); + int cmdRes3 = at_send_wnc_cmd("AT+CGEQOS?", &pRespStr, WNC_TIMEOUT_MS); + float n=t1.read(); + PRINTF("\n time for CGEQOS: %f \n",n); + int cmdRes5 = at_send_wnc_cmd("AT%PCONI", &pRespStr, WNC_TIMEOUT_MS); + float o=t1.read(); + PRINTF("\n time for PCONI: %f \n",o); return (0); }