Arduino GSM interface does not receive the SMS though it send SMS

Dear Friends,

I am trying to receive the SMS to A6 IoT GSM module, and try to read that sms over serial port. I am not able to receive the data over the serial port..

I am using this GSM module:

The code is as per below:


define GSM_RX 2 // Arduino pin 2 to UTX

define GSM_TX 3 // Arduino pin 3 to URX

SoftwareSerial mySerial(GSM_RX, GSM_TX);

//char msg; String msg; void setup() { pinMode(4, OUTPUT);

Serial.begin(9600); mySerial.begin(115200); // Setting the baud rate of GSM Module delay(1000); //mySerial.print("AT+CMGF=1r"); // set SMS mode to text mySerial.print("AT+CMGF=1\r"); // set SMS mode to text delay(200); Serial.println("AT+CSMS=1\r"); delay(200);

mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to receive a live SMS //mySerial.print("AT+CNMI=2,2,0,0,0\r");

//mySerial.print("AT+CNMI=1,2,0,0,0\r"); // AT Command to receive a live SMS delay(100); Serial.println("Ready"); }

void loop() { if (mySerial.available()>0) { // digitalWrite(4, HIGH); msg=mySerial.readString(); delay(20); Serial.print(msg); } }

Please help on this..

Thanks Rakesh Patel


It seems arduino nano is not able to fetch the data from the GSM module.. if i connect GSM module with TTL to USB converter.. i received the perfect string.. But with arduino no luck.

try to reduce 115200 to 9600

I did but no luck.. and other thing is the module is communicate on 115200 baud rate.

the example codes seems to me too simple. I have no experience with SIM800 but only with SIM900. The library code for receiving SMS with a SIM900 is like in the attachment.

As you can see there is much more commanding and checking.

Are you sure that your code is sufficient?

SMSexample.txt (8.95 KB)

Its seems this is the library API.

I have installed the library. I wanted to test the Arduino code for SMS receiving application.