Skip to content

Instantly share code, notes, and snippets.

@wuseman
Created August 25, 2022 15:37
Embed
What would you like to do?
Send sms via AT
// 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