ublox-at-cellular-interface

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
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
diff -r ca29480080ac -r 9d48ec522cb4 UbloxATCellularInterface.cpp
--- 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;
         }