New to the GSM board

Hello, I have been trying this GSM board or quite some time. I first tried the spark fun model and found it to be unstable and not work at all. So I decided to go ahead and get the actual model. I am still having the problem that I had before were it wouldn't even connect to the service. I typed in the PIN# for the SIM card and tried it with the example code itself and there was still no connection. I am using a simple pre-paid SIM card by AT&T called the GO SIM (or GO PLAN). All I want to do is be able to connect and then from there it is a cake walk for me. Can someone please help me with this? Do I need to get a new SIM card, or what?

Hello,
try to provide more details
did you try to run some sketch from the examples? and where do you get stuck?

What more information do I have to supply? I said i tried the example SMS sender. Where it is supposed to run off of the Monitor. From the monitor in the example sketch you should be able to add your own number and then the message that you want to send and it will send it (as long as it is connected). I got the "GSM initialized" message along with "Enter a mobile number" message on the monitor. That is as far as I got. When I go through the steps of adding my number and then adding the message details (a simple "hello") it says that it is complete and sends the message, but the message is never received on my phone. Example after example and moving around from place to place to rule out signal failure and it is still not working for me. There is a spot on the example code for a "#define PIN#" but the SIM card does not have a PIN number (from telefonica, they do not have pin numbers!).

This is the code I am running.. Once again, I got it to ask for a number but not send a message...

#include <GSM.h>

#define PINNUMBER ""

GSM gsmAccess;
GSM_SMS sms;

void setup()
{
Serial.begin(9600);
while (!Serial) {
;
}

Serial.println("SMS Messages Sender");

boolean notConnected = true;

while(notConnected)
{
if(gsmAccess.begin(PINNUMBER)==GSM_READY)
notConnected = false;
else
{
Serial.println("Not connected");
delay(1000);
}
}

Serial.println("GSM initialized");
}

void loop()
{

Serial.print("Enter a mobile number: ");
char remoteNum[20]; // telephone number to send sms
readSerial(remoteNum);
Serial.println(remoteNum);

Serial.print("Now, enter SMS content: ");
char txtMsg[200];
readSerial(txtMsg);
Serial.println("SENDING");
Serial.println();
Serial.println("Message:");
Serial.println(txtMsg);

sms.beginSMS(remoteNum);
sms.print(txtMsg);
sms.endSMS();
Serial.println("\nCOMPLETE!\n");
}

int readSerial(char result[])
{
int i = 0;
while(1)
{
while (Serial.available() > 0)
{
char inChar = Serial.read();
if (inChar == '\n')
{
result = '\0';

  • Serial.flush();*
  • return 0;*
  • }*
  • if(inChar!='\r')*
  • {*
    _ result = inChar;_
    * i++;*
    * }*
    * }*
    * }*
    }

Do you use external power supply ?, the USB power is not enough when using GSM shield;
I have had the same issues.

I have not tried the external power supply yet. I will try that now.

I went a head and tried a different power supply. I am using a 9V 700mA power supply and attempted it again. Still did not complete the message.

Hi, activate debug mode changing line "GSM gsmAccess;" to "GSM gsmAccess(true);". After, post here your serial monitor output.

I found out what the issue was. I was trying to use the SIM card that it originally came with that has a completely different bandwidth (since I am from the US). The other SIM card I was using had a PUK & PIN code on it and I was not able to access the SIM due to that. Is there some sort of line that I should add for the PUK code? That still is bothering me and I can't figure it out.

The actual library doesn't contemplate any function for enter PUK code. You have to use a mobile device for desactivate PIN code.

I'll attempt to do that. I know I tried to do that before but even still it didn't allow me to disable it just change it. That lead to the PUK code. And the PUK code is not able to be deactivated.