An example of the basic concept of coding is given as follows:
TP-UDHI=1
SMS User Data Header: UDHL=05, IEI=0A, IEDL=03, IED1=0F, IED2=12, IED3=10
SMS User Data: This is a text with bold option on following with normal text.
Should be displayed as:
It is also possible to add predefined sounds in the message.
Example:
TP-UDHI=1
SMS User Data Header: UDHL=08, IEI=0B, IEDL=02, IED1=09,<sound5>, IEI=0B, IEDL=2, IED1=1C, <sound7>
SMS User Data: This is a message with two different sounds.
The sound nr5 shall be played after the 9th received character (
"a") and sound nr7 shall be played after the 28th received character (
"e").
Example of a message including one small picture is coded as follows:
TP UDHI=1
SMS User Data Header: UDHL=24, IEI=11, IEIDL=22, IED1=08, <
(small picture 32bytes)>
SMS User Data: Hello!<CR><LF><CR><LF>One small picture in here
Should be displayed as:
If the message starts with <CR>, then the
"unreadable" data in an old terminal will be overwritten by the text, and the user will not see any strange characters. It is possible to insert the same picture several times in the same message. In that case, the TP-UD header shall contain as many IE as the number of occurrences contained in the SM or one segment of a concatenated message. Using defined elements will normally imply that more than one SM is required and therefore concatenation is required.
Concatenated messages are required in most cases required when using several types of EMS elements, since it is only possible to send one large picture/large animation/melody in one single SM. After including either of these elements, there are only 4 (or 9 if no concatenation is used) characters left to the text part, and this is usually too little.
If one or more objects are embedded in one segment of a concatenated message, the IE octet indicating its/their position within the SM data cannot be set to a value that would refer to a position in the next segment(s) so that received segments should be processed before all of them have been received. It means that a formatting text that could not be conveyed in one segment shall be split in as many segments as necessary. In that case, the IE relating to the formatting shall be repeated in all the segments in which it will apply.
Example of a message including 2 Large Pictures, 4 Small animations and 2 User defined Melodies together with some text.
The EMS message: <Large Picture1> <User Defined Melody 1> Hello All, This is a real Enhanced Message <Small Animation 1>. I can send <Small Animation 2> and receive <Small Animation 3> really advanced EMS messages <Animation 4> Isn't it impressive? /Lars <User Defined Melody2> <Large Picture 2>
This EMS message has to use concatenated messages and the SM will typically contain the following data: