Very strange. Your operator see DCS = 0x15 [0001 0101].
DCS = 0x15
7654 3210 -- Bit column
0001 0101
^^^^ ^^^^
|||| ||++--- Message Class 1 (to ME)
|||| ||
|||| ++----- 8-bit data
||||
|||+-------- Message Class stored in DCS
|||
||+--------- Uncompressed Text
||
++---------- Only bits 0 to 5 are relevant
To me, this implies that it's just an 8-bit binary SMS. Had the
6th bit been set, it would have indicated that the SMS should be
deleted after reading (which would fit the behavior you exhibited).
Now, looking into the code of v1.3.1 for two of the SMSC client
implementations (AT2 and SMPP) indicates that the DCS field should
be set properly:
AT2 SMSC:
gateway/gw/smsc/smsc_at2.c:at2_pdu_encode()
:
octstr_append_char(buffer, fields_to_dcs(msg, /* data coding scheme */
(msg->sms.alt_dcs ? 2 - msg->sms.alt_dcs : privdata->alt_dcs)));
SMPP SMSC:
gateway/gw/smsc/smsc_smpp.c:msg_to_pdu()
:
pdu->u.submit_sm.data_coding = fields_to_dcs(msg, (msg->sms.alt_dcs ?
2 - msg->sms.alt_dcs : smpp->alt_dcs));
Setting DCS field function:
gateway/gw/sms.c:fields_to_dcs()
:
/* Non-MWI */
else {
/* mode 0 */
if (mode == 0 || msg->sms.coding == DC_UCS2 || msg->sms.compress) {
/* bits 7,6 are 0 */
if (msg->sms.compress)
dcs |= 0x20; /* sets bit 5 */
if (msg->sms.mclass)
dcs |= 0x10 | (msg->sms.mclass - 1); /* sets bit 4,1,0 */
if (msg->sms.coding)
dcs |= ((msg->sms.coding - 1) << 2); /* sets bit 3,2 */
}
/* mode 1 */
else {
dcs |= 0xF0; /* sets bits 7-3 */
dcs |= (msg->sms.coding - 1) << 2; /* only DC_7BIT or DC_8BIT, sets
bit 2*/
if (msg->sms.mclass == 0)
dcs |= 1; /* sets bit 1,0 */
else
dcs |= (msg->sms.mclass - 1); /* sets bit 1,0 */
}
}
return dcs;
Now, based on this code, in the fields_to_dcs(), the only way to set
the 4th bit is if:
1) alt-dcs = 2
or
2) coding = 3 (DCS_UCS2)
or
3) compress = 1
If "compress = 1" turned on the 4th bit, then the 5th bit would be on
as well. Since this is not the case, we can rule out that possibility.
If "coding = 3" turned on the 4th bit, then bit 3 and 2 would be 10,
which it is not, currently.
This leads me to believe either:
1) "alt-dcs = 2" occured in the sendsms procedure or
2) alt-dcs was not passed AND the either no "alt-dcs" is delcared
in your "group = smsc" definition or "alt-dcs = 2" is in your
"group = smsc" declaration
Can you check your Kannel v1.3.1 smsbox logs to verify that the
MT SMS you sent had a "alt-dcs=1" as a CGI parameter or
"X-Kannel-Alt-DCS: 1" in the HTTP optional headers (with
"accept-x-kannel-headers = true" in your sms-services group declaration
if the SMS is a response to an MO SMS from the user).
See ya...
d.c.
**>From: "J. Kizito" <[EMAIL PROTECTED]>
**>To: [email protected]
**>Subject: Re: Setting DCS field
**>Date: Wed, 16 Feb 2005 14:56:54 +0100
**>
**>I have tried alt-dcs=1, coding=2 and mclass=2 but when we run a trace at the
**>SMS-C, we realize that this results in DCS=0x15 (00010101) instead of 0xF5
**>(11110101) implying that the left most three bits have not been set. Is
there
**>a way I can ensure they are also set to '1'? Looks like they are not used
**>anyway however with 0x15, the message (logo) can be displayed on the phone
**>but can not be saved.
**>J.
**>
**>On Tuesday 15 February 2005 06:06, Davy Chan wrote:
**>> **>From: "J. Kizito" <[EMAIL PROTECTED]>
**>> **>To: [email protected]
**>> **>Subject: Setting DCS field
**>> **>Date: Mon, 14 Feb 2005 14:25:33 +0100
**>> **>User-Agent: KMail/1.7.92
**>> **>
**>> **>Hi list,
**>> **>I am using kannel 1.3.1 and having problems setting the DCS (Data Coding
**>> **>Scheme) field when sending the message from kannel to the SMS-C. My
**>> provider **>requires me to use DCS=0xF5. I see a number of parameters like
**>> mclass, coding **>and mwi that all set certain bits of the DCS field but I
**>> have no idea on what **>values they should take on (if I am supposed to use
**>> them) in order for me to **>achieve my goal. Does anyone have an idea on
**>> this?
**>>
**>> Hope I remember this right...
**>> DCS = 0xF5 means the following:
**>> 1111 0101
**>> ^^^^ ^^^^
**>>
**>> |||| ||++--- Message Class 1
**>> |||| |
**>> |||| |+----- 8-bit data
**>> ||||
**>> |||| +------ Reserved
**>>
**>> ++++-------- Contains only data coding and message class info
**>>
**>> Therefore, I think you need to set the following when sending an SMS to
**>> your v1.3.1 Kannel:
**>> alt-dcs=1
**>> coding=2
**>> mclass=2
**>>
**>> For Kannel versions after 1.3.1:
**>> alt-dcs=1
**>> coding=1
**>> mclass=1