{"id":728,"date":"2010-04-27T11:13:32","date_gmt":"2010-04-27T16:13:32","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=728"},"modified":"2012-08-29T13:58:00","modified_gmt":"2012-08-29T18:58:00","slug":"sms-utils","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/corecdp\/applications\/sms-utils\/","title":{"rendered":"SMS Messaging using sms-utils Package"},"content":{"rendered":"<h4>Description<\/h4>\n<p><strong>sms-utils<\/strong> 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.<\/p>\n<div class=\"note\">Note: sms-utils is supported on GSM radios only, such as the MTCDP-E1, G2, and H4 models (not EV2)<\/div>\n<h4>Setup<\/h4>\n<p>Copy sms.config.example to your home directory and edit it to fit.<\/p>\n<pre class=\"brush:text\">\r\n  cp \/usr\/share\/sms-utils\/sms.config.example ${HOME}\/.smsconfig\r\n  vi ${HOME}\/.smsconfig\r\n  ...\r\n<\/pre>\n<p>Options found in your local .smsconfig override the compile time defaults. Command<br \/>\nline options override options in .smsconfig.<\/p>\n<h4>Sending messages<\/h4>\n<p>By default or when interactive mode is enabled and an editor is configured, sending<br \/>\nan SMS will pop you into your editor to create the message. The length of the<br \/>\nmessage will be truncated without warning to the maximum message length in the<br \/>\nselected alphabet. Seven-bit mode can contain up to 160 characters. Eight-bit mode<br \/>\ncan contain up to 140 bytes.<\/p>\n<p>To send an SMS to 1234567890 issue the command:<\/p>\n<pre class=\"brush:text\">\r\nsms send 1234567890\r\n<\/pre>\n<p>If all goes well there should be no errors or warning messages<br \/>\nprinted to stderr and the program should exit with 0.<\/p>\n<p>The validity period is not configurable and will be set to 2 days out from<br \/>\nthe time of send.<\/p>\n<p>If the address specified contains any non-digit and non-command characters, the<br \/>\nselected phonebook will be searched for a match. In interactive mode a substring<br \/>\nsearch is performed and the user is prompted with any matches found. In<br \/>\nnon-interactive mode an exact match must be found.<\/p>\n<h4>Listing messages<\/h4>\n<p>You can read the messages stored in the selected storage areas by issuing the<br \/>\ncommand:<\/p>\n<pre class=\"brush:text\">\r\nsms list all\r\n<\/pre>\n<p>If you only wanted to list unread messages then issue the command:<\/p>\n<pre class=\"brush:text\">\r\nsms list unread\r\n<\/pre>\n<p>The output is in YAML which is both readable and easily parsed. Other output formats<br \/>\nsuch as XML could be added as well.<\/p>\n<h4>Reading messages<\/h4>\n<p>To read the message at index 1 issue the command:<\/p>\n<pre class=\"brush:text\">\r\nsms read 1\r\n<\/pre>\n<p>After the read command completes the message at index 1 will be<br \/>\nmarked as read.<\/p>\n<h4>Deleting messages<\/h4>\n<p>You can delete a message by its status {unread, read, sent, unsent}, by index, or<br \/>\nall messages.<\/p>\n<p>To delete a message at index 1 issue the command:<\/p>\n<pre class=\"brush:text\">\r\nsms delete index 1\r\n<\/pre>\n<p>To delete all messages issue the command:<\/p>\n<pre class=\"brush:text\">\r\nsms delete all\r\n<\/pre>\n<p>To delete only read messages issue:<\/p>\n<pre class=\"brush:text\">\r\nsms delete read\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Description 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) Setup Copy sms.config.example to your home directory and [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":324,"menu_order":99,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-728","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=728"}],"version-history":[{"count":12,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/728\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/728\/revisions\/739"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/324"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}