Support for LISA-N101
Fork of C027_Support by
This is a variant of the C027 driver code for the C027N version, i.e. the one with the Neul/Huawei/u-blox Cellular Internet of Things module on board. The AT command interface for this module is entirely different to the AT interface for the other u-blox modules, hence this fork of the driver. Work is underway to rearchitect the original C027 driver so that a merge can be done.
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())