Quectel MC60 SIM Module loops where it shouldnt

I'm trying to hook up my GSM/GPS/BLE Shield called "Quectel MC60". I found some example Code for an quite similar MC60 Module here:

This is the code:

#include <SoftwareSerial.h>

SoftwareSerial gsm(0, 1);

void setup()
{
  Serial.begin(9600);
  gsm.begin(9600);

}

void loop()
{
  if (Serial.available() > 0)
  {
    String data = Serial.readString();
    Serial.println(data);
    gsm.println(data);
  }
  if (gsm.available() > 0)
  {
    String data = gsm.readString();
    Serial.println(data);
  }
}

I just adapted the pins from "2,3" Because the shield goes on top of the Adruino Uno and matches with the 0 (RX), 1 (TX) Pins.
The thing is that it connects correctly but if I call "AT", it loops through the whole time and shows me this:

AT


OK

SMS Ready

AT


OK

SMS Ready
AT
AT


OK

SMS Ready


OK

OK

ERROR

AT
AT


OK

SMS Ready


OK

OK

ERROR
AT


OK

SMS Ready
AT
AT


OK

SMS Ready


OK

OK

ERROR


OK

ERROR

AT


OK

SMS Ready
AT
AT


OK

SMS Ready


OK

OK

ERROR


OK
H⸮H⸮j⸮H⸮
ERROR

AT
AT


OK

SMS Ready


OK

OK

ERROR
AT


OK

SMS Ready
AT
AT
AT


OK

SMS Ready
AT
AT


OK

SMS Ready


OK

OK

ERROR


OK
H⸮H⸮j⸮H⸮
ERROR


OK

ERROR

AT


OK

SMS Ready
AT
AT


OK

SMS Ready


OK

OK

ERROR


OK
H
AT
AT
Ma⸮

As far as I understand ist that the "gsm.available();" should not be the whole time over 0 so that it doesnt loop throught. Can anyone help me out with that to understand whats going on? Im quite new to Arduino development.
This is unfortunately the only thing whats out there to the Module:

Pins 0 and 1 are also used for communication with a PC. So (part of) what you're seeing is what you send to the GSM and what you receive back.

Further there should never be a reason to use SoftwareSerial on the hardware serial pins.

From, the below snip of the pcb, you can choose between SoftwareSerial on pins 2 and 3 or HardwareSerial on pins 0 and 1.
image

And the relevant part of the schematic
image

Images copied from https://cdn.sos.sk/productdata/b1/b9/494f8af8/arduino-mc60e-gsm-gps-ble-shield.pdf

1 Like

Ok, it confused me a second that on the pcb pin0 is in the manual actually pin1.
So far so good. I get a response back but it loops constantly and respnonds the same:

AT

AT


OK

+CPIN: READY

AT


OK

+CPIN: READY


OK

ERROR

AT


OK

+CPIN: READY


OK

ERROR


OK

ERROR

Call Ready

AT


OK

+CPIN: READY


OK

ERROR


OK

ERROR

Call Ready


OK

ERROR

SMS Ready

AT


OK

+CPIN: READY


OK

ERROR


OK

ERROR

Call Ready


OK

ERROR

SMS Ready


OK

ERROR

AT


OK

+CPIN: READY


OK

ERROR


OK

ERROR

Call Ready


OK

ERROR

SMS Ready


OK

ERROR


OK

ERROR

AT


OK

+CPIN: READY


OK

ERROR


OK

ERROR

Call Ready


OK

ERROR

SMS Ready


OK

ERROR


OK

ERROR


OK

ERROR

I guess something in the code above is not correct. But when i look up some other examples, they are similar. "+CPIN: READY" means that the pin code works (in my case there is none).

#include <SoftwareSerial.h>

SoftwareSerial gsm(2, 3);
SoftwareSerial enableVREG(7, 8);


void setup()
{
  Serial.begin(9600);
  gsm.begin(9600);
  enableVREG.begin(9600);
}

void loop()
{
  if (Serial.available())
  {
    Serial.print("Serial available: ");
    Serial.println(Serial.available());
    String data = Serial.readString();
    Serial.println(data);
    if (data == "*") {
      Serial.println("Asterisc");
      gsm.write(0x1a);
    } else {
      gsm.println(data);
    }

  }
  while (gsm.available())
  {
    Serial.print("GSM available: ");
    Serial.println(gsm.available());
    String data = gsm.readString();
    Serial.println(data);
  }
  Serial.println(gsm.available());
  delay(2000);
}

It seems that "gsm.available();" never returns more than 0.