i am using SIM900 gsm module and an arduino uno, i have a function for listing messages using AT command CMGL but when i try to call it, it just give me a response of OK but no list of SMS, what is wrong with this? should i first delete other messages from other phones? i dont know what to do pls help
void loop()
{
if (Serial.available() > 0)
switch (Serial.read())
{
case 's':
SendMessage();
break;
case 'r':
RecieveMessage();
break;
case 'l':
list_sms();
break;
}
if(mySerial.available() >0)
{
Serial.write(mySerial.read());
}
}
void list_sms() {
Serial.print("listing...");
mySerial.print("AT+CMGL=\"ALL\"\r");
delay(1000);
}