erratic response from GSM shield / library

Using the GSM library I get erratic response from the GSM shield.
Here is the code:

#include <GSM.h>

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

void setup()
  // initialize serial communications

  Serial.print("Start ");


  Serial.print("GSM initialized ");


void loop()


int freeRam() 
  extern int __heap_start, *__brkval; 
  int v; 
  return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); 

and this is the response

Start 1182
0 9>AT%13%%13%%10%OK%13%%10%
9 40>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10RR¦¦*??êÒjªR`Í?*??*jTüAT+CGREG?%13%
40 85>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%PRÓ¦?Å?*z-?Å?**??**??**??*
85 116>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
116 19>AT+CGREG?%13%%13%%10%+CGREG: 0,1%13%%10%%13%%10%OK%13%%10%
19 36>AT+IFC=1,1%13%%13%%10%OK%13%%10%
36 54>%19%%17%AT+CMGF=1%13%%13%%10%OK%13%%10%
54 70>AT+CLIP=1%13%%13%%10%OK%13%%10%
70 81>ATE0%13%%13%%10%OK%13%%10%
81 87>%13%%10%OK%13%%10%
GSM initialized 1182

Especially the erratic part

AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10RR¦¦*??êÒjªR`Í?*??*jTüAT+CGREG?%13%
40 85>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%PRÓ¦?Å?*z-?Å?**??**??**??*

should not be there.

What can be the cause? And is there a solution available?

See also my other topic on this

This might be a silly response, but have you verified the baud rates are set correctly.
Mine kind of looked like that and it turned out to be the baud rate settings.

You can test the GSM shield without the Arduino. Use an USB to TTL convertor to connect
to the TX/RX pins of the shield. Then use the serial monitor set at the correct baud rate
to send AT commands manually. The GSM chip datasheet should provide a complete list of the
AT commands. This rules out the Arduino code, as its totally removed and verifies you can
communicate with the GSM shield.

Remember, you can run and operate the GSM shield as a standalone unit. Get it working by itself,
then connect it to the Arduino and tweak your code.

Hope this helps.

The GSM Shield is working. That I verified.
The Quectel M10 documentation states that the module is autobauding, after sending a first AT the baud rate is properly set by the module, on the second AT a OK response is given. Thereafter network registration starts. In the response part you can see that this is exactly what is happening. So, the problem is not caused by the baud rate setting I think. Thanks for the suggestion anyway!

In the meanwhile the problem still persists. Any suggestions / solutions?