0

GSM SMS
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

GSM SMS

by anshumanmuj on Sat Jan 14, 2017 9:12 am

hello,
i have been successful in sending SMS through the GSM module, but i am not able to figure out a way to let the controller know that the message has been sent/received.

i want to display a confirmation text if the sms was sent successfully , otherwise print sms senfing failed.

how can i do so???

anshumanmuj
 
Posts: 6
Joined: Thu Dec 15, 2016 10:27 am

Re: GSM SMS

by adafruit_support_rick on Mon Jan 16, 2017 10:46 am

If you're using the Adafruit FONA library, just do it this way:
Code: Select all | TOGGLE FULL SIZE
        if (!fona.sendSMS(sendto, message)) {
          Serial.println(F("Failed"));
        } else {
          Serial.println(F("Sent!"));
        }

Otherwise, if the send was successful, you'll get "OK" back, else you get an error

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.