![](/media/cache/profiles/aa7fd480bd75d86948e7f7aac11d2704.jpg.50x50_q85.jpg)
support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.
Fork of C027_Support by
Diff: MDM.cpp
- Revision:
- 71:041de9a6d93c
- Parent:
- 70:0a87d256cd24
- Child:
- 72:d1e943ad6558
--- a/MDM.cpp Wed May 14 09:12:47 2014 +0000 +++ b/MDM.cpp Thu May 15 06:16:10 2014 +0000 @@ -394,6 +394,10 @@ sendFormated("AT+CIMI\r\n"); if (RESP_OK != waitFinalResp(_cbString, _dev.imsi)) return false; + // enable the network registration unsolicited result code + sendFormated("AT+CREG=%d\r\n", (_dev.dev == DEV_LISA_C200) ? 1 : 2); + if (RESP_OK != waitFinalResp()) + return false; if (status) memcpy(status, &_dev, sizeof(DevStatus)); return true; @@ -438,10 +442,6 @@ bool MDMParser::checkNetStatus(NetStatus* status /*= NULL*/) { - // enable the network registration unsolicited result code - sendFormated("AT+CREG=%d\r\n", (_dev.dev == DEV_LISA_C200) ? 1 : 2); - if (RESP_OK != waitFinalResp()) - return false; // check registration sendFormated("AT+CREG?\r\n"); if (RESP_OK != waitFinalResp())