Oops..
Thanks for noting the mistake.
As coding is 1 to 3, I should have subtract one to it. Just like in mclass.
I have now checked and double checked with EMI and a M20. Hope
it's everything ok.
I'm commiting the patch now.
----- Original Message -----
From: "Paul Keogh" <[EMAIL PROTECTED]>
To: "Kannel Development List (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 2:26 PM
Subject: Bug in fields_to_dcs() ?
>
> In the fields_to_dcs() function in sms.c, the code
>
> /* mode 1 */
> else {
> dcs |= 0xF0;
> dcs |= msg->sms.coding << 2; /* only DC_7BIT or DC_8BIT */
> dcs |= msg->sms.mclass;
> }
>
> looks wrong. First mode 1 is only ever set in the AT2 driver if
> the modem type is Siemens (M20T).
>
> Assume mclass = 0. If coding == DC_7BIT (1), then dcs = 0xf4
> If coding == DC_8BIT (2), then dcs = 0xf8.
>
> The Siemens doc. describes DCS values of 0xf0 - 0xf3 as being
> default 7 bit character coding and values of 0xf4 - 0xf7 as
> being 8 bit character coding.
>
> I think the code should be amended to OR 0x04 in for 8 bit only.
>
> Paul Keogh
> ANAM Wireless Internet Solutions
> http://www.anam.com
> +353 1 284 7555 (wired) +353 86 234 6047 (wireless)
> Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
>
>
>