mega and quectel M95 setup issues

Hi All

I am trying to set up a arduino mega with a GSM2 clickboard

I have the setup working without troubles on my arduino uno, I need to change it to the mega due to need of several HW serials.

I suspect that the problem might be somewhere inside the GSM.ccp or GSM.h file

The issue arises when I run my program -

#include <GSM.h>
#define PINNUMBER "" // SIM Card PIN number
#define STATPIN A4   //Modem Status Pin
#define SIGNALLEDPIN 13 //LED indicator to show when connected to GSM network
//Global classes
GSM gsmAccess;
GSMScanner scannerNetworks;
GSMModem modemTest;
GSMVoiceCall gsmVC;
GSM_SMS sms;
String currentCarrier = "";
String IMEI = "";
void setup() {
   // put your setup code here, to run once:
   Serial.begin(9600);
   Serial.println("Starting Modem...");
   pinMode(SIGNALLEDPIN, OUTPUT);
   digitalWrite(SIGNALLEDPIN, LOW);
   pinMode(STATPIN, INPUT);
   int iSTAT = 0;
   iSTAT = digitalRead(STATPIN);
   if (0 == iSTAT)
   {
      Serial.println("Modem in sleep mode, waiting for it to wake...");
      //This will cause the Library to start the modem up
      gsmAccess.begin(PINNUMBER);
   }
   iSTAT = digitalRead(STATPIN);
   if (0 == iSTAT)
   {
      Serial.println("Modem failed to power up");
   }
   else
   {
      Serial.println("Modem powered up");
   }
   //Get IMEI
   Serial.print("Modem IMEI: ");
   IMEI = modemTest.getIMEI();
   IMEI.replace("\n", "");
   if (IMEI != NULL) Serial.println(IMEI);
   //Scan for network
   Serial.println("Searching for Network...");
   scannerNetworks.begin();
   bool notConnected = true;
   //Connect
 
   while (notConnected)
   {
      if (gsmAccess.begin(PINNUMBER) == GSM_READY)
      {
         notConnected = false;
         digitalWrite(SIGNALLEDPIN, HIGH);
      }
      else
      {
         Serial.println("Not connected");
         delay(1000);
      }
   }
   Serial.print("Current carrier: ");
   currentCarrier = scannerNetworks.getCurrentCarrier();
   currentCarrier.trim();
   if (currentCarrier.length() != 0)
   {
      Serial.println(currentCarrier);
   }
   else
   {
      Serial.println("No Carrier");
   }
   Serial.print("Signal Strength: ");
   Serial.print(scannerNetworks.getSignalStrength());
   Serial.println(" [0-31]");
   //Hang up any Voice Calls
   gsmVC.hangCall();
   Serial.println("");
   Serial.println("System Ready");
   Serial.println("Waiting for call");
}
void loop() {
   // put your main code here, to run repeatedly:
   //CheckVoiceCallStatus();
   sendSms();
   delay(50000);
}
void CheckVoiceCallStatus()
{
   // Check the status of the voice call
   int iRet = 0;
   switch (gsmVC.getvoiceCallStatus())
   {
   case IDLE_CALL: // Nothing is happening
      break;
   case RECEIVINGCALL: // Yes! Someone is calling us
      Serial.println("RECEIVING CALL");
      // Retrieve the calling number
      char numtel[20];
      gsmVC.retrieveCallingNumber(numtel, 20);
      // Answer the call, establish the call
      gsmVC.answerCall();
      delay(200);
      gsmVC.hangCall();
      // Print the calling number
      Serial.print("Number:");
      Serial.println(numtel);
      //Send Text Message
      sms.beginSMS(numtel);
      sms.print("I just missed your call");
      iRet = sms.endSMS();
      Serial.print("Sent SMS bytes: ");
      Serial.println(iRet);
      break;
   case TALKING:  // In this case the call would be established
      break;
   }
}
void sendSms()
{
   int iRet = 0;
   sms.beginSMS("+xxxxxxxxxx");
   sms.print("How ya doing");
   iRet = sms.endSMS();
   Serial.print("Sent SMS bytes: ");
   Serial.println(iRet);
}

It keeps going in the loop where it´s searching for network ?

Any clues?

Kind Regards

Stefan