[solved]SendSMS code provided with the GSM library hanging on gsmAccess.begin()

Hi Everyone.
When i try the example code provided with the GSM library, the code seems hanging on the line:


When I set debug to true,it print " AT%13% " after printing “SMS Messages Sender”;

please can anyone help me?

For more information:
arduino board: mega ADK rev3,
my SIM card has no PIN and i’m able to connect to internet with this SIM with a mobile phone.
Full code: Attached

SendSMS.ino (2.14 KB)

it was a connection problem with the Mega and the shield.
the code works now ,after following this notes : http://arduino.cc/en/Guide/GSMShieldLeonardoMega .