GSM shield not working with tmobile SIM

I have arduino uno with arduino GSM shield. When I first received it I activated the Bluevia SIM and played around with it. After learning the limitations of the Bluevia SIM, I purchased a prepaid T-Mobile SIM, added $10.00 to it, and activated it using the arduino IMEI and I can't get it to connect. I am using the premade example script SendSMS and using the default pin 1234 but serial keeps saying Not connected. Can anyone help please?

have you tried it in a regular cell phone?

Thanks for your answer. Unfortunately, I do not have a phone this SIM will work in. What does putting the SIM card into a phone do? TMobile customer service claimed they could see the SIM card on the network when I powered the arduino. Does putting the SIM into a phone do something to the SIM card or just verify the SIM card works?

Well i was thinking that the sim might had to be activated first. I read somewhere that you need to do that with a regular phone instead of the shield.

Used it in a Tmobile phone and the SIM card works properly. I verified that I am using the correct PIN. All I am doing is inserting the PIN number into the example sketch and watching the serial monitor and it doesn’t work. Maybe i’m supposed to add something else in the code? The bluevia SIM didn’t have a PIN so this is new to me. Could someone please link me a tested sketch using a tmobile pin? Just so I know if i’m missing something. Thanks.

Seemed like the code was hanging, so I uploaded GsmScanNetworks example and I turned on debugger and got this:

AT%13%%10%ATE0%13%%10%AT%13% 46 55>AT%13%%13%%10%OK%13%%10% AT+CGREG?%13% 55 86>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 86 117>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 117 20>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 20 51>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 51 82>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 82 113>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 113 16>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 16 47>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 47 78>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 78 109>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 109 12>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 12 43>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 43 74>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 74 105>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 105 8>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 8 39>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 39 70>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 70 101>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 101 4>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10% AT+CGREG?%13% 4 35>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10%

What does this mean?

I don’t have a gsm shield at the moment so I cannot test anything but maybe this helps you out:

is the command sent from the gsm library to the shiel

4 35>AT+CGREG?%13%%13%%10%+CGREG: 0,3%13%%10%%13%%10%OK%13%%10%
→ +CGREG: 0,3 OK
The response of the shield.

In the AT command documentation you find that the response for the AT command the lib is giving is this:
+CGREG: ,[,,]

With the parameters:

0 Disable network registration unsolicited result code
1 Enable network registration unsolicited result code +CGREG:
0 Not registered, ME is not currently searching a new operator to register to
1 Registered, home network
2 Not registered, but ME is currently searching a new operator to register to
3 Registration denied
4 Unknown
5 Registered, roaming

So your registration request is denied.

I don’t know if this is the problem but if you use the library from arduino then you need to supply the PIN number as a string. Have you done this? (Normally you get a compile error if you don’t)

The network is rejecting your SIM. Check PIN and APN. Contact with your operator.

Still having problems here. I can use and it works fine and registers to the network fine. But, for some reason sketches are not working... Thanks for the advice =D

Did you find out the problem to this?

having the same issues with a Pay As You Go O2 SIM

Can you better explain the problems you're having? I bought an O2 sim at the weekend, put it in a pre pay phone, added £10 credit, put it in the GSM shield (granted not an official Arduino one...) and it works fine. When it can find a network signal that is!

I had a similar problem also. I had to contact T-Mobile and register the GSM device. You can retrieve the IMEI from the GSM shield.

Then, I did not use a PIN ... T-Mobile said that their SIM cards do not require a PIN.

I can connect with a T-Mobile pay as you go SIM. No pin is required for my sim.


I am in America (USA) and I used telefonica SIM card. It takes almost 40 seconds to send data from my GSM to the webserver and I do not know if using a local SIM card from T-Mobile (For example) will reduce that delay.

Does anybody know which problem it causes to use a foreign SIM cards?

Many Thanks,