GSM Shield + Arduino UNO, sim won't connect - Help needed

Hi there,

I am doing a project which involves a PIR sensor, Arduino UNO and Arduino GSM shield. The shield and UNO board are original Arduino products.
The idea is that the Arduino texts my phone when the PIR sensor detects something.
Originally, it worked perfectly, the GSM shield would connect to the network without any issues. Now however, a week later I am having serious issues.
I am using Arduino IDE 1.6.7 and Windows 10.
The SIM has no PIN. Also I contacted the operator and they said the SIM is active on the network?
I have tried 3 different SIMS, one was bill pay, the other two were pay as you go. I have tried Meteor Ireland SIM card and Three Ireland SIM card.

I have tested the code, first using the example ‘TestGPRS’ and I get this as a debug:

Connecting GSM network...AT%13%
0 9>AT%13%%13%%10%OK%13%%10%
AT+CGREG?%13%
9 40>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
40 71>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
71 102>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
102 5>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
5 36>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
36 67>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
67 98>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
98 1>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
1 32>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
32 63>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
63 94>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
94 125>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
125 28>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
28 59>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
Connecting GSM network...

It will not connect at all. The SIM works fine in my phone and it has connected before without problems. I have changed the GSM3V1ShieldAccessProvider.cpp according to what other forum users have said, again no luck. Put in GSM.begin() waiting for ready with a 5 second loop count as shown:

GSM3_NetworkStatus_t GSM3ShieldV1AccessProvider::begin(char* pin, bool restart, bool synchronous)
{	
	Serial.println("gsm.begin()");
	pinMode(__RESETPIN__, OUTPUT);

	// If asked for modem restart, restart
	if (restart)
	{
		HWrestart();
	}
	else
	{
		HWstart();
	}	

	unsigned loopCnt = 5;
	theGSM3ShieldV1ModemCore.gss.begin(9600);
	// Launch modem configuration commands
	ModemConfiguration(pin);
	// If synchronous, wait till ModemConfiguration is over
	if(synchronous)
	{
		// if we shorten this delay, the command fails
		while(ready()==0 && loopCnt--)
		{
			delay(1000);
			Serial.println("gsm.begin() waiting for ready");
		}			
	}
	return getStatus();
}

And I get this when the code debugs:

Motion detected!
SMS Messages Sender
gsm.begin()
AT%13%gsm.begin() waiting for ready

0 9>AT%13%%13%%10%OK%13%%10%
AT+CGREG?%13%gsm.begin() waiting for ready

9 40>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%gsm.begin() waiting for ready

40 71>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%gsm.begin() waiting for ready

71 102>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%gsm.begin() waiting for ready

102 5>AT+CGREG?%13%%13%%10%+CGREG: 0,0%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%Not connected

I added a 9V battery - still no luck.
The shield has an SMA connector for an antenna, I have ordered one but it hasn’t arrived yet.

The main program code is:

#include <GSM.h>
#define PINNUMBER ""

// initialize the library instance
// include a 'true' parameter for debug enabled
GSM gsmAccess(true);
GSM_SMS sms;
GSMVoiceCall vcs;

// char array of the telephone number to send SMS
// change the number 1-212-555-1212 to a number
// you have access to
char remoteNumber[20]= "00353857799485";  

// char array of the message
char txtMsg[200]="Someone detected on bridge.";

// Array to hold the number for the incoming call
char numtel[20];

int ledPin = 8;                  // choose the pin for the LED
int inputPin = 6;                // choose the input pin (for PIR sensor)
int pirState = LOW;              // we start, assuming no motion detected
int val = 0;                     // variable for reading the pin status
int pinSpeaker = 4;              //Set up a speaker on a PWM pin (digital 9, 10, or 11)



void setup() 
{
  pinMode(ledPin, OUTPUT);       // declare LED as output
  pinMode(inputPin, INPUT);      // declare sensor as input
  pinMode(pinSpeaker, OUTPUT);
  Serial.begin(9600);
  
  Serial.println("Motion detected!");


  Serial.println("SMS Messages Sender");

// connection state
  boolean notConnected = true;

// Start GSM shield
// If your SIM has PIN, pass it as a parameter of begin() in quotes
  while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER, false)==GSM_READY)
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }
  Serial.println("GSM initialized");
  
   vcs.hangCall();

  Serial.println("Waiting for a call");

}



void loop()
{
  val = digitalRead(inputPin);   // read input value
  if (val == HIGH) {             // check if the input is HIGH
    digitalWrite(ledPin, HIGH);  // turn LED ON
    playTone(300, 160);
    delay(150);
    
    if (pirState == LOW) 
    {
// we have just turned on

  sendSMS();  
  
// We only want to print on the output change, not state
      pirState = HIGH;
    }
    
  }
  
  else 
  {
      digitalWrite(ledPin, LOW);  // turn LED OFF
      playTone(0, 0);
      delay(300); 
      
      if (pirState == HIGH)
      {
      // we have just turned of
      
      Serial.println("Motion ended!");      
// We only want to print on the output change, not state

      pirState = LOW;
    }
  }
  
  switch (vcs.getvoiceCallStatus())
  {
    case IDLE_CALL: // Nothing is happening

      break;

    case RECEIVINGCALL: // Yes! Someone is calling us

      Serial.println("RECEIVING CALL");

//      // Retrieve the calling number
//      vcs.retrieveCallingNumber(numtel, 20);
//
//      // Print the calling number
//      Serial.print("Number:");
//      Serial.println(numtel);

      // Answer the call, establish the call
      vcs.answerCall();
      break;

    case TALKING:  // In this case the call would be established

      Serial.println("TALKING. Press enter to hang up.");
      
      while (Serial.read() != '\n') 
      {
        delay(100);
      }
      vcs.hangCall();
      Serial.println("Hanging up and waiting for the next call.");
      break;
  }
  delay(1000);

}

// duration in mSecs, frequency in hertz
void playTone(long duration, int freq) {
    duration *= 1000;
    int period = (1.0 / freq) * 1000000;
    long elapsed_time = 0;
    while (elapsed_time < duration) {
        digitalWrite(pinSpeaker,HIGH);
        delayMicroseconds(period / 2);
        digitalWrite(pinSpeaker, LOW);
        delayMicroseconds(period / 2);
        elapsed_time += (period);
    }
}

// SMS Code
void sendSMS(){

  Serial.print("Message to mobile number: ");
  Serial.println(remoteNumber);

// sms text
  Serial.println("SENDING");
  Serial.println();
  Serial.println("Message:");
  Serial.println(txtMsg);

// send the message
  sms.beginSMS(remoteNumber);
  sms.print(txtMsg);
  sms.endSMS(); 
  Serial.println("\nCOMPLETE!\n");  
}

And the debug is the same as above, it is stuck at 0,0%13% no connection?
I tested the shield itself and the debug said it was functioning properly.
I am desperate at this stage for any help!

Was there a Win10 upgrade in the intervening time?

.