ublox-at-cellular-interface_psm

Dependents:  

Files at this revision

API Documentation at this revision

Comitter:
wajahat.abbas@u-blox.com
Date:
Mon Aug 19 17:36:04 2019 +0500
Parent:
35:ca29480080ac
Child:
37:0ceb2dfc746c
Commit message:
Fix to read OK as well

Changed in this revision

UbloxATCellularInterface.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/UbloxATCellularInterface.cpp	Thu Aug 08 17:32:28 2019 +0500
+++ b/UbloxATCellularInterface.cpp	Mon Aug 19 17:36:04 2019 +0500
@@ -441,7 +441,8 @@
 
     at_timeout = _at_timeout; // Has to be inside LOCK()s
     at_set_timeout(150000);
-    if (_at->send("AT+CGACT?") && _at->recv("+CGACT: %*d,%d\n", &active)) {
+    if (_at->send("AT+CGACT?") && _at->recv("+CGACT: %*d,%d\n", &active) &&
+            _at->recv("OK")) {
         if (active == 1) {
         	status = true;
         }