gsmsendsms - SMS message sender utility
[ -b baudrate
] [ --baudrate
] [ -c concatenatedID
] [ --concatenate
] [ -C service centre address
--sca service centre address
] [ -d device
] [ -h
] [ --help
] [ -I
] [ --init init string
] [ -r
] [ -t
] [ --test
] [ -v
] [ -X
] [ --xonxoff
sends SMS short messages using an GSM mobile phone.
attaches itself to the device
given on the command line
(usually an GSM modem) using the specified baudrate
. If no
is given, the device /dev/mobilephone
is used. If no
is given, a default baud rate of 38400 is used.
accepts a phone number (recipient address) and the short
message text as parameters. The text may have a maximum length of 160
characters which is the maximum SMS message length. The GSM default alphabet
is used for encoding. ASCII and Latin-1 characters that can not be encoded
using the GSM default alphabet are converted to the GSM delta character (GSM
Error messages are printed to the standard error output. If the program
terminates on error the error code 1 is returned.
- -b baudrate, --baudrate
- The baud rate to use.
- -c concatenatedID, --concatenate
- If an ID is given, large SMSs are split into several,
concatenated SMSs. All SMSs have the same ID and are numbered
consecutively so that the receiving phone can assemble them in the correct
order. IDs must be in the range 0..255. Not all receiving phones will
support concatenated SMSs (and display them as separate SMSs), since all
the numbering and ID information is carried in the user data header
element at the beginning of the SMS user data. This information may show
up as garbage in such phones.
- -C service centre address, --sca
service centre address
- Sets the service centre address to use for all SUBMIT SMSs
(may not work with some phones).
- -d device, --device device
- The device to which the GSM modem is connected. The default
- -h, --help
- Prints an option summary.
- -I init string, --init init
- Initialization string to send to the TA (default:
"E0"). Note that the sequence "ATZ" is sent
- -r, --requeststat
- Request status reports for sent SMS.
- -t, --test
- If this option is given the text is converted to the GSM
default alphabet and back to Latin-1. This option can be used to find out
how ASCII or Latin-1 texts are converted to the GSM default alphabet.
Characters that can not be converted to the GSM default alphabet are
reported as ASCII code 172 (Latin-1 boolean "not") after this
double conversion. No SMS messages are sent, a connection to a mobile
phone is not established.
- -v, --version
- Prints the program version.
- -X, --xonxoff
- Uses software handshaking (XON/XOFF) for accessing the
The following two invocations of gsmsendsms
each send the same SMS
message to the number "1234":
gsmsendsms -d /dev/ttyS2 -b 19200 1234 "This is a test."
echo "This is a test." | gsmsendsms -d /dev/ttyS2 -b 19200 1234
- Default mobile phone device.
Peter Hofmann <firstname.lastname@example.org>
Report bugs to email@example.com. Include a complete, self-contained example that
will allow the bug to be reproduced, and say which version of
you are using.
Copyright © 1999 Peter Hofmann
is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any later
is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
You should have received a copy of the GNU Library General Public License along
; see the file COPYING. If not, write to the Free
Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
gsminfo(7), gsmpb(1), gsmctl(1), gsmsmsd(8),