[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: smsd problem with AT model - Part II
From: |
Daniele Forsi |
Subject: |
Re: smsd problem with AT model - Part II |
Date: |
Thu, 5 Oct 2006 18:43:12 +0200 |
User-agent: |
KMail/1.9.4 |
Romain Parmantier:
> It seems that my modem doesn't support PDU mode according the following log
no, it's my fault: I made two mistakes and the driver gets confused
please revert the previous patch and apply this one with Pawel's suggestion:
--- common/phones/atgen.c.orig 2006-10-05 12:35:37.000000000 +0200
+++ common/phones/atgen.c 2006-10-05 18:24:37.000000000 +0200
@@ -552,7 +552,6 @@ gn_error AT_SetSMSMemoryType(gn_memory_t
{
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,16 +559,11 @@ gn_error AT_SetSMSMemoryType(gn_memory_t
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]);
- ret = sm_message_send(23, GN_OP_Init, req, state);
+ sprintf(req, "AT+CPMS=\"%s\"\r", memorynames[mt]);
+ ret = sm_message_send(13, GN_OP_Init, req, state);
if (ret != GN_ERR_NONE)
- return GN_ERR_NOTREADY;
+ return ret;
ret = sm_block_no_retry(GN_OP_Init, &data, state);
if (ret == GN_ERR_NONE)
drvinst->smsmemorytype = mt;
@@ -1469,7 +1463,9 @@ static gn_error ReplyGetSMSStatus(int me
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)
- return GN_ERR_FAILED;
+ if (sscanf(buf.line2, "+CPMS: \"%c%c\",%d,%*d,\"%*c%*c\",%*d,
%*d",
+ &store[0], &store[1], &data->sms_status->number) != 3)
+ return GN_ERR_FAILED;
data->sms_status->unread = 0;
data->sms_status->changed = 0;
--
Daniele
- smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/05
- RE: smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/05
- Re: smsd problem with AT model - Part II,
Daniele Forsi <=
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/05
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/05
- RE: smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/06
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/06
- RE: smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/09
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/09
- Re: smsd problem with AT model - Part II, Daniele Forsi, 2006/10/06
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/06