erdemarslan / GSMSim

GSM Library for SIMCOM Modules on Arduino.
MIT License
124 stars 56 forks source link

sms.deleteAll() and sms.deleteAllRead() not working, index not starting at 1 and SMS missing? #43

Open ROdoka opened 2 years ago

ROdoka commented 2 years ago

It seems both functions don't work or I'm doing it wrong:

Serial.println(sms.deleteAll()); and I see a 0 in the serial monitor. If I delete an SMS using sms.deleteOne(idx); I get a 1 if the SMS with index exists.

While testing this lib I had received 2 SMS but their index was 21 and 22. What about 0 to 20? Before switching to this lib I was using just serial communication to do some tests with the SIM800L. I already had received 2 more SMS before switching, but I don't see them with this lib. Could it be that the lib uses a different memory location on the module compared to using a new module with just serial com?

Best regards, Robert

hmnhghprst commented 1 year ago

Hi @ROdoka , When I was using this library I encountered the same issue. You can fix it with this code instead of deleteAll() function : sms.sendATCommand("AT+CMGDA=\"DEL ALL\"");