Developers guide
Chapter 22: Wireless Wide-Area Networking
Using SMS (Short Message Service)
Psion Teklogix Mobile Devices SDK Developers Guide 215
22.10 Using SMS (Short Message Service)
SMS (Short Message Service) is available on GSM networks. It allows text messages of up to 160
characters to be sent and received through the network operator’s SMS gateway. If the receiver is
powered off or out of range, messages are stored in the network and delivered at the first
opportunity.
On Psion Teklogix systems, SMS messages are stored on a SIM card, or in the WWAN modem.
At startup, initialization of the SIM card takes more time than initialization of the modem.
When callbacks are used to track initialization, typically the application is notified of the ready
status of the modem, and then some time later it is notified of the ready status of the SIM card.
Only then are the SMS functions available. Some modems do not support SMS; in these cases the
SMS ready status never occurs.
Incoming SMS messages are stored on one or several mailboxes. The mailbox is a logical entity.
The mailboxes are numbered sequentially—the mailbox index—starting from 0 (zero) for the first
mailbox. Within each mailbox the messages are numbered sequentially—the message index.
Deleting a message can cause the mailbox to have gaps in its sequence of message indices (for ex-
ample, deleting message #2 from a mailbox containing messages at indices 1, 2, and 3 results in
messages at indices 1 and 3). An application must take this into account when retrieving mes-
sages. Functions are provided for obtaining the number of mailboxes, the current message pointer,
and the maximum numbers of messages in each mailbox.
Some mailboxes are writable, this means that sent messages can be stored in the mailbox.
When SMS functions are called, an SMS location structure is passed in as a parameter. The SMS
location structure holds the mailbox index and the message index within the mailbox.
If a callback is registered for incoming SMS messages, a location structure is returned by the call-
back that specifies the mailbox index and the message index. This location structure can be passed
to subsequent SMS calls that process the incoming SMS message. It is recommended that applica-
tions query the location of each message, and not make assumptions about where the modem put
the message.
Most modems have only one mailbox that is stored on the SIM card. A few modems have a
second mailbox that is stored in the modem itself. The Mobile Devices SDK provides information
on the number and structure of the mailboxes. Normally, the modem automatically selects the
mailbox for an incoming message. When one mailbox is full, the modem starts filling the next
one. To make mailboxes portable between hand-held computers, an application can force a
mailbox to be on the SIM card.
22.10.1 SMS API Elements
C++: SMS on all Psion Teklogix Windows CE computers is controlled using the
PsionTeklogix::WWAN namespace.
Java: Not available.
.NET: SMS on all Psion Teklogix Windows CE computers is controlled using the
PsionTeklogix.WWAN namespace.