Sony Ericsson Construction of SMS PDU’s Application Note
Sony Ericsson Construction of SMS PDU’s Application Note

Sony Ericsson Construction of SMS PDU’s Application Note

Advertisement

Application Note
Construction of SMS PDU's

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Construction of SMS PDU’s and is the answer not in the manual?

Questions and answers

Summary of Contents for Sony Ericsson Construction of SMS PDU’s

  • Page 1 Application Note Construction of SMS PDU’s...
  • Page 2 First edition (June 2003) Sony Ericsson Mobile Communications. publishes this manual without making any warranty as to the content contained herein. Further Sony Ericsson Mobile Communications. reserves the right to make modifications, additions and deletions to this manual due to typographical errors, inaccurate information, or improvements to programs and/or equipment at any time and without notice.
  • Page 3: Table Of Contents

    Construction of SMS PDU’s Contents INTRODUCTION........................4 ABOUT SMS.......................... 5 WHAT IS A PDU?........................5 ...................... 6 RANSMISSION ORDER ......................7 EPRESENTATIONS SMS-SUBMIT ........................8 (SCA)................8 ERVICE ENTER DDRESS (TP-MTI ) ................. 11 HE NEXT OCTET AND FRIENDS 4.2.1 Message Type indicator (TP-MTI) .................
  • Page 4: Introduction

    Construction of SMS PDU’s Introduction This document is to help an integrator in getting started with sending SMS messages in the PDU format. Enough information is given here for anyone to begin constructing the most basic PDU’s and send them, using AT commands, from one GSM module/mobile to another.
  • Page 5: About Sms

    Construction of SMS PDU’s 2 About SMS SMS, as you already probably know stands for Short Message Service. SMS provides a means of sending messages of limited size from and to GSM mobile stations. SMS makes use of something called a Service Centre, which acts as a store and forward centre for the SMS messages.
  • Page 6: Transmission Order

    Construction of SMS PDU’s Related to Mobile terminated SMS, an SMS that is received by a Mobile from the Service centre is SMS-DELIVER PDU. What does a PDU look like? Well, just to complicate things a PDU is a Service Centre Address (SCA), followed by a Transport Protocol Data Unit.
  • Page 7: Representations

    Construction of SMS PDU’s We could write a table a table using the binary representation: BINARY REPRESENTATION OCTET The transmission order would be as follows (the first bit sent being the rightmost): 11100000111111111111111100000011→ 3.2 Representations There are a few different meanings given to the hexadecimal representations.
  • Page 8: Sms-Submit

    Construction of SMS PDU’s 4 SMS-Submit Recall that an SMS-SUBIT type PDU is what we want to send to another mobile. It is what we “submit” to the service centre to be delivered to the chosen destination. To understand the various field of a TPDU of type SMS-SUBMIT it is best to begin with an example and then break the TPDU down into its various fields.
  • Page 9 Construction of SMS PDU’s The digits 9 and 9 The digit 9. Since there are an odd number of digits in this SCA then the bits 4-7 in this octet are fill bits. We can look in more detail at the Type of Address Octet: Type-of-number Numbering-plan-identification The values for the two fields, Type of number and numbering plan...
  • Page 10 Construction of SMS PDU’s 1 0 0 1 Private numbering plan 1 0 1 0 ERMES numbering plan 1 1 1 1 Reserved for extension All other values are reserved. Now going back to our example we have enough information to understand the SCA address: 07916407058099F9 First we know that after the first octet, there are 7 octets to follow in the...
  • Page 11: The Next Octet (Tp-Mti And Friends)

    Construction of SMS PDU’s As we have talked about before in the earlier sections, it is possible to use the default SCA stored on a SIM card. The SCA is just replaced with a 00, which means that the SCA is of zero length. The mobile or module should be intelligent enough then to find the SCA on the SIM.
  • Page 12: Reject Duplicates (Tp-Rd)

    Construction of SMS PDU’s In this document we are only going to consider SMS-SUBMIT and SMS- DELIVER PDU’s. 4.2.2 Reject Duplicates (TP-RD) This 1-bit flag located in Bit 2 of the octet in question. This field indicates whether or not the Service Centre shall accept an “identical” SMS from the same originating Mobile when the original SMS is still held at the Service Centre.
  • Page 13: User Data Header Indicator (Tp-Udhi)

    Construction of SMS PDU’s 4.2.5 User Data header Indicator (TP-UDHI) Again this is another 1-bit field found in bit 6 of the octet in question. This parameter describes what the User Data field, TP-UD, (explained further down) will contain. If the value is 1 then the User Data field will contain a User Data Header in addition to the short message, otherwise just the short message.
  • Page 14: Message Reference Field (Tp-Mr)

    Construction of SMS PDU’s So we see that TP-MTI is set to 01 and we are sending an SMS from the mobile to the Service Centre, and therefore it says that this is a PDU of type SMS-SUBMIT (as if we needed telling). TP-RD is 0, so we don’t want the Service Centre to reject any duplicates that we may send.
  • Page 15: Protocol Identifier (Tp-Pid)

    Construction of SMS PDU’s The rest is identical to the Service Centre Address as we discussed above. Lets break down the destination address we have in our example: 0A817060789620 BINARY REPRESENTATION FIELD MEANING OCTET ADDRESS LENGTH: This is the number of digits in the Destination mobile subscriber number.
  • Page 16: Data Coding Scheme

    Construction of SMS PDU’s 07916407058099F911000A8170607896200000A71554747A0E4ACF416 110945805B5CBF379F85C06 The use of this octet is very interesting. It provides some useful functionality for SMS. The octet describes the higher-level protocols or interworking devices, which the SMS is intended for, or has arrived from. What does this mean in English? The Service Centre of your network operator may support certain services, for instance it may be capable of converting your SMS to Email,...
  • Page 17 Construction of SMS PDU’s Class 0 Class 1 Default meaning: ME-specific. Class 2 SIM specific message Class 3 Default meaning: TE specific (see GSM 07.05) Bits 3 and 2 indicate the alphabet being used, as follows: Bit 3 Bit2 Alphabet: Default alphabet 8 bit data UCS2 (16bit)
  • Page 18 Construction of SMS PDU’s UCS2 alphabet. Data coding/message class Bit 3 is reserved and set to 0. Bit 2 Message coding: Default alphabet 1111 8-bit data Bit 1 Bit 0 Message Class: Class 0 Class 1 ME-specific. Class 2 SIM-specific Class 3 TE specific (see GSM 07.05) Lets look at some of the properties of the table above.
  • Page 19: Validity Period (Tp-Vp)

    Construction of SMS PDU’s For a deeper explanation and more information regarding the different SMS classes and their use see the GSM specification 03.38. In our example we see that we have chosen the value 00, which implies a classless SMS. According to the table above this means that our Data will use the default GSM alphabet and is intended for mobile-to-mobile communication.
  • Page 20: User Data Length

    Construction of SMS PDU’s C5-FF 197-255 (TP-VP-192) x 1week The value in our TP-VP field is A7. Using the table above we can calculate the Validity Period. A7hex = 167decimal From the table the formula to use is 12hrs+((TP-VP-143) x 30mins). 12hrs+ ((167-143) x 30 mins) = 12hrs+ (24 x 30mins) = 12hrs + 12hrs =24 hrs Therefore, we have a validity period of one day.
  • Page 21 Construction of SMS PDU’s And as we have already pointed out our data represents characters of the Default GSM alphabet. From the previous section we also saw that we are sending 21 characters. How can we squeeze 21 characters into those 19 octets? The answer is that we are using the default 7-bit GSM alphabet.
  • Page 22 Construction of SMS PDU’s To read from the table is easy. Lets say that we wanted the value for the character “A” then remembering that it is a 7-bit alphabet (no bit number 7 or bit number 7 is set to zero always), bits 6-4 =100 and bits 3-0 =0001. Therefore, we have value 01000001=41hex.
  • Page 23 Construction of SMS PDU’s 1) The order of transmission as described earlier. 2) The character “T” from the GSM table is given as 54hex. This is not the same as we see above (D4hex). One cannot directly translate. However if one was sending 8-bit data, and interpreting it as an 8-bit alphabet then a direct translation would be possible.
  • Page 24 Construction of SMS PDU’s 1110011 =”s” 0100000 =” “ (space) We have our first 8 characters in the message “This is a PDU message”. Of course, this could be simplified if one was to write a program to do the conversion.
  • Page 25: Sms-Deliver

    Construction of SMS PDU’s 5 SMS-Deliver We can now go through exactly the same procedure for an SMS of type SMS-DELIVER, breaking it down into its relevant fields and octets. Remember that an SMS-DELIVER SMS is what a mobile phone would receive from the Service Centre.
  • Page 26: Message Type Indicator (Tp-Mti)

    Construction of SMS PDU’s Bits 3 and 4 are not used and are set to 0. 5.2.1 Message Type indicator (TP-MTI) We are already acquainted with this field. This just tells us what type of SMS we are dealing with. See the earlier sections for more details. 5.2.2 More Messages to Send (TP-MMS) This 1-bit field informs the receiver if there are any more messages waiting at the Service Centre.
  • Page 27: Reply Path (Tp-Rp)

    Construction of SMS PDU’s 5.2.5 Reply Path (TP-RP) Again this field has already been discussed in the SMS-SUBMIT PDU. This parameter says if a reply is requested from the receiving mobile station. See above for more details. 5.2.6 Back to our example Lets begin to look at our example and see what information we have.
  • Page 28: Protocol Identifier

    Construction of SMS PDU’s Lets decipher our example and see what the originating Mobile Number is. 07916407058099F9040B916407752743F6000099012101758000155474 7A0E4ACF416110945805B5CBF379F85C06 We see that the Originating Address is 0B916407752743F6 we expect the number to have 11 digits. the number is an International number and that it uses the ISDN/telephone numbering plan.
  • Page 29: User Data

    Construction of SMS PDU’s When an SMS-SUBMIT PDU reaches the Service Centre it is Time stamped by the Service Centre. The Time Stamp gives the time when the SMS-SUBMIT PDU was received by the Service Centre (i.e. this is the time it was sent).
  • Page 30 Construction of SMS PDU’s 07916407058099F9040B916407752743F6000099012101758000155474 7A0E4ACF416110945805B5CBF379F85C06 Now we have seen the two most useful PDU formats. For more details we refer you to the following GSM specifications. GSM TS 03.38 (V7.0.0) or later versions. GSM TS 03.40 (V7.1.0) or later versions. Here you will find out everything you need to know about all SMS PDU’S and their meaning.

Table of Contents