summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/phone/nokia
Side-by-side diff
Diffstat (limited to 'gammu/emb/common/phone/nokia') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/phone/nokia/dct3/dct3func.c16
-rw-r--r--gammu/emb/common/phone/nokia/dct3/dct3func.h2
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n6110.c17
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n7110.c9
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n9210.c3
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n3320.c3
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n3650.c3
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n6510.c168
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n6510.h2
-rw-r--r--gammu/emb/common/phone/nokia/nauto.c2
-rw-r--r--gammu/emb/common/phone/nokia/nfunc.c14
11 files changed, 179 insertions, 60 deletions
diff --git a/gammu/emb/common/phone/nokia/dct3/dct3func.c b/gammu/emb/common/phone/nokia/dct3/dct3func.c
index beef33c..17cd0a4 100644
--- a/gammu/emb/common/phone/nokia/dct3/dct3func.c
+++ b/gammu/emb/common/phone/nokia/dct3/dct3func.c
@@ -1,7 +1,10 @@
/* (c) 2001-2004 by Marcin Wiacek */
-/* based on some work from Markus Plail, Pavel Janik, others and Gnokii */
/* resetting DCT4 phones settings (c) by Walek */
+/* based on some Markus Plail, Pavel Janik & others work from Gnokii (www.gnokii.org)
+ * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
+ * GNU GPL version 2 or later
+ */
#include <string.h> /* memcpy only */
#include <stdio.h>
#include <ctype.h>
@@ -393,8 +396,9 @@ GSM_Error DCT3_ReplyGetSMSC(GSM_Protocol_Message msg, GSM_StateMachine *s)
case 0x32: Data->SMSC->Format = SMS_FORMAT_Email; break;
}
Data->SMSC->Validity.Format = SMS_Validity_RelativeFormat;
Data->SMSC->Validity.Relative = msg.Buffer[8];
+ if (msg.Buffer[8] == 0x00) Data->SMSC->Validity.Relative = SMS_VALID_Max_Time;
i=33;
while (msg.Buffer[i]!=0) {i++;}
i=i-33;
@@ -441,27 +445,27 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s
GSM_NetworkInfo NetInfo;
char name[100];
smprintf(s, "Network info received\n");
- smprintf(s, " Status : ");
+ smprintf(s, "Status : ");
switch (msg.Buffer[8]) {
case 0x01: smprintf(s, "home network"); break;
case 0x02: smprintf(s, "roaming network"); break;
case 0x03: smprintf(s, "requesting network"); break;
case 0x04: smprintf(s, "not registered in the network"); break;
default : smprintf(s, "unknown");
}
smprintf(s, "\n");
- smprintf(s, "Network selection : %s\n", msg.Buffer[9]==1?"manual":"automatic");
+ smprintf(s, "Network selection : %s\n", msg.Buffer[9]==1?"manual":"automatic");
if (msg.Buffer[8]<0x03) {
sprintf(NetInfo.CID, "%02x%02x", msg.Buffer[10], msg.Buffer[11]);
smprintf(s, "CID : %s\n", NetInfo.CID);
sprintf(NetInfo.LAC, "%02x%02x", msg.Buffer[12], msg.Buffer[13]);
smprintf(s, "LAC : %s\n", NetInfo.LAC);
- smprintf(s, "Network code : %s\n", NetInfo.NetworkCode);
NOKIA_DecodeNetworkCode(msg.Buffer+14,NetInfo.NetworkCode);
+ smprintf(s, "Network code : %s\n", NetInfo.NetworkCode);
smprintf(s, "Network name for Gammu : %s ",
DecodeUnicodeString(GSM_GetNetworkName(NetInfo.NetworkCode)));
smprintf(s, "(%s)\n",DecodeUnicodeString(GSM_GetCountryName(NetInfo.NetworkCode)));
@@ -1207,13 +1211,13 @@ GSM_Error DCT3_ReplySendSMSMessage(GSM_Protocol_Message msg, GSM_StateMachine *s
{
switch (msg.Buffer[3]) {
case 0x02:
smprintf(s, "SMS sent OK\n");
- if (s->User.SendSMSStatus!=NULL) s->User.SendSMSStatus(s->CurrentConfig->Device,0,0);
+ if (s->User.SendSMSStatus!=NULL) s->User.SendSMSStatus(s->CurrentConfig->Device,0,msg.Buffer[5]);
return ERR_NONE;
case 0x03:
smprintf(s, "Error %i\n",msg.Buffer[6]);
- if (s->User.SendSMSStatus!=NULL) s->User.SendSMSStatus(s->CurrentConfig->Device,msg.Buffer[6],0);
+ if (s->User.SendSMSStatus!=NULL) s->User.SendSMSStatus(s->CurrentConfig->Device,msg.Buffer[6],-1);
return ERR_NONE;
}
return ERR_UNKNOWNRESPONSE;
}
diff --git a/gammu/emb/common/phone/nokia/dct3/dct3func.h b/gammu/emb/common/phone/nokia/dct3/dct3func.h
index 66b67ec..18b2026 100644
--- a/gammu/emb/common/phone/nokia/dct3/dct3func.h
+++ b/gammu/emb/common/phone/nokia/dct3/dct3func.h
@@ -2,8 +2,10 @@
#ifndef phone_nokia_dct3_h
#define phone_nokia_dct3_h
+#include "../ncommon.h"
+
GSM_Error DCT3_ReplyPressKey (GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3_ReplyPlayTone (GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3_ReplyEnableSecurity (GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3_ReplyGetIMEI (GSM_Protocol_Message msg, GSM_StateMachine *s);
diff --git a/gammu/emb/common/phone/nokia/dct3/n6110.c b/gammu/emb/common/phone/nokia/dct3/n6110.c
index 263d12b..dac6c12 100644
--- a/gammu/emb/common/phone/nokia/dct3/n6110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n6110.c
@@ -1,8 +1,10 @@
/* (c) 2001-2004 by Marcin Wiacek */
-/* based on some work from Markus Plail and Gnokii */
-/* Authentication function (c) 1999 or earlier by Pavel Janik */
/* 5210 calendar IDs by Frederick Ros */
+/* based on some Markus Plail, Pavel Janik & others work from Gnokii (www.gnokii.org)
+ * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
+ * GNU GPL version 2 or later
+ */
#include "../../../gsmstate.h"
#ifdef GSM_ENABLE_NOKIA6110
@@ -126,8 +128,9 @@ static void N6110_EncodeUnicode(GSM_StateMachine *s, unsigned char *dest, const
}
#ifndef ENABLE_LGPL
+/* Pavel Janik */
/* This function provides Nokia authentication protocol.
* Nokia authentication protocol is used in the communication between Nokia
* mobile phones (e.g. Nokia 6110) and Nokia Cellular Data Suite software,
* commercially sold by Nokia Corp.
@@ -823,8 +826,9 @@ static GSM_Error N6110_SetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
if (!strcmp(s->Phone.Data.ModelInfo->model,"3210")) reqBin[5]=0x10;
smprintf(s, "Setting binary ringtone\n");
return GSM_WaitFor (s, reqBin, current, 0x40, 4, ID_SetRingtone);
case RING_MIDI:
+ case RING_MMF:
return ERR_NOTSUPPORTED;
}
return ERR_NOTSUPPORTED;
}
@@ -1523,8 +1527,9 @@ static GSM_Error N6110_ReplyGetRingtone(GSM_Protocol_Message msg, GSM_StateMachi
if (di.dl == DL_TEXTALL || di.dl == DL_TEXTALLDATE) DumpMessage(di.df, di.dl, Data->Ringtone->NokiaBinary.Frame, Data->Ringtone->NokiaBinary.Length);
#endif
return ERR_NONE;
case RING_MIDI:
+ case RING_MMF:
return ERR_NOTSUPPORTED;
}
smprintf(s, "Ringtone format is %i\n",Data->Ringtone->Format);
break;
@@ -1560,8 +1565,9 @@ static GSM_Error N6110_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
case RING_NOKIABINARY:
if (IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo,F_RING_SM)) return ERR_NOTSUPPORTED;
break;
case RING_MIDI:
+ case RING_MMF:
return ERR_NOTSUPPORTED;
}
error=DCT3_EnableSecurity (s, 0x01);
@@ -2442,10 +2448,10 @@ GSM_Error N6110_ReplyUSSDInfo(GSM_Protocol_Message msg, GSM_StateMachine *s)
{
unsigned char buffer[2000],buffer2[4000];
int tmp;
- tmp=GSM_UnpackEightBitsToSeven(0, 82, 82, msg.Buffer+8, buffer);
- msg.Buffer[tmp] = 0;
+ tmp=GSM_UnpackEightBitsToSeven(0, msg.Buffer[7], 82, msg.Buffer+8, buffer);
+ buffer[tmp] = 0;
smprintf(s, "USSD reply: \"%s\"\n",buffer);
if (s->Phone.Data.EnableIncomingUSSD && s->User.IncomingUSSD!=NULL) {
@@ -2806,8 +2812,9 @@ GSM_Phone_Functions N6110Phone = {
N6110_AddSMS,
N6110_DeleteSMSMessage,
DCT3_SendSMSMessage,
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
NOKIA_SetIncomingSMS,
DCT3_SetIncomingCB,
PHONE_GetSMSFolders,
NOTSUPPORTED, /* AddSMSFolder */
@@ -2860,9 +2867,9 @@ GSM_Phone_Functions N6110Phone = {
N6110_DeleteCalendarNote,
NOTIMPLEMENTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
N6110_GetProfile,
N6110_SetProfile,
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
diff --git a/gammu/emb/common/phone/nokia/dct3/n7110.c b/gammu/emb/common/phone/nokia/dct3/n7110.c
index 5a02c9c..b597f9b 100644
--- a/gammu/emb/common/phone/nokia/dct3/n7110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n7110.c
@@ -1,6 +1,9 @@
/* (c) 2001-2004 by Marcin Wiacek */
-/* based on some work from Markus Plail and Gnokii */
+/* based on some Markus Plail work from Gnokii (www.gnokii.org)
+ * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
+ * GNU GPL version 2 or later
+ */
#include "../../../gsmstate.h"
#ifdef GSM_ENABLE_NOKIA7110
@@ -525,8 +528,9 @@ static GSM_Error N7110_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
s->Phone.Data.Ringtone=Ringtone;
smprintf(s, "Getting binary ringtone\n");
return GSM_WaitFor (s, req, 6, 0x1f, 4, ID_GetRingtone);
case RING_MIDI:
+ case RING_MMF:
return ERR_NOTSUPPORTED;
}
return ERR_NOTSUPPORTED;
}
@@ -1646,8 +1650,9 @@ GSM_Phone_Functions N7110Phone = {
N7110_AddSMS,
N7110_DeleteSMS,
DCT3_SendSMSMessage,
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
N7110_SetIncomingSMS,
DCT3_SetIncomingCB,
N7110_GetSMSFolders,
NOTIMPLEMENTED, /* AddSMSFolder */
@@ -1700,9 +1705,9 @@ GSM_Phone_Functions N7110Phone = {
N71_65_DelCalendar,
NOTIMPLEMENTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
N7110_GetProfile,
N7110_SetProfile,
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
diff --git a/gammu/emb/common/phone/nokia/dct3/n9210.c b/gammu/emb/common/phone/nokia/dct3/n9210.c
index e82d530..ff71ad3 100644
--- a/gammu/emb/common/phone/nokia/dct3/n9210.c
+++ b/gammu/emb/common/phone/nokia/dct3/n9210.c
@@ -318,8 +318,9 @@ GSM_Phone_Functions N9210Phone = {
NOTIMPLEMENTED, /* AddSMS */
NOTIMPLEMENTED, /* DeleteSMS */
DCT3_SendSMSMessage,
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
N9210_SetIncomingSMS,
DCT3_SetIncomingCB,
NOTIMPLEMENTED, /* GetSMSFolders */
NOTSUPPORTED, /* AddSMSFolder */
@@ -372,9 +373,9 @@ GSM_Phone_Functions N9210Phone = {
NOTSUPPORTED, /* DeleteCalendar */
NOTSUPPORTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
NOTIMPLEMENTED, /* GetProfile */
NOTSUPPORTED, /* SetProfile */
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
diff --git a/gammu/emb/common/phone/nokia/dct4/n3320.c b/gammu/emb/common/phone/nokia/dct4/n3320.c
index 51e6f18..9b1d6cd 100644
--- a/gammu/emb/common/phone/nokia/dct4/n3320.c
+++ b/gammu/emb/common/phone/nokia/dct4/n3320.c
@@ -193,8 +193,9 @@ GSM_Phone_Functions N3320Phone = {
NOTSUPPORTED, /* AddSMS */
NOTSUPPORTED, /* DeleteSMS */
NOTSUPPORTED, /* SendSMS */
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
NOTSUPPORTED, /* SetIncomingSMS */
NOTSUPPORTED, /* SetIncomingCB */
NOTSUPPORTED, /* GetSMSFolders */
NOTSUPPORTED, /* AddSMSFolder */
@@ -247,9 +248,9 @@ GSM_Phone_Functions N3320Phone = {
NOTSUPPORTED, /* DeleteCalendar */
NOTIMPLEMENTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
NOTSUPPORTED, /* GetProfile */
NOTSUPPORTED, /* SetProfile */
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
diff --git a/gammu/emb/common/phone/nokia/dct4/n3650.c b/gammu/emb/common/phone/nokia/dct4/n3650.c
index 2da55bf..d4746a7 100644
--- a/gammu/emb/common/phone/nokia/dct4/n3650.c
+++ b/gammu/emb/common/phone/nokia/dct4/n3650.c
@@ -314,8 +314,9 @@ GSM_Phone_Functions N3650Phone = {
NOTSUPPORTED, /* AddSMS */
NOTSUPPORTED, /* DeleteSMS */
NOTSUPPORTED, /* SendSMS */
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
NOTSUPPORTED, /* SetIncomingSMS */
NOTSUPPORTED, /* SetIncomingCB */
NOTSUPPORTED, /* GetSMSFolders */
NOTSUPPORTED, /* AddSMSFolder */
@@ -368,9 +369,9 @@ GSM_Phone_Functions N3650Phone = {
NOTSUPPORTED, /* DeleteCalendar */
NOTIMPLEMENTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
NOTSUPPORTED, /* GetProfile */
NOTSUPPORTED, /* SetProfile */
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
diff --git a/gammu/emb/common/phone/nokia/dct4/n6510.c b/gammu/emb/common/phone/nokia/dct4/n6510.c
index 67fe492..2208def 100644
--- a/gammu/emb/common/phone/nokia/dct4/n6510.c
+++ b/gammu/emb/common/phone/nokia/dct4/n6510.c
@@ -1,6 +1,9 @@
/* (c) 2002-2004 by Marcin Wiacek */
-/* based on some work from Markus Plail, Pawel Kot and Gnokii */
+/* based on some Markus Plail, Pawel Kot work from Gnokii (www.gnokii.org)
+ * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
+ * GNU GPL version 2 or later
+ */
/* function for making CRC for filesystem (c) 2003 by Michael Schroeder */
#include "../../../gsmstate.h"
@@ -118,8 +121,10 @@ static GSM_Error N6510_ReplyGetSMSC(GSM_Protocol_Message msg, GSM_StateMachine *
case 0x32: Data->SMSC->Format = SMS_FORMAT_Email; break;
}
Data->SMSC->Validity.Format = SMS_Validity_RelativeFormat;
Data->SMSC->Validity.Relative = msg.Buffer[12];
+ if (msg.Buffer[12] == 0x00) Data->SMSC->Validity.Relative = SMS_VALID_Max_Time;
+
current = 14;
for (i=0;i<msg.Buffer[13];i++) {
switch (msg.Buffer[current]) {
case 0x81:
@@ -264,9 +269,9 @@ static GSM_Error N6510_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMa
#ifdef DEBUG
char name[100];
GSM_NetworkInfo NetInfo;
- smprintf(s, "Network status: ");
+ smprintf(s, "Network status : ");
switch (msg.Buffer[8]) {
case 0x00 : smprintf(s, "home network\n"); break;
case 0x01 : smprintf(s, "roaming network\n"); break;
case 0x04 : smprintf(s, "not logged"); break;
@@ -984,13 +989,13 @@ static GSM_Error N6510_ReplyGetOperatorLogo(GSM_Protocol_Message msg, GSM_StateM
{
GSM_Phone_Data *Data = &s->Phone.Data;
smprintf(s, "Operator logo received\n");
+ if (msg.Length == 18) return ERR_EMPTY;
NOKIA_DecodeNetworkCode(msg.Buffer+12,Data->Bitmap->NetworkCode);
smprintf(s, "Network code %s\n",Data->Bitmap->NetworkCode);
Data->Bitmap->BitmapWidth = msg.Buffer[20];
Data->Bitmap->BitmapHeight = msg.Buffer[21];
- if (msg.Length == 18) return ERR_EMPTY;
PHONE_DecodeBitmap(GSM_Nokia6510OperatorLogo,msg.Buffer+26,Data->Bitmap);
return ERR_NONE;
}
@@ -1764,9 +1769,10 @@ static GSM_Error N6510_GetSyncMLSettings(GSM_StateMachine *s, GSM_SyncMLSettings
settings->Active = settings->Connection.Active;
settings->Name[0] = 0;
settings->Name[1] = 0;
-// s->Phone.Data.SyncMLSettings = settings;
+ s->Phone.Data.SyncMLSettings = settings;
+
// smprintf(s, "Getting SyncML settings name\n");
// error = GSM_WaitFor (s, NameReq, 16, 0x43, 4, ID_GetSyncMLName);
// if (error != ERR_NONE) return error;
@@ -2282,9 +2288,9 @@ static GSM_Error N6510_DeleteSMSMessage(GSM_StateMachine *s, GSM_SMSMessage *sms
static GSM_Error N6510_ReplySendSMSMessage(GSM_Protocol_Message msg, GSM_StateMachine *s)
{
switch (msg.Buffer[8]) {
case 0x00:
- smprintf(s, "SMS sent OK, TPMR for sent sms is %02x\n",msg.Buffer[10]);
+ smprintf(s, "SMS sent OK, TPMR for sent sms is %d\n",msg.Buffer[10]);
if (s->User.SendSMSStatus!=NULL) s->User.SendSMSStatus(s->CurrentConfig->Device,0,msg.Buffer[10]);
return ERR_NONE;
default:
smprintf(s, "SMS not sent OK, error code probably %i\n",msg.Buffer[8]);
@@ -2769,8 +2775,9 @@ static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
req2[5] = Info.Ringtone[Ringtone->Location-1].ID % 256;
smprintf(s, "Getting binary ringtone\n");
return GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone);
case RING_MIDI:
+ case RING_MMF:
return ERR_NOTSUPPORTED;
}
return ERR_NOTSUPPORTED;
}
@@ -2985,8 +2992,11 @@ static GSM_Error N6510_GetProfile(GSM_StateMachine *s, GSM_Profile *Profile)
}
if (!strcmp(s->Phone.Data.ModelInfo->model,"6230")) {
return ERR_NOTSUPPORTED;
}
+ if (!strcmp(s->Phone.Data.ModelInfo->model,"5140")) {
+ return ERR_NOTSUPPORTED;
+ }
if (Profile->Location>5) return ERR_INVALIDLOCATION;
for (i = 0; i < 0x0a; i++) {
@@ -3114,11 +3124,23 @@ static GSM_Error N6510_ReplyIncomingSMS(GSM_Protocol_Message msg, GSM_StateMachi
}
static GSM_Error N6510_DialVoice(GSM_StateMachine *s, char *number, GSM_CallShowNumber ShowNumber)
{
+ unsigned int pos2 = 15;
unsigned int pos = 4;
+ unsigned char req2[100] = {N6110_FRAME_HEADER,0x01,
+ 0x00,0x02,0x07,0x04,
+ 0x01, // 1 - voice, 2 - data
+ 0x00,0x03,
+ 0x18, // length of rest + 1
+ 0x00,0x00,0x00};
unsigned char req[100] = {N6110_FRAME_HEADER,0x01,
0x0c}; /* Number length */
+ GSM_Error error;
+
+ /* USSD not supported */
+ if (number[0] == '*') return ERR_NOTSUPPORTED;
+ if (number[0] == '#') return ERR_NOTSUPPORTED;
req[pos++] = strlen(number);
EncodeUnicode(req+pos,number,strlen(number));
pos += strlen(number)*2;
@@ -3139,11 +3161,23 @@ static GSM_Error N6510_DialVoice(GSM_StateMachine *s, char *number, GSM_CallShow
case GSM_CALL_DefaultNumberPresence:
req[pos++] = 0x01;
break;
}
+ smprintf(s, "Making voice call\n");
+ error = GSM_WaitFor (s, req, pos, 0x01, 4, ID_DialVoice);
+ if (error != ERR_NOTSUPPORTED) return error;
+
+ if (ShowNumber != GSM_CALL_DefaultNumberPresence) return ERR_NOTSUPPORTED;
+
+ req2[11] = strlen(number)*2+6;
+ req2[pos2++] = strlen(number);
+ EncodeUnicode(req2+pos2,number,strlen(number));
+ pos2 += strlen(number)*2;
smprintf(s, "Making voice call\n");
- return GSM_WaitFor (s, req, pos, 0x01, 4, ID_DialVoice);
+ error = GSM_WaitFor (s, req2, pos2, 0x01, 4, ID_DialVoice);
+ if (error == ERR_NOTSUPPORTED) return ERR_NONE;
+ return error;
}
/* method 3 */
static GSM_Error N6510_ReplyGetCalendarInfo3(GSM_Protocol_Message msg, GSM_StateMachine *s, GSM_NOKIACalToDoLocations *Last)
@@ -3173,26 +3207,29 @@ static GSM_Error N6510_ReplyGetCalendarInfo3(GSM_Protocol_Message msg, GSM_State
return ERR_NONE;
}
/* method 3 */
-static GSM_Error N6510_GetCalendarInfo3(GSM_StateMachine *s, GSM_NOKIACalToDoLocations *Last, bool Calendar)
+static GSM_Error N6510_GetCalendarInfo3(GSM_StateMachine *s, GSM_NOKIACalToDoLocations *Last, char Type)
{
- GSM_Error error;
+ GSM_Error error = ERR_UNKNOWN;
int i;
unsigned char req[] = {N6110_FRAME_HEADER, 0x9E, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00, /* First location */
- 0x00}; /* 0 = calendar, 1 = ToDo in 6610 style */
+ 0x00}; /* 0 = calendar, 1 = ToDo in 6610 style, 2 = Notes */
Last->Location[0] = 0x00;
Last->Number = 0;
- if (Calendar) {
+ req[10] = Type;
+ if (Type == 0) {
smprintf(s, "Getting locations for calendar method 3\n");
error = GSM_WaitFor (s, req, 11, 0x13, 4, ID_GetCalendarNotesInfo);
- } else {
- req[10] = 0x01;
+ } else if (Type == 1) {
smprintf(s, "Getting locations for ToDo method 2\n");
error = GSM_WaitFor (s, req, 11, 0x13, 4, ID_GetToDo);
+ } else if (Type == 2) {
+ smprintf(s, "Getting locations for Notes\n");
+ error = GSM_WaitFor (s, req, 11, 0x13, 4, ID_GetNote);
}
if (error != ERR_NONE && error != ERR_EMPTY) return error;
while (1) {
@@ -3206,14 +3243,17 @@ static GSM_Error N6510_GetCalendarInfo3(GSM_StateMachine *s, GSM_NOKIACalToDoLoc
break;
}
req[8] = Last->Location[i-1] / 256;
req[9] = Last->Location[i-1] % 256;
- if (Calendar) {
+ if (Type == 0) {
smprintf(s, "Getting locations for calendar method 3\n");
error = GSM_WaitFor (s, req, 11, 0x13, 4, ID_GetCalendarNotesInfo);
- } else {
+ } else if (Type == 1) {
smprintf(s, "Getting locations for todo method 2\n");
error = GSM_WaitFor (s, req, 11, 0x13, 4, ID_GetToDo);
+ } else if (Type == 2) {
+ smprintf(s, "Getting locations for Notes\n");
+ error = GSM_WaitFor (s, req, 11, 0x13, 4, ID_GetNote);
}
if (error != ERR_NONE && error != ERR_EMPTY) return error;
}
return ERR_NONE;
@@ -3349,15 +3389,24 @@ GSM_Error N6510_ReplyGetCalendar3(GSM_Protocol_Message msg, GSM_StateMachine *s)
return ERR_NONE;
}
+static GSM_Error N6510_PrivGetGenericCalendar3(GSM_StateMachine *s, int Location, GSM_Phone_RequestID ID)
+{
+ unsigned char req[] = {N6110_FRAME_HEADER,0x7D,0x00,0x00,0x00,0x00,
+ 0x00,0x99, /* Location */
+ 0xff,0xff,0xff,0xff};
+
+ req[8] = Location / 256;
+ req[9] = Location % 256;
+
+ return GSM_WaitFor (s, req, 14, 0x13, 4, ID);
+}
+
static GSM_Error N6510_PrivGetCalendar3(GSM_StateMachine *s, GSM_CalendarEntry *Note, bool start, int *LastCalendarYear)
{
GSM_Error error;
GSM_DateTime date_time;
- unsigned char req[] = {N6110_FRAME_HEADER,0x7D,0x00,0x00,0x00,0x00,
- 0x00,0x99, /* Location */
- 0xff,0xff,0xff,0xff,0x01};
if (start) {
/* We have to get current year. It's NOT written in frame for
* Birthday
@@ -3378,14 +3427,11 @@ static GSM_Error N6510_PrivGetCalendar3(GSM_StateMachine *s, GSM_CalendarEntry *
Note->EntriesNum = 0;
Note->Entries[0].Date.Year = *LastCalendarYear;
- req[8] = Note->Location / 256;
- req[9] = Note->Location % 256;
-
s->Phone.Data.Cal=Note;
smprintf(s, "Getting calendar note method 3\n");
- return GSM_WaitFor (s, req, 15, 0x13, 4, ID_GetCalendarNote);
+ return N6510_PrivGetGenericCalendar3(s, Note->Location, ID_GetCalendarNote);
}
/* method 3 */
GSM_Error N6510_GetNextCalendar3(GSM_StateMachine *s, GSM_CalendarEntry *Note, bool start, GSM_NOKIACalToDoLocations *LastCalendar, int *LastCalendarYear, int *LastCalendarPos)
@@ -3393,9 +3439,9 @@ GSM_Error N6510_GetNextCalendar3(GSM_StateMachine *s, GSM_CalendarEntry *Note, b
GSM_Error error;
bool start2;
if (start) {
- error=N6510_GetCalendarInfo3(s,LastCalendar,true);
+ error=N6510_GetCalendarInfo3(s,LastCalendar,0);
if (error!=ERR_NONE) return error;
if (LastCalendar->Number == 0) return ERR_EMPTY;
*LastCalendarPos = 0;
@@ -3476,9 +3522,9 @@ static GSM_Error N6510_FindCalendarIconID3(GSM_StateMachine *s, GSM_CalendarEntr
}
smprintf(s, "Starting finding note ID\n");
- error=N6510_GetCalendarInfo3(s, &Priv->LastCalendar,true);
+ error=N6510_GetCalendarInfo3(s, &Priv->LastCalendar,0);
memcpy(&LastCalendar1,&Priv->LastCalendar,sizeof(GSM_NOKIACalToDoLocations));
if (error != ERR_NONE) return error;
if (IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo, F_CAL35) ||
@@ -3493,9 +3539,9 @@ static GSM_Error N6510_FindCalendarIconID3(GSM_StateMachine *s, GSM_CalendarEntr
}
}
if (error != ERR_NONE) return error;
- error=N6510_GetCalendarInfo3(s, &Priv->LastCalendar,true);
+ error=N6510_GetCalendarInfo3(s, &Priv->LastCalendar,0);
memcpy(&LastCalendar2,&Priv->LastCalendar,sizeof(GSM_NOKIACalToDoLocations));
if (error != ERR_NONE) return error;
smprintf(s,"Number of entries: %i %i\n",LastCalendar1.Number,LastCalendar2.Number);
@@ -3736,9 +3782,9 @@ static GSM_Error N6510_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus
/* Method 2 */
// return ERR_NOTSUPPORTED;
} else {
/* Method 3 */
- error=N6510_GetCalendarInfo3(s,&s->Phone.Data.Priv.N6510.LastCalendar,true);
+ error=N6510_GetCalendarInfo3(s,&s->Phone.Data.Priv.N6510.LastCalendar,0);
if (error!=ERR_NONE) return error;
Status->Used = s->Phone.Data.Priv.N6510.LastCalendar.Number;
return ERR_NONE;
}
@@ -3971,8 +4017,44 @@ static GSM_Error N6510_ShowStartInfo(GSM_StateMachine *s, bool enable)
return N6510_SetLight(s,N6510_LIGHT_KEYPAD,false);
}
}
+static GSM_Error N6510_ReplyGetNoteInfo(GSM_Protocol_Message msg, GSM_StateMachine *s)
+{
+ return N6510_ReplyGetCalendarInfo3(msg, s, &s->Phone.Data.Priv.N6510.LastNote);
+}
+
+static GSM_Error N6510_ReplyGetNote(GSM_Protocol_Message msg, GSM_StateMachine *s)
+{
+ smprintf(s, "Note received\n");
+ memcpy(s->Phone.Data.Note->Text,msg.Buffer+54,(msg.Buffer[50]*256+msg.Buffer[51])*2);
+ s->Phone.Data.Note->Text[(msg.Buffer[50]*256+msg.Buffer[51])*2] = 0;
+ s->Phone.Data.Note->Text[(msg.Buffer[50]*256+msg.Buffer[51])*2+1] = 0;
+ return ERR_NONE;
+}
+
+GSM_Error N6510_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, bool start)
+{
+ GSM_Error error;
+ GSM_NOKIACalToDoLocations *LastNote = &s->Phone.Data.Priv.N6510.LastNote;
+
+ if (!IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo, F_NOTES)) return ERR_NOTSUPPORTED;
+
+ if (start) {
+ error=N6510_GetCalendarInfo3(s,LastNote,2);
+ if (error!=ERR_NONE) return error;
+ Note->Location = 1;
+ } else {
+ Note->Location++;
+ }
+
+ if (Note->Location > LastNote->Number) return ERR_EMPTY;
+
+ s->Phone.Data.Note = Note;
+ smprintf(s, "Getting note\n");
+ return N6510_PrivGetGenericCalendar3(s, LastNote->Location[Note->Location-1], ID_GetNote);
+}
+
static int N6510_FindFileCheckSum(unsigned char *ptr, int len)
{
int acc, i, accx;
@@ -4054,9 +4136,9 @@ static GSM_Error N6510_ReplyGetFileFolderInfo(GSM_Protocol_Message msg, GSM_Stat
else if (msg.Buffer[i]==0x08 && msg.Buffer[i+2]==0x05)
File->Type = GSM_File_Video_3GP;
else if (msg.Buffer[i]==0x10 && msg.Buffer[i+2]==0x01)
File->Type = GSM_File_Java_JAR;
-#if DEVELOP
+#ifdef DEVELOP
else if (msg.Buffer[i]==0x00 && msg.Buffer[i+2]==0x01)
File->Type = GSM_File_MMS;
#endif
}
@@ -4397,9 +4479,9 @@ static GSM_Error N6510_AddFilePart(GSM_StateMachine *s, GSM_File *File, int *Pos
s->Phone.Data.File = File;
if (*Pos == 0) {
error = N6510_SearchForFileName(s,File);
- if (error == ERR_NONE) return ERR_INVALIDLOCATION;
+ if (error == ERR_NONE) return ERR_FILEALREADYEXIST;
if (error != ERR_EMPTY) return error;
Header[8] = atoi(File->ID_FullName) / 256;
Header[9] = atoi(File->ID_FullName) % 256;
@@ -4813,9 +4895,9 @@ static GSM_Error N6510_GetToDoStatus2(GSM_StateMachine *s, GSM_ToDoStatus *statu
{
GSM_NOKIACalToDoLocations *LastToDo = &s->Phone.Data.Priv.N6510.LastToDo;
GSM_Error error;
- error = N6510_GetCalendarInfo3(s,LastToDo,false);
+ error = N6510_GetCalendarInfo3(s,LastToDo,1);
if (error!=ERR_NONE) return error;
status->Used = LastToDo->Number;
return ERR_NONE;
@@ -4943,10 +5025,9 @@ static GSM_Error N6510_ReplyGetToDo2(GSM_Protocol_Message msg, GSM_StateMachine
Last->EntriesNum++;
smprintf(s,"Completed\n");
}
- if (msg.Buffer[14] == 0xFF && msg.Buffer[15] == 0xFF && msg.Buffer[16] == 0xff && msg.Buffer[17] == 0xff)
- {
+ if (msg.Buffer[14] == 0xFF && msg.Buffer[15] == 0xFF && msg.Buffer[16] == 0xff && msg.Buffer[17] == 0xff) {
smprintf(s, "No alarm\n");
} else {
diff = ((unsigned int)msg.Buffer[14]) << 24;
diff += ((unsigned int)msg.Buffer[15]) << 16;
@@ -4977,30 +5058,22 @@ static GSM_Error N6510_ReplyGetToDo2(GSM_Protocol_Message msg, GSM_StateMachine
static GSM_Error N6510_GetNextToDo2(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, bool refresh)
{
GSM_Error error;
GSM_NOKIACalToDoLocations *LastToDo = &s->Phone.Data.Priv.N6510.LastToDo;
- /* The same to getting calendar method 3 */
- unsigned char req[] = {
- N6110_FRAME_HEADER,0x7D,0x00,0x00,0x00,0x00,
- 0x00,0x99, /* Location */
- 0xff,0xff,0xff,0xff,0x01};
if (refresh) {
- error=N6510_GetCalendarInfo3(s,LastToDo,false);
+ error=N6510_GetCalendarInfo3(s,LastToDo,1);
if (error!=ERR_NONE) return error;
ToDo->Location = 1;
} else {
ToDo->Location++;
}
if (ToDo->Location > LastToDo->Number) return ERR_EMPTY;
- req[8] = LastToDo->Location[ToDo->Location-1] / 256;
- req[9] = LastToDo->Location[ToDo->Location-1] % 256;
-
s->Phone.Data.ToDo = ToDo;
smprintf(s, "Getting todo method 2\n");
- return GSM_WaitFor (s, req, 15, 0x13, 4, ID_GetToDo);
+ return N6510_PrivGetGenericCalendar3(s, LastToDo->Location[ToDo->Location-1], ID_GetToDo);
}
static GSM_Error N6510_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, bool refresh)
{
@@ -5042,9 +5115,9 @@ static GSM_Error N6510_DeleteToDo2(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
if (!IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo, F_TODO66)) {
return ERR_NOTSUPPORTED;
}
- error=N6510_GetCalendarInfo3(s,LastToDo,false);
+ error=N6510_GetCalendarInfo3(s,LastToDo,1);
if (error!=ERR_NONE) return error;
smprintf(s, "Deleting ToDo method 2\n");
@@ -5450,15 +5523,21 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
{N71_65_ReplyCallInfo, "\x01",0x03,0x0A,ID_IncomingFrame },
{N71_65_ReplyCallInfo, "\x01",0x03,0x0B,ID_IncomingFrame },
{N71_65_ReplyCallInfo, "\x01",0x03,0x0C,ID_DialVoice },
{N71_65_ReplyCallInfo, "\x01",0x03,0x0C,ID_IncomingFrame },
+ {N71_65_ReplyCallInfo, "\x01",0x03,0x0F,ID_IncomingFrame },
+ {N71_65_ReplyCallInfo, "\x01",0x03,0x10,ID_DialVoice },
+ {N71_65_ReplyCallInfo, "\x01",0x03,0x10,ID_IncomingFrame },
{N71_65_ReplyCallInfo, "\x01",0x03,0x23,ID_IncomingFrame },
{N71_65_ReplyCallInfo, "\x01",0x03,0x25,ID_IncomingFrame },
{N71_65_ReplyCallInfo, "\x01",0x03,0x27,ID_IncomingFrame },
{N71_65_ReplySendDTMF, "\x01",0x03,0x51,ID_SendDTMF },
{N71_65_ReplyCallInfo, "\x01",0x03,0x53,ID_IncomingFrame },
{N71_65_ReplySendDTMF, "\x01",0x03,0x59,ID_SendDTMF },
{N71_65_ReplySendDTMF, "\x01",0x03,0x5E,ID_SendDTMF },
+ {N71_65_ReplyCallInfo, "\x01",0x03,0xA6,ID_IncomingFrame },
+ {N71_65_ReplyCallInfo, "\x01",0x03,0xD2,ID_IncomingFrame },
+ {N71_65_ReplyCallInfo, "\x01",0x03,0xD3,ID_IncomingFrame },
{N6510_ReplySendSMSMessage, "\x02",0x03,0x03,ID_IncomingFrame },
{N6510_ReplyIncomingSMS, "\x02",0x03,0x04,ID_IncomingFrame },
{N6510_ReplySetSMSC, "\x02",0x03,0x13,ID_SetSMSC },
@@ -5507,15 +5586,17 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
{N6510_ReplyAddCalendar3, "\x13",0x03,0x66,ID_SetCalendarNote },/*method 3*/
{N6510_ReplyAddToDo2, "\x13",0x03,0x66,ID_SetToDo },
{N6510_ReplyGetCalendar3, "\x13",0x03,0x7E,ID_GetCalendarNote },/*method 3*/
{N6510_ReplyGetToDo2, "\x13",0x03,0x7E,ID_GetToDo },
+ {N6510_ReplyGetNote, "\x13",0x03,0x7E,ID_GetNote },
{N6510_ReplyGetCalendarSettings, "\x13",0x03,0x86,ID_GetCalendarSettings },
{N6510_ReplyGetLocale, "\x13",0x03,0x8A,ID_GetLocale },
{N6510_ReplyGetCalendarSettings, "\x13",0x03,0x8E,ID_GetCalendarSettings },
{N6510_ReplyGetCalendarNotePos, "\x13",0x03,0x96,ID_GetCalendarNotePos },/*method 3*/
{N6510_ReplyGetToDoFirstLoc2, "\x13",0x03,0x96,ID_SetToDo },
{N6510_ReplyGetCalendarInfo, "\x13",0x03,0x9F,ID_GetCalendarNotesInfo},/*method 3*/
{N6510_ReplyGetToDoStatus2, "\x13",0x03,0x9F,ID_GetToDo },
+ {N6510_ReplyGetNoteInfo, "\x13",0x03,0x9F,ID_GetNote },
{N6510_ReplySaveSMSMessage, "\x14",0x03,0x01,ID_SaveSMSMessage },
{N6510_ReplySetPicture, "\x14",0x03,0x01,ID_SetBitmap },
{N6510_ReplyGetSMSMessage, "\x14",0x03,0x03,ID_GetSMSMessage },
@@ -5650,9 +5731,9 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
{NULL, "\x00",0x00,0x00,ID_None }
};
GSM_Phone_Functions N6510Phone = {
- "1100|1100a|1100b|3100|3100b|3108|3200|3200a|3300|3510|3510i|3530|3589i|3590|3595|5100|6100|6200|6220|6230|6310|6310i|6385|6510|6610|6800|7210|7250|7250i|7600|8310|8390|8910|8910i",
+ "1100|1100a|1100b|3100|3100b|3108|3200|3200a|3300|3510|3510i|3530|3589i|3590|3595|5100|5140|6100|6200|6220|6230|6310|6310i|6385|6510|6610|6610i|6800|6810|6820|7210|7250|7250i|7600|8310|8390|8910|8910i",
N6510ReplyFunctions,
N6510_Initialise,
NONEFUNCTION, /* Terminate */
GSM_DispatchMessage,
@@ -5704,8 +5785,9 @@ GSM_Phone_Functions N6510Phone = {
N6510_AddSMS,
N6510_DeleteSMSMessage,
N6510_SendSMSMessage,
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
NOKIA_SetIncomingSMS,
NOTIMPLEMENTED, /* SetIncomingCB */
N6510_GetSMSFolders,
N6510_AddSMSFolder,
@@ -5758,9 +5840,9 @@ GSM_Phone_Functions N6510Phone = {
N71_65_DelCalendar,
NOTIMPLEMENTED, /* DeleteAllCalendar */
N6510_GetCalendarSettings,
NOTSUPPORTED, /* SetCalendarSettings */
- NOTIMPLEMENTED, /* GetNote */
+ N6510_GetNextNote,
N6510_GetProfile,
N6510_SetProfile,
N6510_GetFMStation,
N6510_SetFMStation,
diff --git a/gammu/emb/common/phone/nokia/dct4/n6510.h b/gammu/emb/common/phone/nokia/dct4/n6510.h
index 4717aeb..26623d6 100644
--- a/gammu/emb/common/phone/nokia/dct4/n6510.h
+++ b/gammu/emb/common/phone/nokia/dct4/n6510.h
@@ -33,8 +33,10 @@ typedef struct {
GSM_SMSFolders LastSMSFolders;
GSM_NOKIACalToDoLocations LastToDo;
+ GSM_NOKIACalToDoLocations LastNote;
+
unsigned char RingtoneID; /* When set with preview */
int FilesLocations[1000];
int FilesLevels[1000];
diff --git a/gammu/emb/common/phone/nokia/nauto.c b/gammu/emb/common/phone/nokia/nauto.c
index bf74bc9..3bb53ec 100644
--- a/gammu/emb/common/phone/nokia/nauto.c
+++ b/gammu/emb/common/phone/nokia/nauto.c
@@ -120,9 +120,9 @@ GSM_Phone_Functions NAUTOPhone = {
NOTSUPPORTED, /* DeleteCalendar */
NOTSUPPORTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
NOTSUPPORTED, /* GetProfile */
NOTSUPPORTED, /* SetProfile */
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
diff --git a/gammu/emb/common/phone/nokia/nfunc.c b/gammu/emb/common/phone/nokia/nfunc.c
index 3acfb10..d4d8b03 100644
--- a/gammu/emb/common/phone/nokia/nfunc.c
+++ b/gammu/emb/common/phone/nokia/nfunc.c
@@ -1392,8 +1392,13 @@ GSM_Error N71_65_ReplyCallInfo(GSM_Protocol_Message msg, GSM_StateMachine *s)
if (msg.Buffer[4] == 0x01) smprintf(s, "Audio enabled\n");
else smprintf(s, "Audio disabled\n");
call.CallIDAvailable = false;
break;
+ case 0x0f:
+ case 0x10:
+ smprintf(s, "Meaning not known\n");
+ call.CallIDAvailable = false;
+ break;
case 0x23:
smprintf(s, "Call held\n");
call.Status = GSM_CALL_CallHeld;
break;
@@ -1415,14 +1420,23 @@ GSM_Error N71_65_ReplyCallInfo(GSM_Protocol_Message msg, GSM_StateMachine *s)
call.Status = GSM_CALL_OutgoingCall;
tmp = 6;
NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,call.PhoneNumber,false);
break;
+ case 0xA6:
+ case 0xD2:
+ case 0xD3:
+ smprintf(s, "Meaning not known\n");
+ call.CallIDAvailable = false;
+ break;
}
if (call.CallIDAvailable) smprintf(s, "Call ID : %d\n",msg.Buffer[4]);
if (s->Phone.Data.EnableIncomingCall && s->User.IncomingCall!=NULL && call.Status != 0) {
if (call.CallIDAvailable) call.CallID = msg.Buffer[4];
s->User.IncomingCall(s->CurrentConfig->Device, call);
}
+ if (s->Phone.Data.RequestID == ID_DialVoice) {
+ if (msg.Buffer[3] == 0x10) return ERR_NOTSUPPORTED;
+ }
if (s->Phone.Data.RequestID == ID_CancelCall) {
if (msg.Buffer[3] == 0x09) {
if (s->Phone.Data.CallID == msg.Buffer[4]) return ERR_NONE;
/* when we canceled call and see frame about other