Currently we have no information about the cause when GPRS attaching fails. From the AT command description:
AT+CREG AT command gives information about the registration status and access technology of the serving cell.
Possible values of registration status are,
0 not registered, MT is not currently searching a new operator to register to
1 registered, home network
2 not registered, but MT is currently searching a new operator to register to
3 registration denied
4 unknown (e.g. out of GERAN/UTRAN/E-UTRAN coverage)
5 registered, roaming
6 registered for "SMS only", home network (applicable only when indicates E-UTRAN)
7 registered for "SMS only", roaming (applicable only when indicates E-UTRAN)
8 attached for emergency bearer services only (see NOTE 2) (not applicable)
9 registered for "CSFB not preferred", home network (applicable only when indicates E-UTRAN)
10 registered for "CSFB not preferred", roaming (applicable only when indicates E-UTRAN)
For return code '2' no immediate action is required, registration may succeed later on. But when return value is different, the user should be able to determine the next action according to the failure cause. If return code is '3', there is probably permanent error so it is useless to try again. If return code is '0', maybe there is bad reception and user can restart the GSM module?
Currently we have no information about the cause when GPRS attaching fails. From the AT command description:
For return code '2' no immediate action is required, registration may succeed later on. But when return value is different, the user should be able to determine the next action according to the failure cause. If return code is '3', there is probably permanent error so it is useless to try again. If return code is '0', maybe there is bad reception and user can restart the GSM module?