Go Down

Topic: Problem with endSMS() in asynchronous call (Read 2382 times) previous topic - next topic

jogrey

Hello,

I have a problem sending SMS and retreiving the result status :

Code: [Select]
_GSM_SMS.beginSMS(sms->getRemoteTel().c_str());
delay(1000UL);
_GSM_SMS.print(sms->getMessage().c_str());
delay(1000UL);

while( _GSM_SMS.endSMS() != 1 && tries < MAX_SEND_SMS_TRIES )
{
delay(100UL);
tries++;
}


Very often, the sms is being sent correctly, but, i never get the status "1", i tried to wait long time, even after the sms reception but nothing., i also tried to change/delete the delays, but without success, this case can arrive at any moment.

I noticed this case can occur when i have more than one pending sms.

Have you already encounter such a problem ? How did figure to solve it ?

Thank you.

Go Up