gnokii-users
[Top][All Lists]
Advanced

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

Re: smsd polling interval on AT driver


From: Jan Derfinak
Subject: Re: smsd polling interval on AT driver
Date: Thu, 18 Dec 2003 02:07:25 +0100 (CET)

On Wed, 17 Dec 2003, BORBELY Zoltan wrote:

Hi.

> Jan, have you hot any idea? Currently the GetSMSStatus in the AT
> driver reports all of the sms messages as read (unread = 0, changed = 0,
> folders_count = 0, number = <num of messages>).

I made short debuging with these results:
I use Siemens MC35i terminal.
The CPMS command returned:
at+CPMS="SM"
+CPMS: 0,10,0,35,0,35

If I used at+CPMS="MT" I got 
+CPMS: 0,35,0,35,0,35

By default phone stores messages to MT. In your patch you check only number
of messages in SM so it doesn't work with this phone.
I changed your patch to check MT and in smsd/lowlevel.c I changed memory
type to GN_MT_MT and I removed checking for unread message.

--- lowlevel.c.orig 2003-10-05 21:42:41.000000000 +0200
+++ lowlevel.c  2003-12-18 00:38:18.101026824 +0100
@@ -248,7 +248,7 @@
     if (phoneMonitor.supported & PM_FOLDERS)
       msg->memory_type = GN_MT_IN;
     else
-      msg->memory_type = GN_MT_SM;
+      msg->memory_type = GN_MT_MT;
     msg->number = ++i;
     data.sms = msg;
     
@@ -410,8 +410,7 @@
       data->sms_status = &SMSStatus;
       if ((error = gn_sm_functions (GN_OP_GetSMSStatus, data, &sm)) ==
GN_ERR_NONE)
       {
-        if (phoneMonitor.sms.unRead != SMSStatus.unread ||
-            phoneMonitor.sms.number != SMSStatus.number)
+        if (SMSStatus.number > 0)
         {
           phoneMonitor.working = TRUE;
           RefreshSMS (SMSStatus.number);


Now smsd starts RefreshSMS and it is able to download messages from
phone.

I also noticed another strange behaviour. If I used gn_sms_get (AT+CMGR) on
empty or invalid location it returns error 4 (GN_ERR_INTERNALERROR).
I was expecting GN_ERR_EMPTYLOCATION and GN_ERR_INVALIDLOCATION instead it.
But it hasn't relation to smsd function.

I think we should create smarter GetSMSStatus and check for all memory types
in smsd or we should let user to specify prefered sms storage as command line
parameter in smsd.

In future we should route sms's directly to TE (AT+CNMI command). I think
this is much better solution.


                                        jan

-- 




reply via email to

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