diff --git a/src/TinyGsmClientA6.h b/src/TinyGsmClientA6.h index ae655bf..3b0a9fd 100644 --- a/src/TinyGsmClientA6.h +++ b/src/TinyGsmClientA6.h @@ -418,8 +418,9 @@ public: bool gprsConnect(const char* apn, const char* user = NULL, const char* pwd = NULL) { gprsDisconnect(); - sendAT(GF("EE"), 2); // Set security to WPA2 - if (waitResponse() != 1) goto fail; + sendAT(GF("+CGATT=1")); + if (waitResponse(60000L) != 1) + return false; // TODO: wait AT+CGATT? diff --git a/src/TinyGsmClientSIM808.h b/src/TinyGsmClientSIM808.h index b49ab85..fccfbcb 100644 --- a/src/TinyGsmClientSIM808.h +++ b/src/TinyGsmClientSIM808.h @@ -14,7 +14,7 @@ //============================================================================// //============================================================================// -// Declaration and Definitio of the TinyGsmSim808 Class +// Declaration and Definition of the TinyGsmSim808 Class //============================================================================// //============================================================================//