GSM SIM900A throwing error when sending sms

Can someone please help me out.
I am trying to send phone number via serial monitor to eeprom of arduino and use the same data from eeprom to send sms via AT command.
after the handshaking, at AT+CMGS i am getting error .
Syntax : SIM900.write(("AT+CMGS="" + retrievedString + """).c_str());
retrievedstring = my phone number saved in eeprom.

looks like there is something wrong with your double quotes. If you need a double quote in your text, you will have to escape it with a backslash.

SIM900.write(("AT+CMGS=\"" + retrievedString + "\"").c_str());

Yes, I tried this syntax as well.
SIM900.write(("AT+CMGS="" + retrievedString + """).c_str());

But still I am getting the error

my concern is when i do the following:

  1. saved hardcoded phone no in eeprom and send sms, it is working.
  2. sending phone no via serial monitor to eeprom and send sms - is throwing me error.
    Even if i give at+cmee = 1 or 2, i am not getting the description of error msg.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.