×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    1

    Sending long message

    Hi....I'm trying to send a long sms ( > 160 chars), and currently having problem as the received messages contain some junk characters. I managed to receive one long message, which was sent in 2 parts previously, but the text I received was not the same as the one I wrote. I suspect my mistake may lay in the text conversion. My question is :

    1. When sending text ( less than 160 chars ), the message is converted into 7 bit, then packed into 8 bit. What about sending long message ( > 160 chars ), do I follow the same precedure ie converting the message into 7 bit, then packing it into 8 bit ?

    2. Supposing I use the procedure of converting the message into 7 bit then packing it into 8 bit, do I encode the long message first , then split into few parts, and embed each part with appropriate UDH; or split the long message into few parts, encode each part, and embed each part with appropriate UDH ?

    3. When splitting the long messages into few parts, what is the length of each part ? I 'm aware that SMS can contain the maximum of 140bytes data. When using UDH, the 'concatenation header' takes up 5 bytes of the data. The remaining of 135 bytes is equal to how my characters ??

    4. Is there any particular encoding method for sending long message ? (other than converting the message into 7 bit then packing it into 8 bit ) Currently , I always treat sending short message is the same as sending the long message, except for the UDH existence in long message.

    ps: please don't refer me to Smart Messaging FAQ , as I already went through that, and the coverage of sending long message wasn't adequate.

    Many thanks
    Last edited by njoandy1; 2004-11-04 at 09:52.

  2. #2
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    221

    Little tutorial

    Hi.
    I think that may help you:


    How to do it ?

    I did it this way:
    1) convert to 7 bit
    2) split messages, substracting the size of the UDH
    udhSize = 7 octets
    udhSizeInSeptets = (udhSize/7*8) = 8 septets
    message length = 160 - 8 = 152 septets
    3) convert each message part into 8 bit
    3) add proper UDH to each message part

    But it should also work like this:
    1) convert to 7 bit + 8 bit
    2) split messages, substracting the size of the UDH
    udhSize = 7 octets
    message length = 140 octets - 7 octets = 133 octets
    3) add proper UDH to each message part


    Header format ?

    If there are always a few junk characters appearing at the beginning of the message, then either your phone does not understand concat messages or your UDH is coded incorrectly, in the latter case your phone doesn't know it is a concat message and therefore ignores the header.

    So a correct UDH for a concat message must look like this:

    1 byte size of header (excluding this byte) = 6 bytes
    5 bytes concat message element
    1 byte filler byte
    -------
    7 bytes (octets)

    An UDH is always coded as 8-bit. That's the reason for the filler byte. You have to reach the next 7-bit boundary for phones who cannot interepret the UDH and can still display the message text correctly - but with some "junk characters" at the beginning. That filler byte is not in the spec I think but I it's the easiest way to solve that issue.


    Additional encoding ?

    No additional encoding is necessary.



    Zamba

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    1

    Re: Little tutorial

    I tried this way; bun my noklia 3315 displays two different message and shows 'linked 72/81' ** some text missing** along with origilan message
    can you give example of complete two message posts? anything other than a first ocatace's headr bit need to set?
    - Rajendra soni


    Originally posted by Zamba
    Hi.
    I think that may help you:


    How to do it ?

    I did it this way:
    1) convert to 7 bit
    2) split messages, substracting the size of the UDH
    udhSize = 7 octets
    udhSizeInSeptets = (udhSize/7*8) = 8 septets
    message length = 160 - 8 = 152 septets
    3) convert each message part into 8 bit
    3) add proper UDH to each message part

    But it should also work like this:
    1) convert to 7 bit + 8 bit
    2) split messages, substracting the size of the UDH
    udhSize = 7 octets
    message length = 140 octets - 7 octets = 133 octets
    3) add proper UDH to each message part


    Header format ?

    If there are always a few junk characters appearing at the beginning of the message, then either your phone does not understand concat messages or your UDH is coded incorrectly, in the latter case your phone doesn't know it is a concat message and therefore ignores the header.

    So a correct UDH for a concat message must look like this:

    1 byte size of header (excluding this byte) = 6 bytes
    5 bytes concat message element
    1 byte filler byte
    -------
    7 bytes (octets)

    An UDH is always coded as 8-bit. That's the reason for the filler byte. You have to reach the next 7-bit boundary for phones who cannot interepret the UDH and can still display the message text correctly - but with some "junk characters" at the beginning. That filler byte is not in the spec I think but I it's the easiest way to solve that issue.


    Additional encoding ?

    No additional encoding is necessary.



    Zamba

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×