salute to you for your support !!!
+CMS ERROR: 304 Invalid PDU mode parameter and time out error solved.
using SMS to text mode A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);
but every time obtain unreadSMSNum is 0 even if sended new message .SMS to text mode set according to your suggestion . but not enter in this loop for (int i = 0; i < unreadSMSNum; i++)
void loop
{
callInfo cinfo = checkCallStatus();
if (cinfo.direction == DIR_INCOMING)
{
Serial.println(cinfo.number);
hangUp();
A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);
unreadSMSNum =getUnreadSMSLocs(unreadSMSLocs, 30);
Serial.println("unreadSMSNum");
Serial.println(unreadSMSNum);
for (int i = 0; i < unreadSMSNum; i++)
{
Serial.print("New message at index: ");
Serial.println(unreadSMSLocs[i], DEC);
salute to you for your support !!! +CMS ERROR: 304 Invalid PDU mode parameter and time out error solved. using SMS to text mode A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);
but every time obtain unreadSMSNum is 0 even if sended new message .SMS to text mode set according to your suggestion . but not enter in this loop for (int i = 0; i < unreadSMSNum; i++)
void loop { callInfo cinfo = checkCallStatus(); if (cinfo.direction == DIR_INCOMING) { Serial.println(cinfo.number); hangUp(); A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL); unreadSMSNum =getUnreadSMSLocs(unreadSMSLocs, 30); Serial.println("unreadSMSNum"); Serial.println(unreadSMSNum); for (int i = 0; i < unreadSMSNum; i++) { Serial.print("New message at index: "); Serial.println(unreadSMSLocs[i], DEC);
}
and got the response like this
Issuing command: ATH Reply in 1055 ms: OK
Reply OK. Issuing command: AT+CMGF=1 Reply in 1055 ms: OK
Reply OK. Issuing command: AT+CMGL="REC UNREAD" Reply in 1058 ms: OK
Reply OK. unreadSMSNum 0 Issuing command: AT+CLCC Reply in 1055 ms: OK