Skip to content

Instantly share code, notes, and snippets.

@cfra cfra/sendmsg.gcom
Last active Jul 16, 2016

Embed
What would you like to do?
comgt/gcom script to send textmessage/SMS with umts stick
#
# export DEST as E164 number and MSG as text message content
# then call:
#
# comgt -v -d /dev/ttyUSB2 /etc/gcom/sendmsg.gcom
#
# where /dev/ttyUSB2 is the console of your UMTS modem
#
opengt
set com 115200n81
set comecho on
set senddelay 0.02
waitquiet 1 0.2
flash 0.1
send "AT+CMGF=1^m"
waitfor 1 "OK"
if % != 0 goto msgerror
send "AT+CMGS=\""
send $env("DEST")
send "\"^m"
waitfor 1 ">"
if % != 0 goto msgerror
send $env("MSG")
send "^Z"
waitfor 5 "OK"
if % != 0 goto msgerror
exit 0
:msgerror
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.