adafruit / Adafruit_FONA

Arduino library for the Adafruit FONA
https://www.adafruit.com/products/1946
211 stars 237 forks source link

getNumSMS failed with FONA 800 uFL #46

Closed king-jam closed 8 years ago

king-jam commented 8 years ago

Recently purchased a module and found that:

    if (! sendParseReply(F("AT+CPMS?"), F("\"SM\","), &numsms) ) return -1;
  } else {
    if (! sendParseReply(F("AT+CPMS?"), F("+CPMS: \"SM_P\","), &numsms) ) return -1;
  }

https://github.com/adafruit/Adafruit_FONA_Library/blob/master/Adafruit_FONA.cpp#L483

needs to be changed to:

    if (! sendParseReply(F("AT+CPMS?"), F("\"SM\","), &numsms) ) return -1;
  } else {
    if (! sendParseReply(F("AT+CPMS?"), F("+CPMS: \"SM\","), &numsms) ) return -1;
  }

I don't know the scope of this issue or if I have a one off firmware rev on the SIM800 but might be worth looking into.

ladyada commented 8 years ago

do you have a SIM800L or SIM800H? can you check?

king-jam commented 8 years ago

Apologies, SIM800H.

ladyada commented 8 years ago

mind grabbing the very latest lib ad trying again? we now check for SM_P as well as SM

king-jam commented 8 years ago

Tested and verified it is working. Thanks for the fix!