Send sms via AT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Script-send_sms_text_mode.at | |
// Send SMS in Text Mode via /dev/tty[A-Z]CM[0-9] | |
//List of supported responses | |
AT+CMGF=? | |
// WAIT for 1 sec | |
WAIT=1 | |
// Get the current SMS Mode | |
// 0 – PDU Mode, 1- Text Mode, | |
AT+CMGF? | |
//WAIT for 1 sec | |
WAIT=1 | |
// Check whether device is registered | |
// If device is not registered, SMS cannot be sent | |
AT+CREG? | |
//First let us send SMS in text mode | |
AT+CMGF=1 | |
//WAIT for 1 sec | |
WAIT=1 | |
//Send the message. Set your To number below | |
AT+CMGS=”+46xc″ | |
//Wait for the > prompt | |
WAIT=2 | |
//Type the SMS text below | |
Hello World, this is wuserman saying hi | |
//Send the CTRL+Z character. ^z is special command of AT Command Script engine. | |
^z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment