mirror of
				https://github.com/KevinMidboe/TinyGSM.git
				synced 2025-10-29 18:00:18 +00:00 
			
		
		
		
	Use CREG to check registration status.
Do not check if GPRS is connected as it will fail due to APN not being set.
This commit is contained in:
		| @@ -329,7 +329,7 @@ TINY_GSM_MODEM_GET_SIMCCID_CCID() | |||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
| TINY_GSM_MODEM_GET_REGISTRATION_XREG(CEREG) | TINY_GSM_MODEM_GET_REGISTRATION_XREG(CREG) | ||||||
|  |  | ||||||
| TINY_GSM_MODEM_GET_OPERATOR_COPS() | TINY_GSM_MODEM_GET_OPERATOR_COPS() | ||||||
|  |  | ||||||
| @@ -343,8 +343,8 @@ TINY_GSM_MODEM_GET_CSQ() | |||||||
|     RegStatus s = getRegistrationStatus(); |     RegStatus s = getRegistrationStatus(); | ||||||
|     if (s == REG_OK_HOME || s == REG_OK_ROAMING) |     if (s == REG_OK_HOME || s == REG_OK_ROAMING) | ||||||
|       return true; |       return true; | ||||||
|     else if (s == REG_UNKNOWN)  // for some reason, it can hang at unknown.. |     // else if (s == REG_UNKNOWN)  // for some reason, it can hang at unknown.. | ||||||
|       return isGprsConnected(); |     //   return isGprsConnected(); | ||||||
|     else return false; |     else return false; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user