Cellular Phone Forum / General / GSM / February 2007
Questions About SMS Messaging
|
|
Thread rating:  |
Ken Hall - 18 Feb 2007 06:45 GMT How many useful characters can you expect to send? I've read several places that SMS can only send 160 characters, but it never says how much of that is overhead. Also, I get results that are inconsistent with this limit.
I just sent my Nokia a 220 character test message composed of 180 characters plus about 40 characters of to/from addresses. It displayed only 112 of these characters. But, it received more than it displayed, because I sent the message back to my desktop computer and it contained about 180 of the total 220 characters sent.
So, I can't figure out how many useful characters I should expect to be able to send.
I have been asked to set up an SMS broadcast message that will go to many people with many different types of cell phones, and I need to be sure everyone gets the entire message. So, I'm trying to determine the maximum number of useful characters I can confidently send.
-- Ken
John Henderson - 18 Feb 2007 07:36 GMT > How many useful characters can you expect to send? I've read > several places that SMS can only send 160 characters, but it [quoted text clipped - 16 lines] > I'm trying to determine the maximum number of useful > characters I can confidently send. The default alphabet used for coding SMSs uses 7-bit characters defined in GSM 03.38. Only 140 octets (bytes) are available for user payload in each individual SMS. 160 septets (7-bit characters) can be packed into 140 octets (140 * 8 / 7 = 160). and this defines the absolute 160-character limit.
Another option is to use 8-bit encoding, meaning that only 140 characters can be sent in each. 16-bit encoding is sometimes used for more obscure character sets, and only 70 characters per SMS can be sent then.
GSM 03.40 specifies the notion of a concatenated (multi-part) SMS, and this is what gets used to send messages containing anything in excess of these limits. Here each message gets broken into parts, each containing no more than 140 octets of payload. These parts are sent, received and charged as individual SMSs. When all parts are received, they are reassembled in the receiving phone into the original message.
Note that the process of splitting a message into such parts imposes an overhead (numbering of the parts for cross-referencing) which becomes part of the 140 octet limit per SMS. So a 160 character block of text gets sent a single SMS whereas 161 characters gets sent as 2 SMSs. In the latter case, 6 octets are required for the referencing information, so only 153 7-bit characters go into part 1 of 2, and the remaining 8 characters get sent in part 2 of 2.
Many old phones that might still be in use will not understand the SMS concatenation mechanism. They will not reassemble a multi-part message. Instead they will show the text broken up into completely seperate messages, but with 7 "rubbish" characters (7 septets padded out to the 6-octet boundary) at the beginning of each. These are misunderstood cross-referencing information (technically a "user data header").
John
Ken Hall - 18 Feb 2007 13:53 GMT >The default alphabet used for coding SMSs uses 7-bit characters >defined in GSM 03.38. Only 140 octets (bytes) are available >for user payload in each individual SMS. 160 septets (7-bit >characters) can be packed into 140 octets (140 * 8 / 7 = 160). >and this defines the absolute 160-character limit. <snip>
And, do you know how much of the 160 septets are used for overhead?
Do you know why more characters were received and resent than were displayed on my phone?
-- Ken
John Henderson - 18 Feb 2007 20:04 GMT > And, do you know how much of the 160 septets are used for > overhead? None. The user data field within an SMS provides (up to) 140 octets for your text. If the SMS contains a UDH (user data header), then that's an overhead which detracts from that 140 octets of space. If the SMS consists of 160 or less characters (with no EMS or special control features), then there's no embedded UDH.
> Do you know why more characters were received and resent than > were displayed on my phone? How are you determining the character count?
Looking at the entire SMS PDU as transmitted over-the-air, and stored on the receiving phone, we have:
1-12 octets service centre address (where SMS was lodged) 1 octet PDU-type 2-12 octets originator address 1 octet protocol ID 1 octet data coding scheme 7 octets service centre date-time stamp 1 octet user data length 0-140 octets user data (as discussed)
The above is for a MT ("mobile-terminate", or received) SMS. An SMS you're sending from a GSM device is an MO (mobile originate) SMS, and has the following structure:
1-12 octets service centre address 1 octet PDU-type 1 octet message reference number 2-12 octets destination address 1 octet protocol ID 1 octet data coding scheme 0, 1 or 7 octets message validity period 1 octet user data length 0-140 octets user data
John
Ken Hall - 18 Feb 2007 22:14 GMT >> Do you know why more characters were received and resent than >> were displayed on my phone? > >How are you determining the character count? I'm sending messages from my desktop to my Nokia.
I just sent a different test message and got a different result. The first test message contained only a From and a To address and a continuous string of 123456789 123456789 . . . repeating to create 220 characters. This gave the results explained earlier.
The new test message replaced the trailing space (ascii 32) with a leading letter yielding A23456789B123456789 . . .
This second test produced the 160 when counting the From address and the part of the text string displayed. Apparently the To address is not sent of included in the 160 character limit.
-- Ken
John Henderson - 18 Feb 2007 22:59 GMT > I'm sending messages from my desktop to my Nokia. > [quoted text clipped - 3 lines] > repeating to create 220 characters. This gave the results > explained earlier. The fact that you're being prompted for a "From" address suggests that you're probably accessing the SMSC (message centre) of lodgement directly via the Internet using SMPP protocol.
> The new test message replaced the trailing space (ascii 32) > with a leading letter yielding A23456789B123456789 . . . [quoted text clipped - 3 lines] > the To address is not sent of included in the 160 character > limit. I would expect neither the "To" nor "From" address to be included in the UD (user data) field. The "To" address should be discarded from the message at the point of delivery, and the "From" address should be packed into the originator address field, which is on the outside of the UD field.
Exactly what is happening to your text will depend on the author of the software you're using.
Is your desktop able to communicate directly with the receiving Nokia using a terminal emulator like Hyperterminal, and a USB/serial cable, IrDA or Bluetooth connection? If so, we can access exactly what's being received and stored (the entire uninterpreted PDU - protocol data units), and definitively answer all of your questions.
John
Ken Hall - 21 Feb 2007 03:41 GMT Thanks for all your help. I am sending through a SMTP server. And, you were correct, by broadcast I meant send to many individual recipients.
jim
>> I'm sending messages from my desktop to my Nokia. >> [quoted text clipped - 34 lines] > >John -- Ken
John Henderson - 21 Feb 2007 05:15 GMT > Thanks for all your help. I am sending through a SMTP server. Note that there's a difference between SMTP (an e-mail sending protocol) and SMPP (an SMS direct lodgement protocol). If you're using an e-mail to SMS facility then all bets are off as regards how the originator address is handled. If the SMS's originator address is alphanumeric (as it must be if an e-mail address is being transmitted), then that's got to be part of the 160-character message text instead of being passed in the originator address (OA) field proper. The reason is that only 10 octets are available for the actual content of the OA. This equates to 11 septets maximum, and totally inadequate for most e-mail addresses. By contrast, the digits of a numeric address are each represented in 4 bytes (a semi-octet), meaning that a 20-digit number will fit.
SMS originator addresses are usually sent as numeric, and many phones will go on to display them as alphanumeric by simply looking up the appropriate phonebook entry.
John
John Henderson - 21 Feb 2007 05:23 GMT I wrote:
> If the SMS's originator address is alphanumeric (as it must be > if an e-mail address is being transmitted), then that's got to > be part of the 160-character message text instead of being > passed in the originator address (OA) field proper. A clarification to avoid misunderstanding: If you're using SMPP, and being restricted to 11 alphanumeric characters (or 20 numerics) for the "From" address, then I'd expect that to be put into the OA field instead of the UD field.
John
John Phillips - 18 Feb 2007 08:05 GMT >I have been asked to set up an SMS broadcast message that will go to >many people with many different types of cell phones, and I need to >be sure everyone gets the entire message. So, I'm trying to determine >the maximum number of useful characters I can confidently send. Network dependant, but usually 160 characters x 3 = 480.
Be aware however that some networks on the receiving end may split the message into parts if over 160 characters, and some or all of the parts may not arrive. And the sending network may also split the message as well.
Above from my experience, of course, YMMV.
Also have a look at http://www.dreamfabric.com/sms/
Good Luck!
John Henderson - 18 Feb 2007 09:11 GMT > Network dependant, but usually 160 characters x 3 = 480. The maximum number of parts in a multi-part message is theoretically 255, so that's what all GSM networks support. This is because the concatenation process is totally transparent to the GSM network. The splitting and the reconstruction are both done by the respective phones at each end. A handset-imposed limit of 3 parts would not surprise me.
> Be aware however that some networks on the receiving end may > split the message into parts if over 160 characters, They can't do this if they're GSM (or UMTS) compliant.
> and some or all of the parts may not arrive. That's possible.
> And the sending network may also split the message as well. I've not seen that happen, and can't think of a reason for it unless it's a GSM to non-UMTS CDMA transfer, since this CDMA has a lower limit.
John
John Henderson - 18 Feb 2007 09:49 GMT I wrote:
> A handset-imposed limit of 3 parts would not surprise me. Note also that a 3-part concatenated message can carry a maximum of 459 characters (153 * 3).
The number of printable characters can sometimes be lower than this too. There are two reasons for this.
Firstly, a small number of 7-bit characters require two character positions. Only 128 distinct characters can be defined in 7 bits, and there are more than that defined. So one of the 128 "characters" is special, and it means that the next character gets interpreted as a character from a different table. The characters requiring two positions are the Euro currency symbol and those in the set ^ | { } [ ] ~ \
The second reason is that EMS (enhanced message service) messages are supported. These can contain all manner of embedded video attributes, pre-defined sounds, graphics and emoticons, as well as user-defined sounds and graphics and more.
John
Me - 19 Feb 2007 13:49 GMT >I wrote: > [quoted text clipped - 22 lines] > > John John already provided a lot of accurate info, probably most that is needed. However, the original question mentions SMS broadcast and one should note that the payload on CBS is a bit different from the normal point-to-point SMS.
Another comment, perhaps one of the earlier comments on "some networks delivering long SMS messages in parts" would actually refer to the fact that some mobiles do not support SMS concatenation and then those mobiles show the long messages as separate parts (which John actually explained).
John Henderson - 19 Feb 2007 19:49 GMT > John already provided a lot of accurate info, probably most > that is needed. However, the original question mentions SMS > broadcast and one should note that the payload on CBS is a bit > different from the normal point-to-point SMS. I may be wrong, but I took Ken as meaning by "broadcast" that he was sending the same SMS to multiple addressees.
John
Me - 20 Feb 2007 08:17 GMT >> John already provided a lot of accurate info, probably most >> that is needed. However, the original question mentions SMS [quoted text clipped - 5 lines] > > John OK, could well be so, didn't read his message that carefully. He should then have all the necessary info, hope he is happy with your support.
matt weber - 18 Feb 2007 21:05 GMT >How many useful characters can you expect to send? I've read several >places that SMS can only send 160 characters, but it never says how [quoted text clipped - 16 lines] > >-- Ken They 'Payload' in an SMS message is 160 characters, however they can be strung together to provide for longer messages.
Shibby - 19 Feb 2007 19:16 GMT Maybee this information is helpfull:
http://www.activexperts.com/activsms/sms/multipart/
It describes how to encode the User Data Header and how many bytes there are left for the message.
Best regards,
Leon
> How many useful characters can you expect to send? I've read several > places that SMS can only send 160 characters, but it never says how [quoted text clipped - 16 lines] > > -- Ken
|
|
|