SMS Stack Architecture

The SMS Stack is a plug-in to the socket server. This section provides the architectural relationships of the SMS stack.

SMS stack components

  1. SMSPROT - The SMS stack protocol module

  2. GSMU - GSM Utility class

  3. SMSU - SMS Utility class

SMSPROT

SMSPROT.prt is a socket server (ESOCK) plug-in DLL implemented with a protocol module suffix PRT. The main functions of the SMS protocol module are to send queues, receive queues and maintain the connection to the socket server. For more information about SMSPROT, see SMS Protocol Modules.

GSMU

The GSM Utility (GSMU) class provides some utility functions for the SMS stack. The SMS messages are represented by a CSmsMessage object of the GSMU class. GSMU also provide methods to send and receive the SMS messages through the socket server. For more information about GSMU, see GSM Utilities.

SMSU

The SMS Utility (SMSU) class provides the base class for active objects of the SMS stack. For more information about SMSU, see SMS Utilities.

Figure 1. SMS Stack Architectural Relationships

When a client application requests a service from the SMS stack, the SMS stack is loaded by the socket server. The main SMS stack clients are the messaging application, the WAP stack and the third party applications. The WAP stack binds directly to the SMS stack. The messaging applications and other third party applications access the SMS stack as the clients of the socket server.

The SMS stack communicates with the ETel (Telephony) server to send, receive, read, write and delete the SMS messages from the Subscriber Identity Module (SIM).

The SMS stack uses the message store called as the reassembly store to store the messages passed by the Telephony System plug-in (TSY). The stored messages are then processed.

Stack initialisation

The socket server loads the SMS stack. The socket server loads the stack when one of the clients requests a session with the stack. The load the SMS stack, the socket server searches for the smswap.sms.esk file. The ESK files contain the details of the DLL which creates the SMS stack. The smswap.sms.esk file is located at epoc32\data\z\private\101F7989\SOCKET and epoc32\wins\c\private\101f7989.


#smswap.sms.esk

[sockman]
protocols= sms

[sms]
filename= SMSPROT.PRT
index= 1

The SMS stack is initialised and loaded when the first client makes a request to the stack through the socket server. The SMS stack is unloaded when the last client disconnects. The ESK file is used to customise different time out values.For more information see Configuration.

SMS communication

The three main components that enable applications to send and receive SMS messages are the baseband signalling stack, Telephony system plug-in (TSY) and the SMS stack. The SMS stack communicates with the baseband signalling stack through the TSY to send and receive the messages from the network. The different types of receive modes are defined in the TMobileSmsReceiveMode class. Receive modes describe how a message is processed by the SMS stack.

EReceiveStored

In EReceiveStored mode, the baseband stack stores the incoming SMS messages. The baseband stack acknowledges to the network before it passes the SMS to the TSY. The message is then passed to the SMS stack for processing. The message is stored in the reassembly store until it is processed. If the processing is successful, a positive acknowledgement is sent to the TSY. If the processing is unsuccessful, a negative acknowledgement is sent to the TSY and the message is processed later by sending a resume command to the TSY. Since the message is stored in the baseband stack it is not lost due to lack of memory in the SMS stack. The disadvantage of this method is that the network is acknowledged even if the message is not passed to the messaging client.

EReceiveUnstoredPhoneAck

In EReceiveUnstoredPhoneAck mode, the message is acknowledged as soon as it is received by the baseband stack but it is the responsibility of the SMS stack that stores and processes the message. The disadvantage of this mode is that if sufficient memory or disk space is not available the message is lost. The network does not resend the message because of the positive acknowledgement was sent by the baseband stack.

EReceiveUnstoredClientAck

In EReceiveUnstoredClientAck mode the baseband stack does not store or acknowledge any incoming SMS messages. The SMS stack has the responsibility to store and acknowledge the received SMS. If sufficient memory is not available the SMS stack rejects the incoming message and sends a negative acknowledgement to the network. The network does not send any other SMS to the device until it receives a resume request from the device. The resume request is initiated by the SMS stack.

Two other modes specified in the TMobileSmsReceiveMode class, they are EReceiveModeUnspecified and EReceiveEither. For more information about the enumerations see the cpp reference documentation.