In this post I will explain you, how to send long SMS or multipart SMS or concatenated SMS using at command. I am writing about most awaited post of my blog with great excitement. Before I explain you I want to share my experience during searching for the secret of long SMS. When I started searching on internet about “how to send concatenated sms”, I found resource on wiki which explains the basic of long SMS and PDU format for sending long SMS. But this page (wiki) contains link at bottom of the page and this link (trust me) one of the best resource on the internet to learn about concatenated SMS. Here is the link if you want to read this blog : http://mobiletidings.com/2009/02/18/combining-sms-messages/. But still I was having same problem not able to send long SMS using AT command. But reading this blog I was sure that I was missing something in my PDU which cause problem. Then I thought of taking help from someone who is master in this so I did contact Franco (owner of http://www.franco7777.net/), who is one of the commenter on “http://mobiletidings.com/2009/02/18/combining-sms-messages/” blog. He gave me very nice response and explained me where my mistake was. And after that I had got the clear idea about sending long SMS over network.
Now I want to show you how you can send long SMS. But before reading this post further I will strongly recommend you to read http://www.dreamfabric.com/sms/ and grab basic idea about SMS PDU structure. When you send single SMS ( <= 160 Character) there is not UDH exist in the message but when you try to send long SMS ( > 160 Character) you need to add this UDH field into the message PDU. So the basic question is how to add this header in to the message. One more thing you should know to send concatenated SMS, and the thing is when you send single SMS there is no User Data Header so little less confusion and you don’t need to add padding bit to encode your message into GSM 7-bit encoding scheme but if you are going to send concatenated SMS, UDHL is exist and it is in septets so you need to add one padding bit compulsory to encode your SMS. Read http://mobiletidings.com/2009/02/18/combining-sms-messages/ blog to get the clear idea because I don’t want to post same content again in this post.
So basically there are 2 secret to send long SMS
- Add User Data Header
- Add Padding bit to encode your message.
If I want to send
- Message 1: “This is Part 1.”
- Message 2: “This is Part 2. “
Message PDU should be
That’s it , you are done !!
Things to know before sending Long SMS is , UDH will occupy 6 octets so original message size should be reduce.
Please let me know if I am missing something so I can update this post.
I am getting lot of queries regarding Message PDU for single message and concatenated message. So What I have done is I have created a quick sample to generate PDU for single message and for multipart SMS.