Checking CEREG for ublox LTE-M
This commit is contained in:
		@@ -444,7 +444,14 @@ public:
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  RegStatus getRegistrationStatus() {
 | 
					  RegStatus getRegistrationStatus() {
 | 
				
			||||||
    sendAT(GF("+CGREG?"));
 | 
					
 | 
				
			||||||
 | 
					    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) {
 | 
					      if (waitResponse(GF(GSM_NL "+CGREG:")) != 1) {
 | 
				
			||||||
        return REG_UNKNOWN;
 | 
					        return REG_UNKNOWN;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user