@@ -52,8 +52,8 @@ Result openGPRSContext(SIM800 *sim800, const char *apn)
5252
5353 sim800->sendATTest ();
5454
55- while ((sim800->sendCmdAndWaitForResp_P (REGISTRATION_STATUS, CONNECTED, 5000 ) != TRUE &&
56- sim800->sendCmdAndWaitForResp_P (REGISTRATION_STATUS, ROAMING, 5000 ) != TRUE ) &&
55+ while ((sim800->sendCmdAndWaitForResp_P (REGISTRATION_STATUS, CONNECTED, 10000 ) != TRUE &&
56+ sim800->sendCmdAndWaitForResp_P (REGISTRATION_STATUS, ROAMING, 10000 ) != TRUE ) &&
5757 attempts < MAX_ATTEMPTS)
5858 {
5959 sim800->sendCmdAndWaitForResp_P (READ_VOLTAGE, AT_OK, 2000 );
@@ -67,7 +67,7 @@ Result openGPRSContext(SIM800 *sim800, const char *apn)
6767 }
6868 }
6969
70- if (sim800->sendCmdAndWaitForResp_P (BEARER_PROFILE_GPRS, AT_OK, 10000 ) == FALSE )
70+ if (sim800->sendCmdAndWaitForResp_P (BEARER_PROFILE_GPRS, AT_OK, 12000 ) == FALSE )
7171 result = ERROR_BEARER_PROFILE_GPRS;
7272
7373 char httpApn[64 ];
@@ -77,10 +77,10 @@ Result openGPRSContext(SIM800 *sim800, const char *apn)
7777 if (sim800->sendCmdAndWaitForResp (httpApn, AT_OK_, 8000 ) == FALSE )
7878 result = ERROR_BEARER_PROFILE_APN;
7979
80- while (sim800->sendCmdAndWaitForResp_P (QUERY_BEARER, BEARER_OPEN, 6000 ) == FALSE && attempts < MAX_ATTEMPTS)
80+ while (sim800->sendCmdAndWaitForResp_P (QUERY_BEARER, BEARER_OPEN, 8000 ) == FALSE && attempts < MAX_ATTEMPTS)
8181 {
8282 attempts++;
83- if (sim800->sendCmdAndWaitForResp_P (OPEN_GPRS_CONTEXT, AT_OK, 6000 ) == FALSE )
83+ if (sim800->sendCmdAndWaitForResp_P (OPEN_GPRS_CONTEXT, AT_OK, 8000 ) == FALSE )
8484 {
8585 result = ERROR_OPEN_GPRS_CONTEXT;
8686 }
0 commit comments