We’re all familiar with SMS messages, after all it’s one of the oldest and most commonly used methods of mobile communication. But there’s a surprising amount of co-ordination and technology working in the background to send such seemingly simple messages. So let’s take a look at how it all works.
For a start – SMS stands for short messaging service, a protocol used for sending short messages over wireless networks. Unlike many services in use today, such as MMS and other data driven services, SMS still works on the fundamental voice network, and is based on the big three GSM, CDMA and TDMA network technologies, making it a universal service.
Related Content: What is Android [Back to the Basics]
SMS allows for text messages of 160 characters (letters, numbers and symbols) in length. Or for other alphabets, such as Chinese or Arabic, the maximum message size is limited to just 70 characters. Part of the reason for this is that SMS messaging was original considered as an afterthought added on to the spare bandwidth available on wireless voice networks. There was always a limit on how large these messages could be, hence why certain characters, such as foreign alphabets or obscure letters, still take up multiple spaces of the 160 allowance.
The 160 limit was eventually decided upon by Friedhelm Hillebrand, who observed and tested the typical number of characters in the average sentence, combined with a compromise on the available bandwidth at the time. Nowadays bandwidth isn’t so much of a concern, and messages can easily be sent back to back and recompiled on the receiving handset. The, now considered, low-bandwidth requirements of transmitting these short alphanumeric strings allows for worldwide messaging with very low latency.
The SMS standard
The SMS standard defines what information is sent in a text message, what bits of binary code make up each letter, and how this data is organised so that sending and receiving devices can communicate with each other. The actual data format for the message includes things like the length of the message, a time stamp, the destination phone number, and the actual message of course.
These details are described by the protocol description unit (PDU), which takes the form of a string of hexadecimal-octets and semi decimal-octets. Hexadecimal being values in base 16, with 0–9 to represent values zero to nine, and A, B, C, D, E and F to represent values ten to fifteen.
We won’t go into any more detail about binary, it’s sufficient to know that hexadecimal is just a more organised and efficient way of representing binary code, which is used by various devices to send, receive, and decypher the SMS message. The PDU format comprises of the following pieces of information in each text message. The first few octets contain information about where to send the message to, which short message center (SMC), and the sender’s own number as well. The length of the information also has to be defined in the string, so that the receiver knows exactly what to look for.
After the sender and receiver information comes a protocol identifier and a tag to identify the data encoding scheme used in the message, which will allowing different receivers to know how to decode the actual message. There’s also a time stamp and information on the length of the users message before the user’s actual message is encoded.
As for the message itself, as already mentioned it can contain up to 160 characters, where each character is defined by the 7-bits GSM alphabet. A 7-bit alphabet results in 128 (2^7) available letters, numbers, and pieces of punctuation which can be used to create a SMS message. For example, 48656C6C6F is the GSM alphabet equivalent of the word Hello.
The diagram below might help explain this whole standard a little better.
As you can see, there’s a lot more information sent with a SMS message than just a sentence or two. There’s other vital pieces of information which will help deliver the message to the correct recipient and make sure that every device in the delivery line can properly understand what’s being sent.
Sending the data
As for the actual transmission of a SMS, the text message from the sending mobile device is stored in a central SMC, which then forwards the message to the desired destination. As SMS messaging makes use of a separate channel, normally used for transfer of control messaging to transfer its packets, voice and data calls will not be interrupted by SMS transfer.
This control channel is usually used to track the cell that your phone is currently in, allowing you to change cells as you move around and so that calls and messages can be sent to the correct handsets in the correct locations.
As already mentioned, the SMC is in charge of storing and forwarding messages to and from the mobile station and other short message entities, which is typically a mobile phone. The benefit of storaging messages here is that several attempts can be made to deliver a message if the receiving device cannot be contacted. If a wireless recipient is switched off, out of range, or if there is a network outage, the SMS message will be stored in the network and delivered when the recipient becomes available again. Whilst this might not seem like such a revolutionary feature in the age of data driven messaging, at the time of its introduction this was the first technology to offer such a feature.
However, in order to figure out exactly where the message has to be sent, the SMC needs to be given the location of the recipient. This is where the Home Location Register (HLR) comes in handy. The HLR is a database that contains the information of all the network’s subscribers, and is responsible for matching phones to phone numbers, accounts, and with service plan information. But most importantly, it keeps track of the user’s location so that incoming calls and messages can be routed through to the correct network tower.
Once the message knows where to go the Mobile Switching Center (MSC) is in charge of switching the connection over to the correct mobile station. There’s also a Visitor Location Register attached to each MSC, which helps to narrow down the exact location of the cell where the receiving handset is currently located. The message is then finally transferred to the corresponding Base Station System (BSS).
The BSS consists of transceivers which send and receive information over the air, to and from the mobile station. This information is passed over the signalling channels so the mobile can receive messages even if a voice or data call is going on. The BSS is the final device that transmits the text message to the correct mobile. It’s a surprisingly long and complicated journey for just 160 characters.
SMS may have been the backbone of fast text communications for decades, but the standard is facing growing competition from alternative messaging services. In Western countries specifically, data based clients are becoming increasingly popular, and could well replace the faithful old SMS standard at some point the in the future, although that probably won’t be for quite a while yet.