gnokii-users
[Top][All Lists]
Advanced

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

RE: smsd problem with AT model - Part II


From: Romain Parmantier - Mobile Devices
Subject: RE: smsd problem with AT model - Part II
Date: Fri, 6 Oct 2006 09:53:00 +0200

Hi,

Thanks for your help on my problem.

I have apply your patch but without success (and the Daniele's previous patch on
another copy of gnokii). I have tested each test separately.

I always identify (gnokii --identify), receive sms (gnokii --getsms SM 1) and
send sms (gnokii --sendsms) and I have already the same errors (in my opinion) :

This is the result of the Pawel's patch :
=============8<============================
address@hidden ~ # smsd -u root -d intranet -c localhost -m mysql
9:30 #672
LOG: debug mask is 0x1
LOG: rlpdebug mask is 0x1
LOG: xdebug mask is 0x1
phone instance config:
model: AT
port_device: /dev/ttyS0
connection_type: 0
init_length: 0
serial_baudrate: 115200
serial_write_usleep: -1
hardware_handshake: 1
require_dcd: 0
smsc_timeout: 100
connect_script:
disconnect_script:
rfcomm_cn: 1
sm_retry: off
Initializing AT capable mobile phone ...
Serial device: opening device /dev/ttyS0
Serial device: setting RTS to high and DTR to high
Message sent: 0x00 / 0x0004
41 54 5a 0d                                     | ATZ
write: [ATZ<cr>]
read : [ATZ<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x000a
02 41 54 5a 0d 0d 0a 4f 4b 0d                   |  ATZ   OK
Received message type 00
Message sent: 0x00 / 0x0005
41 54 45 31 0d                                  | ATE1
write: [ATE1<cr>]
read : [ATE1<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x000b
02 41 54 45 31 0d 0d 0a 4f 4b 0d                |  ATE1   OK
Received message type 00
Message sent: 0x00 / 0x000a
41 54 2b 43 4d 45 45 3d 31 0d                   | AT+CMEE=1
write: [AT+CMEE=1<cr>]
read : [AT+CMEE=1<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x0010
02 41 54 2b 43 4d 45 45 3d 31 0d 0d 0a 4f 4b 0d |  AT+CMEE=1   OK
Received message type 00
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 4d 0d                         | AT+CGMM
write: [AT+CGMM<cr>]
read : [AT+CGMM<cr><cr><lf> MULTIBAND  900E  1800 <cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0029
02 41 54 2b 43 47 4d 4d 0d 0d 0a 20 4d 55 4c 54 |  AT+CGMM    MULT
49 42 41 4e 44 20 20 39 30 30 45 20 20 31 38 30 | IBAND  900E  180
30 20 0d 0a 0d 0a 4f 4b 0d                      | 0     OK
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 49 0d                         | AT+CGMI
write: [AT+CGMI<cr>]
read : [AT+CGMI<cr><cr><lf> WAVECOM MODEM<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0020
02 41 54 2b 43 47 4d 49 0d 0d 0a 20 57 41 56 45 |  AT+CGMI    WAVE
43 4f 4d 20 4d 4f 44 45 4d 0d 0a 0d 0a 4f 4b 0d | COM MODEM    OK
Received message type 06
Message sent: 0x61 / 0x0009
41 54 2b 43 53 43 53 3f 0d                      | AT+CSCS?
write: [AT+CSCS?<cr>]
read : [AT+CSCS?<cr><cr><lf>+CSCS: "PCCP437"<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x61 / 0x0023
02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 |  AT+CSCS?   +CSC
53 3a 20 22 50 43 43 50 34 33 37 22 0d 0a 0d 0a | S: "PCCP437"
4f 4b 0d                                        | OK
Received message type 61
Initialisation completed
fbusinit: error 0
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 4d 0d                         | AT+CGMM
write: [AT+CGMM<cr>]
read : [AT+CGMM<cr><cr><lf> MULTIBAND  900E  1800 <cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0029
02 41 54 2b 43 47 4d 4d 0d 0d 0a 20 4d 55 4c 54 |  AT+CGMM    MULT
49 42 41 4e 44 20 20 39 30 30 45 20 20 31 38 30 | IBAND  900E  180
30 20 0d 0a 0d 0a 4f 4b 0d                      | 0     OK
Received message type 06
Version: ô_@
Model: unknown
Revision:
Phone connected. Starting monitoring...
Message sent: 0x12 / 0x0009
41 54 2b 43 50 4d 53 3f 0d                      | AT+CPMS?
write: [AT+CPMS?<cr>]
read : [AT+CPMS?<cr><cr><lf>+CPMS:
"SM",30,30,"SM",30,30<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x12 / 0x002f
02 41 54 2b 43 50 4d 53 3f 0d 0d 0a 2b 43 50 4d |  AT+CPMS?   +CPM
53 3a 20 22 53 4d 22 2c 33 30 2c 33 30 2c 22 53 | S: "SM",30,30,"S
4d 22 2c 33 30 2c 33 30 0d 0a 0d 0a 4f 4b 0d    | M",30,30    OK
Received message type 12
GN_OP_GetSMSStatus at line 400 in file lowlevel.c returns error 1
Restarting connection.Serial device: closing device
=============8<============================

I have a question about the following lines :
=============8<============================
Initialisation completed
fbusinit: error 0
=============8<============================

The function "static gn_error fbusinit (const char * const iname);" returns 0.
Does the error '0' mean no error in gnokii application ? I haven't still found a
file with definition of gn_error.

If you want more information or another test, don't hesitate to ask me.

Regards, 


-- 
Romain PARMANTIER - Mobile Devices Ingenierie
12 rue Roger Salengro 94 270 Kremlin Bicêtre
Tél.: (+33) 142 119 325 Fax: (+33) 142 118 717
http://www.mobile-devices.fr


-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Pawel Kot
Sent: Thursday, October 05, 2006 10:14 PM
To: Discussion forum for gnokii users.
Subject: Re: smsd problem with AT model - Part II

Hi,

Please see the following patch (hope gmail doesn't mangle it).

Index: common/phones/atgen.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/phones/atgen.c,v
retrieving revision 1.128
diff -u -r1.128 atgen.c
--- common/phones/atgen.c       3 Oct 2006 21:55:21 -0000       1.128
+++ common/phones/atgen.c       5 Oct 2006 20:13:15 -0000
@@ -552,7 +552,6 @@
 {
        at_driver_instance *drvinst = AT_DRVINST(state);
        gn_data data;
-       gn_sms_status sms_status;
        char req[32];
        gn_error ret = GN_ERR_NONE;

@@ -560,17 +559,10 @@
                if (mt >= NR_MEMORIES)
                        return GN_ERR_INVALIDMEMORYTYPE;
                gn_data_clear(&data);
-               data.sms_status = &sms_status;
-               ret = AT_GetSMSStatus(&data, state);
-               if (ret != GN_ERR_NONE)
-                       return ret;
-
-               sprintf(req, "AT+CPMS=\"%s\",\"%s\",\"%s\"\r",
memorynames[mt], memorynames[mt],
-                       memorynames[data.sms_status->new_message_store]);
+               sprintf(req, "AT+CPMS=\"%s\"\r", memorynames[mt]);
                ret = sm_message_send(23, GN_OP_Init, req, state);
-               if (ret != GN_ERR_NONE)
-                       return GN_ERR_NOTREADY;
-               ret = sm_block_no_retry(GN_OP_Init, &data, state);
+               if (ret == GN_ERR_NONE)
+                       ret = sm_block_no_retry(GN_OP_Init, &data, 
+ state);
                if (ret == GN_ERR_NONE)
                        drvinst->smsmemorytype = mt;
        }
@@ -1458,8 +1450,6 @@
 {
        at_line_buffer buf;
        gn_error error;
-       char store[3] = "XX";
-       int i;

        if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error;

@@ -1467,22 +1457,13 @@
        buf.length = length;
        splitlines(&buf);

-       if (sscanf(buf.line2, "+CPMS:
\"%*c%*c\",%d,%*d,\"%*c%*c\",%*d,%*d,\"%c%c\",%*d,%*d",
-                  &data->sms_status->number, &store[0], &store[1]) != 3)
+       if (sscanf(buf.line2, "+CPMS: \"%*c%*c\",%d,%*d",
&data->sms_status->number) != 1)
                return GN_ERR_FAILED;

        data->sms_status->unread = 0;
        data->sms_status->changed = 0;
        data->sms_status->folders_count = 0;

-       data->sms_status->new_message_store = GN_MT_ME;
-       for (i = 0; i < NR_MEMORIES; i++) {
-               if (strcmp(store, memorynames[i]) == 0) {
-                       data->sms_status->new_message_store = i;
-                       break;
-               }
-       }
-
        return GN_ERR_NONE;
 }

take care,
pkot
--
Pawel Kot


_______________________________________________
gnokii-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/gnokii-users






reply via email to

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