summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/phone
authorzautrix <zautrix>2004-10-25 08:56:23 (UTC)
committer zautrix <zautrix>2004-10-25 08:56:23 (UTC)
commit62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3 (patch) (side-by-side diff)
treec2b7a41b0c8fffdc0786b84ff86724ea8f08d6a1 /gammu/emb/common/phone
parentfeff0930372dd51af24dc3b46697e70838277ea5 (diff)
downloadkdepimpi-62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3.zip
kdepimpi-62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3.tar.gz
kdepimpi-62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3.tar.bz2
gammu updates
Diffstat (limited to 'gammu/emb/common/phone') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/phone/alcatel/alcatel.c6
-rw-r--r--gammu/emb/common/phone/at/atgen.c8
-rw-r--r--gammu/emb/common/phone/at/sonyeric.c19
-rw-r--r--gammu/emb/common/phone/nokia/dct3/dct3func.c17
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n0650.c150
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n0650.h18
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n6110.c17
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n7110.c15
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n9210.c6
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n3320.c6
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n3650.c6
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n6510.c142
-rw-r--r--gammu/emb/common/phone/nokia/nauto.c6
-rw-r--r--gammu/emb/common/phone/obex/obexgen.c6
-rw-r--r--gammu/emb/common/phone/pfunc.c1
-rw-r--r--gammu/emb/common/phone/symbian/mroutgen.c6
16 files changed, 398 insertions, 31 deletions
diff --git a/gammu/emb/common/phone/alcatel/alcatel.c b/gammu/emb/common/phone/alcatel/alcatel.c
index 3821f13..b75077f 100644
--- a/gammu/emb/common/phone/alcatel/alcatel.c
+++ b/gammu/emb/common/phone/alcatel/alcatel.c
@@ -3981,3 +3981,9 @@ GSM_Phone_Functions ALCATELPhone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/at/atgen.c b/gammu/emb/common/phone/at/atgen.c
index ba23eb2..a875f0a 100644
--- a/gammu/emb/common/phone/at/atgen.c
+++ b/gammu/emb/common/phone/at/atgen.c
@@ -698,3 +698,3 @@ GSM_Error ATGEN_SetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
- if (smsc->Location!=1) return ERR_NOTSUPPORTED;
+ if (smsc->Location!=1) return ERR_INVALIDLOCATION;
@@ -3841,3 +3841,9 @@ GSM_Phone_Functions ATGENPhone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/at/sonyeric.c b/gammu/emb/common/phone/at/sonyeric.c
index 8eeb39b..363e043 100644
--- a/gammu/emb/common/phone/at/sonyeric.c
+++ b/gammu/emb/common/phone/at/sonyeric.c
@@ -16,3 +16,3 @@
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
@@ -20,2 +20,3 @@
+extern GSM_Protocol_Functions OBEXProtocol;
extern GSM_Reply_Function OBEXGENReplyFunctions[];
@@ -126,3 +127,3 @@ GSM_Error SONYERIC_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note,
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Error error;
@@ -162,3 +163,3 @@ GSM_Error SONYERIC_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, bool st
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Error error;
@@ -201,3 +202,3 @@ GSM_Error SONYERIC_GetToDoStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Error error;
@@ -232,3 +233,3 @@ GSM_Error SONYERIC_AddCalendarNote(GSM_StateMachine *s, GSM_CalendarEntry *Note)
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
unsigned char req[5000];
@@ -248,3 +249,3 @@ GSM_Error SONYERIC_AddToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Phone_ATGENData *Priv = &s->Phone.Data.Priv.ATGEN;
@@ -267,3 +268,3 @@ GSM_Error SONYERIC_DeleteAllToDo(GSM_StateMachine *s)
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Error error;
@@ -319,3 +320,3 @@ GSM_Error SONYERIC_DelCalendarNote(GSM_StateMachine *s, GSM_CalendarEntry *Note)
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Error error;
@@ -374,3 +375,3 @@ GSM_Error SONYERIC_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus *St
{
-#ifdef GSM_ENABLE_OBEXGEN
+#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
GSM_Error error;
diff --git a/gammu/emb/common/phone/nokia/dct3/dct3func.c b/gammu/emb/common/phone/nokia/dct3/dct3func.c
index 17cd0a4..9810a35 100644
--- a/gammu/emb/common/phone/nokia/dct3/dct3func.c
+++ b/gammu/emb/common/phone/nokia/dct3/dct3func.c
@@ -6,2 +6,11 @@
*/
+/* Due to a problem in the source code management, the names of some of
+ * the authors have unfortunately been lost. We do not mean to belittle
+ * their efforts and hope they will contact us to see their names
+ * properly added to the Copyright notice above.
+ * Having published their contributions under the terms of the GNU
+ * General Public License (GPL) [version 2], the Copyright of these
+ * authors will remain respected by adhering to the license they chose
+ * to publish their code under.
+ */
@@ -459,6 +468,6 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s
if (msg.Buffer[8]<0x03) {
- sprintf(NetInfo.CID, "%02x%02x", msg.Buffer[10], msg.Buffer[11]);
+ 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]);
+ sprintf(NetInfo.LAC, "%02X%02X", msg.Buffer[12], msg.Buffer[13]);
smprintf(s, "LAC : %s\n", NetInfo.LAC);
@@ -513,4 +522,4 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s
NOKIA_DecodeNetworkCode(msg.Buffer+14,Data->NetworkInfo->NetworkCode);
- sprintf(Data->NetworkInfo->CID, "%02x%02x", msg.Buffer[10], msg.Buffer[11]);
- sprintf(Data->NetworkInfo->LAC, "%02x%02x", msg.Buffer[12], msg.Buffer[13]);
+ sprintf(Data->NetworkInfo->CID, "%02X%02X", msg.Buffer[10], msg.Buffer[11]);
+ sprintf(Data->NetworkInfo->LAC, "%02X%02X", msg.Buffer[12], msg.Buffer[13]);
}
diff --git a/gammu/emb/common/phone/nokia/dct3/n0650.c b/gammu/emb/common/phone/nokia/dct3/n0650.c
new file mode 100644
index 0000000..3899a16
--- a/dev/null
+++ b/gammu/emb/common/phone/nokia/dct3/n0650.c
@@ -0,0 +1,150 @@
+/* (c) 2004 by Marcin Wiacek */
+
+#include <string.h>
+#include <time.h>
+
+#include "../../../gsmcomon.h"
+#include "../../../gsmstate.h"
+#include "../nfunc.h"
+
+#ifdef GSM_ENABLE_NOKIA650
+
+static GSM_Reply_Function N650ReplyFunctions[] = {
+ {DCT3DCT4_ReplyGetModelFirmware,"\xD2",0x02,0x00,ID_GetModel },
+ {DCT3DCT4_ReplyGetModelFirmware,"\xD2",0x02,0x00,ID_GetFirmware },
+
+ {NULL, "\x00",0x00,0x00,ID_None }
+};
+
+GSM_Phone_Functions N650Phone = {
+ "0650",
+ N650ReplyFunctions,
+ NONEFUNCTION, /* Initialise */
+ NONEFUNCTION, /* Terminate */
+ GSM_DispatchMessage,
+ NOTSUPPORTED, /* ShowStartInfo */
+ NOKIA_GetManufacturer,
+ DCT3DCT4_GetModel,
+ DCT3DCT4_GetFirmware,
+ NOTSUPPORTED, /* GetIMEI */
+ NOTSUPPORTED, /* GetOriginalIMEI */
+ NOTSUPPORTED, /* GetManufactureMonth */
+ NOTSUPPORTED, /* GetProductCode */
+ NOTSUPPORTED, /* GetHardware */
+ NOTSUPPORTED, /* GetPPM */
+ NOTSUPPORTED, /* GetSIMIMSI */
+ NOTSUPPORTED, /* GetDateTime */
+ NOTSUPPORTED, /* SetDateTime */
+ NOTSUPPORTED, /* GetAlarm */
+ NOTSUPPORTED, /* SetAlarm */
+ NOTSUPPORTED, /* GetLocale */
+ NOTSUPPORTED, /* SetLocale */
+ NOTSUPPORTED, /* PressKey */
+ NOTSUPPORTED, /* Reset */
+ NOTSUPPORTED, /* ResetPhoneSettings */
+ NOTSUPPORTED, /* EnterSecurityCode */
+ NOTSUPPORTED, /* GetSecurityStatus */
+ NOTSUPPORTED, /* GetDisplayStatus */
+ NOTSUPPORTED, /* SetAutoNetworkLogin */
+ NOTSUPPORTED, /* GetBatteryCharge */
+ NOTSUPPORTED, /* GetSignalQuality */
+ NOTSUPPORTED, /* GetNetworkInfo */
+ NOTSUPPORTED, /* GetCategory */
+ NOTSUPPORTED, /* AddCategory */
+ NOTSUPPORTED, /* GetCategoryStatus */
+ NOTSUPPORTED, /* GetMemoryStatus */
+ NOTSUPPORTED, /* GetMemory */
+ NOTSUPPORTED, /* GetNextMemory */
+ NOTSUPPORTED, /* SetMemory */
+ NOTSUPPORTED, /* AddMemory */
+ NOTSUPPORTED, /* DeleteMemory */
+ NOTIMPLEMENTED, /* DeleteAllMemory */
+ NOTSUPPORTED, /* GetSpeedDial */
+ NOTSUPPORTED, /* SetSpeedDial */
+ NOTSUPPORTED, /* GetSMSC */
+ NOTSUPPORTED, /* SetSMSC */
+ NOTSUPPORTED, /* GetSMSStatus */
+ NOTSUPPORTED, /* GetSMS */
+ NOTSUPPORTED, /* GetNextSMS */
+ NOTSUPPORTED, /* SetSMS */
+ NOTSUPPORTED, /* AddSMS */
+ NOTSUPPORTED, /* DeleteSMS */
+ NOTSUPPORTED, /* SendSMSMessage */
+ NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetIncomingSMS */
+ NOTSUPPORTED, /* SetIncomingCB */
+ NOTSUPPORTED, /* GetSMSFolders */
+ NOTSUPPORTED, /* AddSMSFolder */
+ NOTSUPPORTED, /* DeleteSMSFolder */
+ NOTSUPPORTED, /* DialVoice */
+ NOTSUPPORTED, /* AnswerCall */
+ NOTSUPPORTED, /* CancelCall */
+ NOTSUPPORTED, /* HoldCall */
+ NOTSUPPORTED, /* UnholdCall */
+ NOTSUPPORTED, /* ConferenceCall */
+ NOTSUPPORTED, /* SplitCall */
+ NOTSUPPORTED, /* TransferCall */
+ NOTSUPPORTED, /* SwitchCall */
+ NOTSUPPORTED, /* GetCallDivert */
+ NOTSUPPORTED, /* SetCallDivert */
+ NOTSUPPORTED, /* CancelAllDiverts */
+ NOTSUPPORTED, /* SetIncomingCall */
+ NOTSUPPORTED, /* SetIncomingUSSD */
+ NOTSUPPORTED, /* SendDTMF */
+ NOTSUPPORTED, /* GetRingtone */
+ NOTSUPPORTED, /* SetRingtone */
+ NOTSUPPORTED, /* GetRingtonesInfo */
+ NOTSUPPORTED, /* DeleteUserRingtones */
+ NOTSUPPORTED, /* PlayTone */
+ NOTSUPPORTED, /* GetWAPBookmark */
+ NOTSUPPORTED, /* SetWAPBookmark */
+ NOTSUPPORTED, /* DeleteWAPBookmark */
+ NOTSUPPORTED, /* GetWAPSettings */
+ NOTSUPPORTED, /* SetWAPSettings */
+ NOTSUPPORTED, /* GetMMSSettings */
+ NOTSUPPORTED, /* SetMMSSettings */
+ NOTSUPPORTED, /* GetBitmap */
+ NOTSUPPORTED, /* SetBitmap */
+ NOTSUPPORTED, /* GetToDoStatus */
+ NOTSUPPORTED, /* GetToDo */
+ NOTSUPPORTED, /* GetNextToDo */
+ NOTSUPPORTED, /* SetToDo */
+ NOTSUPPORTED, /* AddToDo */
+ NOTSUPPORTED, /* DeleteToDo */
+ NOTSUPPORTED, /* DeleteAllToDo */
+ NOTSUPPORTED, /* GetCalendarStatus */
+ NOTSUPPORTED, /* GetCalendar */
+ NOTSUPPORTED, /* GetNextCalendar */
+ NOTSUPPORTED, /* SetCalendar */
+ NOTSUPPORTED, /* AddCalendar */
+ NOTSUPPORTED, /* DeleteCalendar */
+ NOTSUPPORTED, /* DeleteAllCalendar */
+ NOTSUPPORTED, /* GetCalendarSettings */
+ NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
+ NOTSUPPORTED, /* GetProfile */
+ NOTSUPPORTED, /* SetProfile */
+ NOTSUPPORTED, /* GetFMStation */
+ NOTSUPPORTED, /* SetFMStation */
+ NOTSUPPORTED, /* ClearFMStations */
+ NOTSUPPORTED, /* GetNextFileFolder */
+ NOTSUPPORTED, /* GetFilePart */
+ NOTSUPPORTED, /* AddFilePart */
+ NOTSUPPORTED, /* GetFileSystemStatus */
+ NOTSUPPORTED, /* DeleteFile */
+ NOTSUPPORTED, /* AddFolder */
+ NOTSUPPORTED, /* GetGPRSAccessPoint */
+ NOTSUPPORTED /* SetGPRSAccessPoint */
+};
+
+#endif
+
+/* How should editor hadle tabs in this file? Add editor commands here.
+ * vim: noexpandtab sw=8 ts=8 sts=8:
+ */
diff --git a/gammu/emb/common/phone/nokia/dct3/n0650.h b/gammu/emb/common/phone/nokia/dct3/n0650.h
new file mode 100644
index 0000000..be491eb
--- a/dev/null
+++ b/gammu/emb/common/phone/nokia/dct3/n0650.h
@@ -0,0 +1,18 @@
+/* (c) 2004 by Marcin Wiacek */
+
+#ifndef n650_h
+#define n650_h
+
+typedef struct {
+ int fake;
+} GSM_Phone_N650Data;
+
+#ifndef GSM_USED_MBUS2
+# define GSM_USED_MBUS2
+#endif
+
+#endif
+
+/* How should editor hadle tabs in this file? Add editor commands here.
+ * vim: noexpandtab sw=8 ts=8 sts=8:
+ */
diff --git a/gammu/emb/common/phone/nokia/dct3/n6110.c b/gammu/emb/common/phone/nokia/dct3/n6110.c
index dac6c12..c3ddfb6 100644
--- a/gammu/emb/common/phone/nokia/dct3/n6110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n6110.c
@@ -6,2 +6,11 @@
*/
+/* Due to a problem in the source code management, the names of some of
+ * the authors have unfortunately been lost. We do not mean to belittle
+ * their efforts and hope they will contact us to see their names
+ * properly added to the Copyright notice above.
+ * Having published their contributions under the terms of the GNU
+ * General Public License (GPL) [version 2], the Copyright of these
+ * authors will remain respected by adhering to the license they chose
+ * to publish their code under.
+ */
@@ -2870,3 +2879,9 @@ GSM_Phone_Functions N6110Phone = {
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
N6110_GetProfile,
diff --git a/gammu/emb/common/phone/nokia/dct3/n7110.c b/gammu/emb/common/phone/nokia/dct3/n7110.c
index b597f9b..a8e0545 100644
--- a/gammu/emb/common/phone/nokia/dct3/n7110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n7110.c
@@ -5,2 +5,11 @@
*/
+/* Due to a problem in the source code management, the names of some of
+ * the authors have unfortunately been lost. We do not mean to belittle
+ * their efforts and hope they will contact us to see their names
+ * properly added to the Copyright notice above.
+ * Having published their contributions under the terms of the GNU
+ * General Public License (GPL) [version 2], the Copyright of these
+ * authors will remain respected by adhering to the license they chose
+ * to publish their code under.
+ */
@@ -1708,3 +1717,9 @@ GSM_Phone_Functions N7110Phone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
N7110_GetProfile,
diff --git a/gammu/emb/common/phone/nokia/dct3/n9210.c b/gammu/emb/common/phone/nokia/dct3/n9210.c
index ff71ad3..f535c2a 100644
--- a/gammu/emb/common/phone/nokia/dct3/n9210.c
+++ b/gammu/emb/common/phone/nokia/dct3/n9210.c
@@ -376,3 +376,9 @@ GSM_Phone_Functions N9210Phone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTIMPLEMENTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/nokia/dct4/n3320.c b/gammu/emb/common/phone/nokia/dct4/n3320.c
index 9b1d6cd..9dd9ffb 100644
--- a/gammu/emb/common/phone/nokia/dct4/n3320.c
+++ b/gammu/emb/common/phone/nokia/dct4/n3320.c
@@ -251,3 +251,9 @@ GSM_Phone_Functions N3320Phone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/nokia/dct4/n3650.c b/gammu/emb/common/phone/nokia/dct4/n3650.c
index d4746a7..f1fa826 100644
--- a/gammu/emb/common/phone/nokia/dct4/n3650.c
+++ b/gammu/emb/common/phone/nokia/dct4/n3650.c
@@ -372,3 +372,9 @@ GSM_Phone_Functions N3650Phone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/nokia/dct4/n6510.c b/gammu/emb/common/phone/nokia/dct4/n6510.c
index 2208def..c481863 100644
--- a/gammu/emb/common/phone/nokia/dct4/n6510.c
+++ b/gammu/emb/common/phone/nokia/dct4/n6510.c
@@ -6,2 +6,11 @@
/* function for making CRC for filesystem (c) 2003 by Michael Schroeder */
+/* Due to a problem in the source code management, the names of some of
+ * the authors have unfortunately been lost. We do not mean to belittle
+ * their efforts and hope they will contact us to see their names
+ * properly added to the Copyright notice above.
+ * Having published their contributions under the terms of the GNU
+ * General Public License (GPL) [version 2], the Copyright of these
+ * authors will remain respected by adhering to the license they chose
+ * to publish their code under.
+ */
@@ -288,6 +297,6 @@ static GSM_Error N6510_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMa
- sprintf(NetInfo.LAC, "%02x%02x", msg.Buffer[current+1], msg.Buffer[current+2]);
+ sprintf(NetInfo.LAC, "%02X%02X", msg.Buffer[current+1], msg.Buffer[current+2]);
smprintf(s, "LAC : %s\n", NetInfo.LAC);
- sprintf(NetInfo.CID, "%02x%02x", msg.Buffer[current+5], msg.Buffer[current+6]);
+ sprintf(NetInfo.CID, "%02X%02X", msg.Buffer[current+5], msg.Buffer[current+6]);
smprintf(s, "CID : %s\n", NetInfo.CID);
@@ -313,4 +322,4 @@ static GSM_Error N6510_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMa
NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,Data->NetworkInfo->NetworkName,true);
- sprintf(Data->NetworkInfo->LAC, "%02x%02x", msg.Buffer[current+1], msg.Buffer[current+2]);
- sprintf(Data->NetworkInfo->CID, "%02x%02x", msg.Buffer[current+5], msg.Buffer[current+6]);
+ sprintf(Data->NetworkInfo->LAC, "%02X%02X", msg.Buffer[current+1], msg.Buffer[current+2]);
+ sprintf(Data->NetworkInfo->CID, "%02X%02X", msg.Buffer[current+5], msg.Buffer[current+6]);
NOKIA_DecodeNetworkCode(msg.Buffer + (current+7),Data->NetworkInfo->NetworkCode);
@@ -1129,6 +1138,4 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
int Width, Height, i, count;
-#ifdef DEVELOP
unsigned char folderid;
- int location;
-#endif
+ int location;
GSM_NetworkInfo NetInfo;
@@ -1257,3 +1264,2 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
if (error == ERR_NONE) {
-#ifdef DEVELOP
sms.Folder = 0;
@@ -1267,5 +1273,2 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
reqPicture[7]=location;
-#else
- return ERR_NOTSUPPORTED;
-#endif
}
@@ -2421,2 +2424,5 @@ static GSM_Error N6510_ReplySaveSMSMessage(GSM_Protocol_Message msg, GSM_StateMa
return ERR_INVALIDLOCATION;
+ case 0x03:
+ printf("Memory full (for example no empty space in SIM)\n");
+ return ERR_FULL;
case 0x05:
@@ -2678,2 +2684,4 @@ static GSM_Error N6510_ReplyGetRingtonesInfo(GSM_Protocol_Message msg, GSM_State
Data->RingtonesInfo->Number = msg.Buffer[4] * 256 + msg.Buffer[5];
+ // allocate array of ringtones based on number
+ Data->RingtonesInfo->Ringtone = calloc(Data->RingtonesInfo->Number, sizeof(GSM_RingtoneInfo));
tmp = 6;
@@ -2756,3 +2764,3 @@ static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
{
- GSM_AllRingtonesInfo Info;
+ GSM_AllRingtonesInfo Info = {0, NULL};
GSM_Error error;
@@ -2776,3 +2784,5 @@ static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
smprintf(s, "Getting binary ringtone\n");
- return GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone);
+ error = GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone);
+ if (Info.Ringtone) free(Info.Ringtone);
+ return error;
case RING_MIDI:
@@ -4056,2 +4066,93 @@ GSM_Error N6510_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, bool start
+static GSM_Error N6510_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Not)
+{
+ GSM_Error error;
+ GSM_NOKIACalToDoLocations *LastNote = &s->Phone.Data.Priv.N6510.LastNote;
+ GSM_CalendarEntry Note;
+
+ if (!IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo, F_NOTES)) return ERR_NOTSUPPORTED;
+
+ error=N6510_GetCalendarInfo3(s,LastNote,2);
+ if (error!=ERR_NONE) return error;
+
+ smprintf(s, "Deleting Note\n");
+
+ if (Not->Location > LastNote->Number || Not->Location == 0) return ERR_INVALIDLOCATION;
+
+ Note.Location = LastNote->Location[Not->Location-1];
+ return N71_65_DelCalendar(s,&Note);
+}
+
+static GSM_Error N6510_ReplyGetNoteFirstLoc(GSM_Protocol_Message msg, GSM_StateMachine *s)
+{
+ smprintf(s, "First Note location: %i\n",msg.Buffer[8]*256+msg.Buffer[9]);
+ s->Phone.Data.Note->Location = msg.Buffer[8]*256+msg.Buffer[9];
+ return ERR_NONE;
+}
+
+static GSM_Error N6510_ReplyAddNote(GSM_Protocol_Message msg, GSM_StateMachine *s)
+{
+ smprintf(s, "ToDo added\n");
+ return ERR_NONE;
+}
+
+static GSM_Error N6510_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Not)
+{
+ GSM_Error error;
+ int count=54;
+ unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95,
+ 0x02}; /* 1 = todo, 2 = note */
+ unsigned char req[5000] = {
+ N6110_FRAME_HEADER, 0x65,
+ 0x02, /* 0 = calendar, 1 = todo, 2 = note */
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, /* location */
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, /* alarm */
+ 0x80, 0x00, 0x00,
+ 0xA9, /* note icon */
+ 0x00, 0x00, 0x00, 0x00, /* alarm type */
+ 0x00, /* 0x02 or 0x00 */
+ 0x80, /* note type */
+ 0x07, 0xD2, 0x01, 0x01, 0x00, 0x00, /* start date/time */
+ 0x07, 0xD2, 0x01, 0x11, 0x00, 0x00, /* end date/time */
+ 0x00, 0x00, /* recurrance */
+ 0xFF, 0xFF, /* birth year */
+ 0x00, /* ToDo priority */
+ 0x00, /* ToDo completed ? */
+ 0x00, 0x00, 0x00,
+ 0x00, /* note text length */
+ 0x00, /* phone length/meeting place */
+ 0x00, 0x00, 0x00};
+
+ s->Phone.Data.Note = Not;
+
+ smprintf(s, "Getting first free Note location\n");
+ error = GSM_WaitFor (s, reqLoc, 5, 0x13, 4, ID_SetNote);
+ if (error!=ERR_NONE) return error;
+ req[8] = Not->Location/256;
+ req[9] = Not->Location%256;
+
+ req[49] = UnicodeLength(Not->Text);
+ CopyUnicodeString(req+54,Not->Text);
+ count+= req[49]*2;
+
+ req[count++] = 0x00;
+
+ smprintf(s, "Adding Note\n");
+ return GSM_WaitFor (s, req, count, 0x13, 4, ID_SetNote);
+}
+
+static GSM_Error N6510_GetNoteStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
+{
+ GSM_NOKIACalToDoLocations *LastNote = &s->Phone.Data.Priv.N6510.LastNote;
+ GSM_Error error;
+
+ error = N6510_GetCalendarInfo3(s,LastNote,2);
+ if (error!=ERR_NONE) return error;
+
+ status->Used = LastNote->Number;
+ return ERR_NONE;
+}
+
static int N6510_FindFileCheckSum(unsigned char *ptr, int len)
@@ -5191,3 +5292,3 @@ static GSM_Error N6510_ReplyGetToDoFirstLoc2(GSM_Protocol_Message msg, GSM_State
smprintf(s, "First ToDo location method 2: %i\n",msg.Buffer[8]*256+msg.Buffer[9]);
- s->Phone.Data.ToDo->Location = msg.Buffer[9];
+ s->Phone.Data.ToDo->Location = msg.Buffer[8]*256+msg.Buffer[9];
return ERR_NONE;
@@ -5203,3 +5304,4 @@ static GSM_Error N6510_AddToDo2(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
int Text, Alarm, EndTime, Completed, count=54, Phone;
- unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95, 0x01};
+ unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95,
+ 0x01}; /* 1 = todo, 2 = note */
unsigned char req[5000] = {
@@ -5587,2 +5689,3 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
{N6510_ReplyAddToDo2, "\x13",0x03,0x66,ID_SetToDo },
+ {N6510_ReplyAddNote, "\x13",0x03,0x66,ID_SetNote },
{N6510_ReplyGetCalendar3, "\x13",0x03,0x7E,ID_GetCalendarNote },/*method 3*/
@@ -5595,2 +5698,3 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
{N6510_ReplyGetToDoFirstLoc2, "\x13",0x03,0x96,ID_SetToDo },
+ {N6510_ReplyGetNoteFirstLoc, "\x13",0x03,0x96,ID_SetNote },
{N6510_ReplyGetCalendarInfo, "\x13",0x03,0x9F,ID_GetCalendarNotesInfo},/*method 3*/
@@ -5734,3 +5838,3 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
GSM_Phone_Functions N6510Phone = {
- "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",
+ "1100|1100a|1100b|3100|3100b|3105|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,
@@ -5843,3 +5947,9 @@ GSM_Phone_Functions N6510Phone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ N6510_GetNoteStatus,
+ NOTIMPLEMENTED, /* GetNote */
N6510_GetNextNote,
+ NOTIMPLEMENTED, /* SetNote */
+ N6510_AddNote,
+ N6510_DeleteNote,
+ NOTSUPPORTED, /* DeleteAllNotes */
N6510_GetProfile,
diff --git a/gammu/emb/common/phone/nokia/nauto.c b/gammu/emb/common/phone/nokia/nauto.c
index 3bb53ec..3c7f2cd 100644
--- a/gammu/emb/common/phone/nokia/nauto.c
+++ b/gammu/emb/common/phone/nokia/nauto.c
@@ -123,3 +123,9 @@ GSM_Phone_Functions NAUTOPhone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/obex/obexgen.c b/gammu/emb/common/phone/obex/obexgen.c
index 3106369..b91afac 100644
--- a/gammu/emb/common/phone/obex/obexgen.c
+++ b/gammu/emb/common/phone/obex/obexgen.c
@@ -831,3 +831,9 @@ GSM_Phone_Functions OBEXGENPhone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTIMPLEMENTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/pfunc.c b/gammu/emb/common/phone/pfunc.c
index a03a81d..fe890fc 100644
--- a/gammu/emb/common/phone/pfunc.c
+++ b/gammu/emb/common/phone/pfunc.c
@@ -63,2 +63,3 @@ GSM_Error PHONE_EncodeSMSFrame(GSM_StateMachine *s, GSM_SMSMessage *SMS, unsigne
if (SMS->SMSC.Number[0] == 0x00 && SMS->SMSC.Number[1] == 0x00) {
+ smprintf(s,"No SMSC in SMS Deliver\n");
return ERR_EMPTYSMSC;
diff --git a/gammu/emb/common/phone/symbian/mroutgen.c b/gammu/emb/common/phone/symbian/mroutgen.c
index a7382cf..63d26cf 100644
--- a/gammu/emb/common/phone/symbian/mroutgen.c
+++ b/gammu/emb/common/phone/symbian/mroutgen.c
@@ -200,3 +200,9 @@ GSM_Phone_Functions MROUTERGENPhone = {
NOTSUPPORTED, /* SetCalendarSettings */
+ NOTSUPPORTED, /* GetNoteStatus */
+ NOTSUPPORTED, /* GetNote */
NOTSUPPORTED, /* GetNextNote */
+ NOTSUPPORTED, /* SetNote */
+ NOTSUPPORTED, /* AddNote */
+ NOTSUPPORTED, /* DeleteNote */
+ NOTSUPPORTED, /* DeleteAllNotes */
NOTSUPPORTED, /* GetProfile */