![](/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: wnc_control.cpp
- Revision:
- 40:aec4d09fde23
- Parent:
- 39:1996eaec02d6
- Child:
- 42:be4b9ee3a615
--- a/wnc_control.cpp Sat Jul 23 14:58:03 2016 +0000 +++ b/wnc_control.cpp Sat Jul 23 20:13:01 2016 +0000 @@ -31,8 +31,8 @@ { WNC_MDM_ERR = WNC_OK; at_init_wnc(); - //if (WNC_MDM_ERR == WNC_NO_RESPONSE) - // reinitialize_mdm(); + if (WNC_MDM_ERR == WNC_NO_RESPONSE) + reinitialize_mdm(); } while (WNC_MDM_ERR != WNC_OK); } @@ -44,7 +44,7 @@ at_dnsresolve_wnc(MY_SERVER_URL, &MyServerIpAddress); if (WNC_MDM_ERR == WNC_NO_RESPONSE) { - // reinitialize_mdm(); + reinitialize_mdm(); software_init_mdm(); } else if (WNC_MDM_ERR == WNC_CMD_ERR) @@ -68,7 +68,7 @@ at_sockopen_wnc(MyServerIpAddress, MY_PORT_STR); if (WNC_MDM_ERR == WNC_NO_RESPONSE) { - // reinitialize_mdm(); + reinitialize_mdm(); software_init_mdm(); } else if (WNC_MDM_ERR == WNC_CMD_ERR) @@ -88,14 +88,14 @@ at_sockwrite_wnc(s); if (WNC_MDM_ERR == WNC_NO_RESPONSE) { - // reinitialize_mdm(); + reinitialize_mdm(); software_init_mdm(); } else if (WNC_MDM_ERR == WNC_CMD_ERR) { pc.puts("Socket Write fail!!!\r\n"); // Have seen when write fails modem gets stuck in bad state, try to recover - // reinitialize_mdm(); + reinitialize_mdm(); software_init_mdm(); } } while (WNC_MDM_ERR != WNC_OK); @@ -121,7 +121,7 @@ { if (n == 0) { - // reinitialize_mdm(); + reinitialize_mdm(); software_init_mdm(); } else @@ -149,7 +149,7 @@ socketOpen = 0; if (WNC_MDM_ERR == WNC_NO_RESPONSE) { - // reinitialize_mdm(); + reinitialize_mdm(); software_init_mdm(); } else if (WNC_MDM_ERR == WNC_CMD_ERR)