Browse Source

Checking CEREG for ublox LTE-M

v_master
Sara Damiano 6 years ago
parent
commit
57e2b78f4b
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      src/TinyGsmClientUBLOX.h

+ 10
- 3
src/TinyGsmClientUBLOX.h View File

@ -444,9 +444,16 @@ public:
}
RegStatus getRegistrationStatus() {
sendAT(GF("+CGREG?"));
if (waitResponse(GF(GSM_NL "+CGREG:")) != 1) {
return REG_UNKNOWN;
if (isCatM) { // Check EPS registration for LTE modules
sendAT(GF("+CEREG?"));
if (waitResponse(GF(GSM_NL "+CEREG:")) != 1) {
return REG_UNKNOWN;
}
else {
sendAT(GF("+CGREG?")); // Check GPRS registration for others
if (waitResponse(GF(GSM_NL "+CGREG:")) != 1) {
return REG_UNKNOWN;
}
streamSkipUntil(','); // Skip format (0)
int status = stream.readStringUntil('\n').toInt();


Loading…
Cancel
Save