gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Validity period


From: Davide Berra
Subject: Validity period
Date: Wed, 29 Oct 2008 08:50:00 +0100
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

Hi,
i would like to write a little patch about sending sms with gnokii.

i need to send a message with a accurate validity period, so i would like to fill TP-VP field
with Absolute value and not with Relative value (default by gnokii).

So i edited common/phones/nk6510.c (my phone) sms_encode() function...

first, i changed TP-VPF (bit 4 and bit 3 of first octet) with 01 (means Enhanced format) instead of 10 (Relative format)

              if (data->raw_sms->validity_indicator)
                {
//                      req[pos] |= 0x10;
                        req[pos] |= 0x08;
                }

and then i subsituted the single byte of Relative format with 7 octect of  Enhanced format...
trying to change block lenght and data lenght too.

        if (data->raw_sms->type == GN_SMS_MT_Submit) {
                /* Block 4. Validity Period */
                req[pos++] = 0x08; /* type: validity */
        //      req[pos++] = 0x04; /* block length */
                req[pos++] = 0x0A; /* block length */
        //      req[pos++] = 0x01; /* data length */
                req[pos++] = 0x07; /* data length */
        //      req[pos++] = data->raw_sms->validity[0];
                req[pos++] = 0x99; /* year */
                req[pos++] = 0x20; /* month */
                req[pos++] = 0x21; /* day */
                req[pos++] = 0x50; /* hour */
                req[pos++] = 0x75; /* minute */
                req[pos++] = 0x03; /* second */
                req[pos++] = 0x21; /* timezone */
        }

the result is..... phone can't send message.... =(

Do you think i miss something?
What "data length" and "block length", in validity period block, means?

Thank yoi in advance
Davide




reply via email to

[Prev in Thread] Current Thread [Next in Thread]