gsmAccess.begin() doesn't work

Hi

My new GSM Shield doesn’t work. I changed the Code in this GSM3ShieldV1AccessProvider.cpp library like this post http://forum.arduino.cc/index.php?topic=180374.0

I have two different running Swisscom SIM-Cards. In a handy it runs perfectly.

Where is the problem?

Thanks for your support
Mick

Here is the output from serial mon.:

Starting Arduino web client.
notConnected = true
begin while…
gsm.begin()
AT%13%gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready

Not connected
begin while…
gsm.begin()
AT%13%gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready
gsm.begin() waiting for ready

// include the GSM library
#include <GSM.h>

// PIN number if necessary
#define PINNUMBER "1111"

// APN information obrained from your network provider
#define GPRS_APN       "gprs.swisscom.ch" // replace with your GPRS APN
#define GPRS_LOGIN     ""                  // replace with your GPRS login
#define GPRS_PASSWORD  "gprs"             // replace with your GPRS password

// initialize the library instances
GSMClient client;
GPRS gprs;
GSM gsmAccess(true);

// This example downloads the URL "http://arduino.cc/latest.txt"

char server[] = "arduino.cc"; // the base URL
char path[] = "/latest.txt"; // the path
int port = 80; // the port, 80 for HTTP

void setup()
{
  // initialize serial communications
  Serial.begin(9600);
  Serial.println("Starting Arduino web client.");
  // connection state
  boolean notConnected = true;
  Serial.println("notConnected = true");

  // Start GSM shield
  // pass the PIN of your SIM as a parameter of gsmAccess.begin()
  while(notConnected)
  {
    Serial.println("begin while...");
    if(gsmAccess.begin(PINNUMBER)==GSM_READY) {//& (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY)){
      notConnected = false;
      Serial.println("Connected");
    }
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect(server, port))
  {
    Serial.println("connected");
    // Make a HTTP request:
    client.print("GET ");
    client.print(path);
    client.println(" HTTP/1.0");
    client.println();
  } 
  else
  {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  }
}

void loop()
{
  // if there are incoming bytes available 
  // from the server, read them and print them:
  if (client.available())
  {
    char c = client.read();
    Serial.print(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.available() && !client.connected())
  {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();

    // do nothing forevermore:
    for(;;)
      ;
  }
}

The Swisscom GPRS parameters I found say to leave password blank?

http://www.swisscom.ch/en/residential/help/loesung/server-settings-mobile.html

Hi

That's not the reason. The problem is this syntax:

if(gsmAccess.begin(PINNUMBER)==GSM_READY) {
      notConnected = false;
      Serial.println("Connected");
    }
    else

Any other ideas?

Mick

hello

Here is the solution: http://forum.arduino.cc/index.php?topic=259755.msg1835691#msg1835691

Greets Mick