solved: GSM shield is not accepting PIN

hi all,

my GSM shield (with Quectel M10) worked for some time pretty good. I am using the GSM library included in Arduino IDE 1.6.5.

Now I have big problems: 1) with a first SIM card the software hangs within gsmAccess.begin(). Some time ago it worked with it. This SIM card does not need a PIN.

2) with a second SIM card it reports an error within gsmAccess.begin(PINNUMBER). The response of the shield in debug mode is

AT%13% 78 87>AT%13%%13%%10%OK%13%%10% AT+CPIN=xxxx%13% 87 118>AT+CPIN=xxxx%13%%13%%10%+CME ERROR: 12%13%%10% not connected

The true PIN is replaced here with xxxx. The PIN is correct. Yesterday it worked with this PIN. I guess that "+CME ERROR: 12" means "wrong PIN".

Has somebody had such a problem and solved it?

The reason was not the PIN of the SIM card. My GSM shield had problems with autobaud. Now I fixed the baud rate to 9600 and it works :-)

I will write an extra post for this story.


additional info:

just now I could run the test program "SendSMS" with the first SIM card once, only once!

I reloaded the test program and now in debug mode I get

AT%13% // from debug mode Not connected // from SendSMS with the wait loop, see following code

while (notConnected)
    if (gsmAccess.begin(PINNUMBER) == GSM_READY)
      notConnected = false;
      Serial.println("Not connected");

According to a post in this forum I had edited the begin() function in GSM2ShieldV1AccessProvider.cpp to stop the waiting loop after 20 sec. Therefore gsmAccess.begin() returns zero every 20 sec.

It seems that the SIM card needs some long sleeping pause before it works again. Is it possible that I got such a curious SIM card?