Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 71:041de9a6d93c, committed 2014-05-15
- Comitter:
- mazgch
- Date:
- Thu May 15 06:16:10 2014 +0000
- Parent:
- 70:0a87d256cd24
- Child:
- 72:d1e943ad6558
- Commit message:
- move at command
Changed in this revision
| MDM.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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())