Kannel segments and adds catenation udh by itself, your udh on command
line should not contain it. Of course you add some other IE (for ports,
for instance).
Aarno
On 29.7.2005, at 10.09, Robert Andersson wrote:
It now works to send segmented OTA conf messages but
I'm not sure how to do it correctly. sms.h says that it is
wrong to use catenation and UDH together but
the prepend_catenation_udh sets the udh header.
Could someone explatin to me what this means. What is
catenation and what is UDH.
According to the documentation I have found I should add
a SAR (segmentation and reassembly) to the UDH. This
seems more or less to be exactly what prepend_catenation_udh
does. This is never run when I send an OTA conf though.
Is catenation what I want? Is there any difference between
adding a SAR and to use catenation?
best regards
Robert Andersson
/*
*
* Split an SMS message into smaller ones.
*
* The original SMS message is represented as an Msg object, and the
* resulting list of smaller ones is represented as a List of Msg
objects.
* A plain text header and/or footer can be added to each part, and an
* additional suffix can be added to each part except the last one.
* Optionally, a UDH prefix can be added to each part so that phones
* that understand this prefix can join the messages into one large
one
* again. At most `max_messages' parts will be generated; surplus text
* from the original message will be silently ignored.
*
* If the original message has UDH, they will be duplicated in each
part.
!!!!
* It is an error to use catenation and UDH together, or catenation
and 7
* bit mode toghether; in these cases, catenation is silently ignored.
!!!!
*
* If `catenate' is true, `msg_sequence' is used as the sequence
number for
* the logical message. The catenation UDH contain three numbers: the
* concatenated message reference, which is constant for all parts of
* the logical message, the total number of parts in the logical
message,
* and the sequence number of the current part.
*
* Note that `msg_sequence' must have a value in the range 0..255.
*
* `max_octets' gives the maximum number of octets in on message,
including
* UDH, and after 7 bit characters have been packed into octets.
*/
Paul P Komkoff Jr wrote:
Replying to Robert Andersson:
Hi
When I send an OTA configuration from kannel it is always ignored by
the phone (Sony Ericsson K500)
Teliasonera is about to release award-winning breaking-through
platform for OTA configuration? how sad.
The same XML document works well with the NowSMS gateway.
The message is splitted in two SMS.
--- cut here ---
# UDH - User Data Header
# Consists of 1-byte header length + TLV fields
# We will use this header:
# 0b - length
# 05 - UserPorts TAG
# 04 - UserPorts len
# xxxx xxxx - Destination & Source port
# 00 - Segmented TAG
# 03 - Segmented len
# 04 - ??? id
# xx - total fragments
# xx - current fragment
#
# Second TLV field (segmentation info) can be omitted if we have only
# 1 segment,
# but if exist, it MUST BE second! Order is critical for many phones,
# along with
# port numbers.
def MakeUDH(Total, Current, SPort = 49154, DPort = 49999):
if Total == 1:
return '\x06\x05\x04' + struct.pack("!HH", DPort, SPort)
else:
return '\x0b\x05\x04' + struct.pack("!HH", DPort, SPort) + '\x00
\x03\x04' + struct.pack("!BB", Total, Current)
def MakeUDH2(Total, Current):
return '\x05\x00\x03\x04' + struct.pack("!BB", Total, Current)
--- cut here ---
I think this is enough info :)
P.S. The original message should be split in pieces of 119 bytes
length ;)