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: https://www.aliexpress.com/item/mini-A6-GPRS-GSM-Kit-Wireless-Extension-Module-Board-Antenna-Tested-Worldwide-Store-for-SIM800L/32710017861.html
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);
mySerial.begin(115200); // Setting the baud rate of GSM Module
//mySerial.print("AT+CMGF=1r"); // set SMS mode to text
mySerial.print("AT+CMGF=1\r"); // set SMS mode to text
mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to receive a live SMS
//mySerial.print("AT+CNMI=1,2,0,0,0\r"); // AT Command to receive a live SMS
// digitalWrite(4, HIGH);
Please help on this..
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?
Its seems this is the library API.
I have installed the library. I wanted to test the Arduino code for SMS receiving application.