SMS Messaging using sms-utils Package


sms-utils package provides a command line utility to send, list, read, delete SMS messages from your mobile device. It also provides utilities for encoding and decoding simple PDUs.

Note: sms-utils is supported on GSM radios only, such as the MTCDP-E1, G2, and H4 models (not EV2)


Copy sms.config.example to your home directory and edit it to fit.

  cp /usr/share/sms-utils/sms.config.example ${HOME}/.smsconfig
  vi ${HOME}/.smsconfig

Options found in your local .smsconfig override the compile time defaults. Command
line options override options in .smsconfig.

Sending messages

By default or when interactive mode is enabled and an editor is configured, sending
an SMS will pop you into your editor to create the message. The length of the
message will be truncated without warning to the maximum message length in the
selected alphabet. Seven-bit mode can contain up to 160 characters. Eight-bit mode
can contain up to 140 bytes.

To send an SMS to 1234567890 issue the command:

sms send 1234567890

If all goes well there should be no errors or warning messages
printed to stderr and the program should exit with 0.

The validity period is not configurable and will be set to 2 days out from
the time of send.

If the address specified contains any non-digit and non-command characters, the
selected phonebook will be searched for a match. In interactive mode a substring
search is performed and the user is prompted with any matches found. In
non-interactive mode an exact match must be found.

Listing messages

You can read the messages stored in the selected storage areas by issuing the

sms list all

If you only wanted to list unread messages then issue the command:

sms list unread

The output is in YAML which is both readable and easily parsed. Other output formats
such as XML could be added as well.

Reading messages

To read the message at index 1 issue the command:

sms read 1

After the read command completes the message at index 1 will be
marked as read.

Deleting messages

You can delete a message by its status {unread, read, sent, unsent}, by index, or
all messages.

To delete a message at index 1 issue the command:

sms delete index 1

To delete all messages issue the command:

sms delete all

To delete only read messages issue:

sms delete read