I have the same issue, especially when the board powers up.
Looking around this forum and StackOverflow I did arrange this piece of code. It has a timeout and if the GSM module does not initialize, the software will restart.
This does NOT fix the issue itself, but does a workaround to avoid the module to get stuck. Sometime, it needs a few restarts to get the GSM Shield initialized.
void(* SoftReset) (void) = 0; // declare reset function @ address 0
void InitGSM(char* pin)
unsigned long myTimeout = 50000; // YOUR LIMIT IN MILLISECONDS
unsigned long timeConnect = millis();
Serial.println("\nTrying to connect..");
// Use async mode and requires that GSM debug mode has been set on GSM object creation
gsmAccess.begin(pin, true, false);
while(millis()-timeConnect < myTimeout)
// Call this if debugging is on. Otherwise we will never reach GSM_READY...?!?
// might not call ready too often.??? See GSM3ShieldV1AccessProvider.cpp, GSM3ShieldV1AccessProvider::begin
// Status check
if (gsmAccess.getStatus() == GSM_READY)
delay(500); // Let the message printout before reset is performed!
I’m deeply investigating the why of this issue. Having the GSM debug feature on, I saw the GSM module stuck at the first AT attempt. So maybe I’ll change the GSM library code to retry this first initialization step. Once this first step has passed, the other steps just run well (that’s what I noticed so far)
Hope this helps,
Does the Arduino’s SIM900 GSM module have the same kind of issue?