Arduino Uno + ATK-SIM900 Module - Unable to receive SMS

Hi All

I am new to Arduino platform and was playing around with the GSM module to send receive SMS.

The Hardware I am using-

  1. Arduino UNO
  2. Alientek ATK-SIM900 GSM Module ( Not Shield)

The device works ok when I want to make a call from the module or to send an SMS.
BUT when i send an SMS from my phone to the module , I am unable to retrieve the contents or know if anything is happening. When I take the SIM out of the module I can see the messages that I sent are stored.

The messages are stored in the SIM card ( I have tried the phone memory storage too but to no avail)

I am using the Code from an example I got on the internet and it is as follows - In the Comments on the code you can see further description.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 10);  // tx,rx 
void setup()
{
  mySerial.begin(9600);   // Setting the baud rate of GSM Module  
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
  delay(100);
}
void loop()
{
  if (Serial.available()>0)
   switch(Serial.read())
  {
    case 's':
    Serial.println("S pressed");
      SendMessage();
      break;
    case 'r':
    Serial.println("R pressed");
      RecieveMessage();
      break;
  }

 if (mySerial.available()>0)
 {
  Serial.println("Somethingggggggg is there"); // the only time i see this on the monitor is when i power off my GSM module
   Serial.write(mySerial.read());
 }
 else
 {
  //Serial.println("Nothing is there");
  }
}
 void SendMessage() // this function works and sms is sent out
{
  Serial.println("S pressed - IN"); // this is perfect
  mySerial.println("AT+CMGF=1r");   
  delay(1000);  // Delay of 1000 milli seconds or 1 second
  mySerial.println("AT+CMGS=\"+88012345566\"\r"); // Replace x with mobile number
  delay(1000);
  mySerial.println("texing from GSM module");// The SMS text you want to send  change any msg 
  delay(100);
   mySerial.println((char)26);
  delay(1000);
}
 void RecieveMessage() // This one doesnt is the problem
{
  Serial.println("R pressed - IN"); // This gets executed no problem
  
  mySerial.println("AT+CNMI=2,2,0,0,0\r"); // I have tried various combinations of 2,1 or 2,2 or 3,3 or 1,2 none of them seem to work. I am in Bangladesh if that helps
  mySerial.println("AT+CPMS=\"SM\",\"SM\",\"SM"); // I added this after reading some AT commands - 
   mySerial.println("AT+CMGR=1r"); // I added this after reading up on AT commands - still nothing. However the SIM card is storing SMSes, i checked sim card.
  delay(1000);
 }
 


// lookforlk.blogspot.com - gentleman whose code I used

Apart from this, the gentleman from whose website I copied the example, in this page the serial monitor output should be like the image below.

But my serial monitor shows this- ( and my code is exactly same. then why is my serial monitor not printing statements even when I am sending the SMS and its successful? )

My hardware connection - please feedback if anything is amiss there

Any help on this will be greatly appreciated. I have been trying to fix it for last 3 days. I need help on how to use the AT command to receive the SMS and display it.

Many Thanks
RJ