What is SMS?| Full form and SMS protocol tutorial.


Know all about the Text.

SMS is an abbreviation for Short Message Service. It is an essential service provided by all GSM mobile operators. The service enables subscribers to send and receive text messages using an active SIM card on a mobile phone. The sender/receiver of the message could be a mobile subscriber or a third-party application. The bulk SMS tutorial discussed SMS flows between a mobile device and a software application.

What is SMS protocol?

GSM 03.40 specifies the 3GPP standard for short message service implementation. The protocol specification contains information about message components and the encoding/decoding of parameters.

SMS is an abbreviation for short message service, which means it adheres to a protocol-based message format and call flow. The following section will discuss service subscriptions, and call flows in a GSM network.

How does the text service gets provisioned?

When a subscriber purchases a new SIM card, the mobile operator configures the subscription for the sim card in HLR. The sim card subscription includes configuration for teleservices and other services.

For SMS, teleservices MO-SMS (code 33) and MT-SMS (code 34) must be provisioned and active on HLR to use text functionality.

How does the SMS service gets activated while roaming?

During the initial registration of a sim card on a mobile network. The HLR transfers the teleservice list to the roaming VLR/MSC through an insert subscriber data map protocol message.

When sending Mobile Originated text, VLR checks with the subscriber to see if the MO-SMS service is active. If it is, the text is sent from VLR to the SMSC. Otherwise, the subscriber receives an error message.

For a mobile terminated text (MT-SMS), sender SMSC, look up with the receiver HLR, using MSISDN or phone number. If HLR doesn’t have MT-SMS teleservice configured and active for the destination mobile number, mobile terminated SMS fails. Else HLR returns roaming information and IMSI in the response.  The tutorial on map protocol mentions gsm network flows for Mobile Originated and mobile-terminated texts.

SMS protocol has the following components: 

Validity Time:

Text lifetime in the network is the validity time. When a mobile subscriber sends a text to any other subscriber.  After pressing the send button, the MO-SMS  protocol message originates from MSC and reaches the SMSC.

If all is good, SMSC keeps the text and tries to deliver it to the destination phone number. SMSC does a location lookup (uses SRI-SM MAP message over SS7/Sigtran) from destination HLR to deliver. If the response is a user error (e.g., unreachable subscriber), SMSC stores and tries after an interval. If the total time exceeds the validity time, the message is dropped.

Message Waiting Data:

After HLR lookup, SMSC gets the visiting MSC and IMSI of the mobile subscriber.  Using location and IMSI, SMSC sends the text to visiting MSC. If visiting MSC fails to deliver the message to a mobile device, SMSC may send Message Waiting Data on HLR. So that once the error is recovered, HLR sends an Alert Service Center message to the SMSC. If the validity time is not over, SMSC will again try to deliver the message to the mobile subscriber.

More Messages to Send:

According to the gsm standard, a text message on the wire can be a maximum of 160 bytes long. But a mobile subscriber may send a long (more than 160 bytes) message. This requires segmentation and reassembly of a lengthy message on SMSC and device.

For MO-SMS, VLR segments the long message into 160 bytes smaller messages. Each small message has a segmentation number and indicates to the receiving side that more segments are yet to come. SMSC does reassembly and stores the entire message.  Once the SMS is successfully submitted, SMSC starts the MT-SMS procedure.

For MT-SMS, SMSC does segmentation, and VLR does the reassembly. SMS protocol has two parameters, named more-message and segment number. If no more message to send flag is set, the receiver side assembles all received segments.

Service Center Time Stamp:

The timestamp an SMSC sends to the mobile device in an MT SMS is the arrival time of the SMS at the service center. This should be unique in all messages delivered to the same subscriber number. A unique timestamp is generated if two or more messages arrive within a second. The difference is kept at a minimum in-between time stamps.

Priority: 

SMSC uses this field to attempt to deliver a message which failed earlier. The failure was temporary (e.g., no more capacity in mobile).  SMSC, don’t wait for HLR to send an alert service center.

Protocol Identifier: 

This is a one-byte parameter. Define how the mobile device will handle the message. The OTA message uses a different PID than standard text messages.

SMS protocol PDU Types:

SMS-Deliver: Sent from SMSC to the mobile device. When a Mobile terminates SMS from the roaming SMSC, the MT-ForwardsSM or Forwards-SM goes from SMSC to MSC. In version 2 of the gsm map protocol, the MSC decides whether SMS is mobile-originated or mobile-terminated based on the PDU type.

SMSC-Submit: Sent from mobile to SMSC. The gsm map operation is Mo-forwards sm in version 3; in version 2, it is Forward-SM. Again on PDU type, SMSC decides if it’s a MO or MT SMS request.