GSM Shield / Mega 2560 / random freeze on GSM begin()

dear support comunity

I did visit dozens of sites and searched to forum, but I am stuck.

I’m using the telefonica GSM shield, which seems to be hanging randomly when calling the gsm begin() function. As found on other sites, I am using an external 12V power supply with 1A, I did bend and bridge the pin 2 to 10 (as using a MEGA board).
When I turn on the gsm debug function, the last thing that I can see is

AT%13%

After changing this code quite a few times and testing, I am using this code to connect to the GSM / GPRS network:
In setup:

  while(notConnected)
  {
	if(!gsm_connect()) {
		Serial.println(F("SYSTEM - Could not connect to GSM Network -> Retry in 10 Seconds"));
		delay(10000);
	} else {
		notConnected = false;
	}
  }

and the function:

boolean gsm_connect() {
	unsigned long myTimeout = 20000; // Connection timeout in milliseconds
	int connected = 0;
	unsigned long timeConnect = millis();
	while(!connected && (millis()-timeConnect < myTimeout)) {
		Serial.println(F("SYSTEM - Connecting to GSM Network..."));
		delay(1000); 
		if(gsmAccess.begin(PINNUMBER, false)==GSM_READY) {
			Serial.println(F("SYSTEM - Successfully connected to GSM Network"));
			delay(1000);
			if(gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY) {
				Serial.println(F("SYSTEM - Successfully connected to GPRS Data Network"));
				connected=1;
			}
		}
	}
	if(connected == 1) {
		return true;
	} else {
		return false;
	}
}

I do get a connection quite 3/4 of the connection attempts and then it holds for a few minutes. If I got a lot of traffic, it loses connection and hangs on reconnect…

if (client.connect(server, 80)) {
...
} else {
notConnected=true;
gsmAccess.shutdown();
Serial.println(F("SYSTEM: Reconnecting to GSM Network..."));
while(notConnected)
 {
if(!gsm_connect()) {
Serial.println(F("SYSTEM - Could not connect to GSM Network -> Retry in 10 Seconds"));
delay(10000);
} else {
notConnected = false;
}
}
}

Any ideas what could cause this?

I just replaced the 12V 1A power supply with one offering 12V 3A. Still the same problem. It just hangs on almost 50% of the begin(). :~

Bump

I have the same problem as well.

edit: Mods can we move this to the GSMShield forum please?

Hello everyone let me introduce my self I’m Marco, a salute to all.

Good evening, I'm Mark and I recently discovered the world of Arduino I was fascinated, I decided to play with some examples and now I have a project for my experience ambitious: I would like to create a program with Arduino Mega 2560 and GSM icomsat 1.1 Arduino 1.5.4 win 7 I read the instructions I modified the library GSMSHELD pin TX RX 4 5 uncommented / / # define # define MEGA UNO, 12V 1A food. No errors during compilation, but I get no response, it stops with (Trying to force the baud rate to 9600) I ask for help and does not continue

thank you very much