Go Down

Topic: GSM shield not working with tmobile SIM (Read 4073 times) previous topic - next topic

tehflash

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?

MathiasVDA

have you tried it in a regular cell phone?

tehflash

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?

MathiasVDA

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.

tehflash

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.

tehflash

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?

MathiasVDA

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


AT+CGREG?%13%
--> AT+CGREG?

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: <n>,<stat>[,<lac>,<ci>]

With the parameters:

<n> 0 Disable network registration unsolicited result code
1 Enable network registration unsolicited result code +CGREG:<stat>

<stat> 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)

davidgoth

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

tehflash

Still having problems here.  I can use http://m2msupport.net/m2msupport/module-tester/ and it works fine and registers to the network fine.  But, for some reason sketches are not working...  Thanks for the advice =D

perryjamessugden

Did you find out the problem to this?

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


dannable

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!
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Go Up