Diffstat (limited to 'gammu/emb/common/phone/nokia/dct4/n6510.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/phone/nokia/dct4/n6510.c | 142 |
1 files changed, 126 insertions, 16 deletions
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 | |||
@@ -1,18 +1,27 @@ | |||
1 | /* (c) 2002-2004 by Marcin Wiacek */ | 1 | /* (c) 2002-2004 by Marcin Wiacek */ |
2 | /* based on some Markus Plail, Pawel Kot work from Gnokii (www.gnokii.org) | 2 | /* based on some Markus Plail, Pawel Kot work from Gnokii (www.gnokii.org) |
3 | * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot | 3 | * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot |
4 | * GNU GPL version 2 or later | 4 | * GNU GPL version 2 or later |
5 | */ | 5 | */ |
6 | /* function for making CRC for filesystem (c) 2003 by Michael Schroeder */ | 6 | /* function for making CRC for filesystem (c) 2003 by Michael Schroeder */ |
7 | /* Due to a problem in the source code management, the names of some of | ||
8 | * the authors have unfortunately been lost. We do not mean to belittle | ||
9 | * their efforts and hope they will contact us to see their names | ||
10 | * properly added to the Copyright notice above. | ||
11 | * Having published their contributions under the terms of the GNU | ||
12 | * General Public License (GPL) [version 2], the Copyright of these | ||
13 | * authors will remain respected by adhering to the license they chose | ||
14 | * to publish their code under. | ||
15 | */ | ||
7 | 16 | ||
8 | #include "../../../gsmstate.h" | 17 | #include "../../../gsmstate.h" |
9 | 18 | ||
10 | #ifdef GSM_ENABLE_NOKIA6510 | 19 | #ifdef GSM_ENABLE_NOKIA6510 |
11 | 20 | ||
12 | #include <string.h> | 21 | #include <string.h> |
13 | #include <time.h> | 22 | #include <time.h> |
14 | 23 | ||
15 | #include "../../../misc/coding/coding.h" | 24 | #include "../../../misc/coding/coding.h" |
16 | #include "../../../gsmcomon.h" | 25 | #include "../../../gsmcomon.h" |
17 | #include "../../../service/gsmlogo.h" | 26 | #include "../../../service/gsmlogo.h" |
18 | #include "../nfunc.h" | 27 | #include "../nfunc.h" |
@@ -277,51 +286,51 @@ static GSM_Error N6510_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMa | |||
277 | case 0x04 : smprintf(s, "not logged"); break; | 286 | case 0x04 : smprintf(s, "not logged"); break; |
278 | case 0x06 : smprintf(s, "SIM card rejected\n"); break; | 287 | case 0x06 : smprintf(s, "SIM card rejected\n"); break; |
279 | case 0x09 : smprintf(s, "not logged"); break; | 288 | case 0x09 : smprintf(s, "not logged"); break; |
280 | default : smprintf(s, "unknown %i!\n",msg.Buffer[8]); break; | 289 | default : smprintf(s, "unknown %i!\n",msg.Buffer[8]); break; |
281 | } | 290 | } |
282 | if (msg.Buffer[8]==0x00 || msg.Buffer[8] == 0x01) { | 291 | if (msg.Buffer[8]==0x00 || msg.Buffer[8] == 0x01) { |
283 | NOKIA_DecodeNetworkCode(msg.Buffer + (current + 7),NetInfo.NetworkCode); | 292 | NOKIA_DecodeNetworkCode(msg.Buffer + (current + 7),NetInfo.NetworkCode); |
284 | smprintf(s, "Network code : %s\n", NetInfo.NetworkCode); | 293 | smprintf(s, "Network code : %s\n", NetInfo.NetworkCode); |
285 | smprintf(s, "Network name for Gammu : %s ", | 294 | smprintf(s, "Network name for Gammu : %s ", |
286 | DecodeUnicodeString(GSM_GetNetworkName(NetInfo.NetworkCode))); | 295 | DecodeUnicodeString(GSM_GetNetworkName(NetInfo.NetworkCode))); |
287 | smprintf(s, "(%s)\n",DecodeUnicodeString(GSM_GetCountryName(NetInfo.NetworkCode))); | 296 | smprintf(s, "(%s)\n",DecodeUnicodeString(GSM_GetCountryName(NetInfo.NetworkCode))); |
288 | 297 | ||
289 | sprintf(NetInfo.LAC,"%02x%02x", msg.Buffer[current+1], msg.Buffer[current+2]); | 298 | sprintf(NetInfo.LAC,"%02X%02X", msg.Buffer[current+1], msg.Buffer[current+2]); |
290 | smprintf(s, "LAC : %s\n", NetInfo.LAC); | 299 | smprintf(s, "LAC : %s\n", NetInfo.LAC); |
291 | 300 | ||
292 | sprintf(NetInfo.CID, "%02x%02x", msg.Buffer[current+5], msg.Buffer[current+6]); | 301 | sprintf(NetInfo.CID, "%02X%02X", msg.Buffer[current+5], msg.Buffer[current+6]); |
293 | smprintf(s, "CID : %s\n", NetInfo.CID); | 302 | smprintf(s, "CID : %s\n", NetInfo.CID); |
294 | 303 | ||
295 | tmp = 10; | 304 | tmp = 10; |
296 | NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,name,true); | 305 | NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,name,true); |
297 | smprintf(s, "Network name for phone : %s\n",DecodeUnicodeString(name)); | 306 | smprintf(s, "Network name for phone : %s\n",DecodeUnicodeString(name)); |
298 | } | 307 | } |
299 | #endif | 308 | #endif |
300 | if (Data->RequestID==ID_GetNetworkInfo) { | 309 | if (Data->RequestID==ID_GetNetworkInfo) { |
301 | Data->NetworkInfo->NetworkName[0] = 0x00; | 310 | Data->NetworkInfo->NetworkName[0] = 0x00; |
302 | Data->NetworkInfo->NetworkName[1] = 0x00; | 311 | Data->NetworkInfo->NetworkName[1] = 0x00; |
303 | Data->NetworkInfo->State = 0; | 312 | Data->NetworkInfo->State = 0; |
304 | switch (msg.Buffer[8]) { | 313 | switch (msg.Buffer[8]) { |
305 | case 0x00: Data->NetworkInfo->State = GSM_HomeNetwork; break; | 314 | case 0x00: Data->NetworkInfo->State = GSM_HomeNetwork; break; |
306 | case 0x01: Data->NetworkInfo->State = GSM_RoamingNetwork;break; | 315 | case 0x01: Data->NetworkInfo->State = GSM_RoamingNetwork;break; |
307 | case 0x04: | 316 | case 0x04: |
308 | case 0x06: | 317 | case 0x06: |
309 | case 0x09: Data->NetworkInfo->State = GSM_NoNetwork; break; | 318 | case 0x09: Data->NetworkInfo->State = GSM_NoNetwork; break; |
310 | } | 319 | } |
311 | if (Data->NetworkInfo->State == GSM_HomeNetwork || Data->NetworkInfo->State == GSM_RoamingNetwork) { | 320 | if (Data->NetworkInfo->State == GSM_HomeNetwork || Data->NetworkInfo->State == GSM_RoamingNetwork) { |
312 | tmp = 10; | 321 | tmp = 10; |
313 | NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,Data->NetworkInfo->NetworkName,true); | 322 | NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,Data->NetworkInfo->NetworkName,true); |
314 | sprintf(Data->NetworkInfo->LAC, "%02x%02x", msg.Buffer[current+1], msg.Buffer[current+2]); | 323 | sprintf(Data->NetworkInfo->LAC, "%02X%02X", msg.Buffer[current+1], msg.Buffer[current+2]); |
315 | sprintf(Data->NetworkInfo->CID, "%02x%02x", msg.Buffer[current+5], msg.Buffer[current+6]); | 324 | sprintf(Data->NetworkInfo->CID, "%02X%02X", msg.Buffer[current+5], msg.Buffer[current+6]); |
316 | NOKIA_DecodeNetworkCode(msg.Buffer + (current+7),Data->NetworkInfo->NetworkCode); | 325 | NOKIA_DecodeNetworkCode(msg.Buffer + (current+7),Data->NetworkInfo->NetworkCode); |
317 | } | 326 | } |
318 | } | 327 | } |
319 | return ERR_NONE; | 328 | return ERR_NONE; |
320 | } | 329 | } |
321 | 330 | ||
322 | static GSM_Error N6510_GetNetworkInfo(GSM_StateMachine *s, GSM_NetworkInfo *netinfo) | 331 | static GSM_Error N6510_GetNetworkInfo(GSM_StateMachine *s, GSM_NetworkInfo *netinfo) |
323 | { | 332 | { |
324 | unsigned char req[] = {N6110_FRAME_HEADER, 0x00, 0x00}; | 333 | unsigned char req[] = {N6110_FRAME_HEADER, 0x00, 0x00}; |
325 | 334 | ||
326 | s->Phone.Data.NetworkInfo=netinfo; | 335 | s->Phone.Data.NetworkInfo=netinfo; |
327 | smprintf(s, "Getting network info\n"); | 336 | smprintf(s, "Getting network info\n"); |
@@ -1118,28 +1127,26 @@ static GSM_Error N6510_SetCallerLogo(GSM_StateMachine *s, GSM_Bitmap *bitmap) | |||
1118 | 1127 | ||
1119 | static GSM_Error N6510_ReplySetPicture(GSM_Protocol_Message msg, GSM_StateMachine *s) | 1128 | static GSM_Error N6510_ReplySetPicture(GSM_Protocol_Message msg, GSM_StateMachine *s) |
1120 | { | 1129 | { |
1121 | //smprintf(s, "Picture Image written OK, folder %i, location %i\n",msg.Buffer[4],msg.Buffer[5]*256+msg.Buffer[6]); | 1130 | //smprintf(s, "Picture Image written OK, folder %i, location %i\n",msg.Buffer[4],msg.Buffer[5]*256+msg.Buffer[6]); |
1122 | return ERR_NONE; | 1131 | return ERR_NONE; |
1123 | } | 1132 | } |
1124 | 1133 | ||
1125 | static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap) | 1134 | static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap) |
1126 | { | 1135 | { |
1127 | GSM_SMSMessage sms; | 1136 | GSM_SMSMessage sms; |
1128 | GSM_Phone_Bitmap_TypesType; | 1137 | GSM_Phone_Bitmap_TypesType; |
1129 | int Width, Height, i, count; | 1138 | int Width, Height, i, count; |
1130 | #ifdef DEVELOP | ||
1131 | unsigned char folderid; | 1139 | unsigned char folderid; |
1132 | int location; | 1140 | int location; |
1133 | #endif | ||
1134 | GSM_NetworkInfo NetInfo; | 1141 | GSM_NetworkInfo NetInfo; |
1135 | GSM_Error error; | 1142 | GSM_Error error; |
1136 | unsigned char reqStartup[1000] = { | 1143 | unsigned char reqStartup[1000] = { |
1137 | N7110_FRAME_HEADER, 0x04, 0x0F, | 1144 | N7110_FRAME_HEADER, 0x04, 0x0F, |
1138 | 0x00, 0x00, 0x00, | 1145 | 0x00, 0x00, 0x00, |
1139 | 0x04, 0xC0, 0x02, 0x00, | 1146 | 0x04, 0xC0, 0x02, 0x00, |
1140 | 0x41, 0xC0, 0x03, 0x00, | 1147 | 0x41, 0xC0, 0x03, 0x00, |
1141 | 0x60, 0xC0, 0x04}; | 1148 | 0x60, 0xC0, 0x04}; |
1142 | unsigned char reqColourWallPaper[200] = { | 1149 | unsigned char reqColourWallPaper[200] = { |
1143 | N6110_FRAME_HEADER, 0x07, 0x00, 0x00, 0x00, 0xD5, | 1150 | N6110_FRAME_HEADER, 0x07, 0x00, 0x00, 0x00, 0xD5, |
1144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, | 1151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, |
1145 | 0x00, 0x00, 0x00, 0x01, 0x00, | 1152 | 0x00, 0x00, 0x00, 0x01, 0x00, |
@@ -1246,37 +1253,33 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap) | |||
1246 | smprintf(s, "Setting colour startup logo\n"); | 1253 | smprintf(s, "Setting colour startup logo\n"); |
1247 | return GSM_WaitFor (s, reqColourStartup, 9, 0x7A, 4, ID_SetBitmap); | 1254 | return GSM_WaitFor (s, reqColourStartup, 9, 0x7A, 4, ID_SetBitmap); |
1248 | case 1: reqColourStartup[8] = Bitmap->ID; | 1255 | case 1: reqColourStartup[8] = Bitmap->ID; |
1249 | smprintf(s, "Setting colour startup logo\n"); | 1256 | smprintf(s, "Setting colour startup logo\n"); |
1250 | return GSM_WaitFor (s, reqColourStartup, 9, 0x7A, 4, ID_SetBitmap); | 1257 | return GSM_WaitFor (s, reqColourStartup, 9, 0x7A, 4, ID_SetBitmap); |
1251 | default:return ERR_NOTSUPPORTED; | 1258 | default:return ERR_NOTSUPPORTED; |
1252 | } | 1259 | } |
1253 | case GSM_CallerGroupLogo: | 1260 | case GSM_CallerGroupLogo: |
1254 | return N6510_SetCallerLogo(s,Bitmap); | 1261 | return N6510_SetCallerLogo(s,Bitmap); |
1255 | case GSM_PictureImage: | 1262 | case GSM_PictureImage: |
1256 | error = N6510_GetPictureImage(s, Bitmap, &sms.Location); | 1263 | error = N6510_GetPictureImage(s, Bitmap, &sms.Location); |
1257 | if (error == ERR_NONE) { | 1264 | if (error == ERR_NONE) { |
1258 | #ifdef DEVELOP | ||
1259 | sms.Folder = 0; | 1265 | sms.Folder = 0; |
1260 | N6510_GetSMSLocation(s, &sms, &folderid, &location); | 1266 | N6510_GetSMSLocation(s, &sms, &folderid, &location); |
1261 | switch (folderid) { | 1267 | switch (folderid) { |
1262 | case 0x01: reqPicture[5] = 0x02; break; /* INBOX SIM */ | 1268 | case 0x01: reqPicture[5] = 0x02; break; /* INBOX SIM */ |
1263 | case 0x02: reqPicture[5] = 0x03; break; /* OUTBOX SIM */ | 1269 | case 0x02: reqPicture[5] = 0x03; break; /* OUTBOX SIM */ |
1264 | default : reqPicture[5] = folderid - 1; reqPicture[4] = 0x02; break; /* ME folders*/ | 1270 | default : reqPicture[5] = folderid - 1; reqPicture[4] = 0x02; break; /* ME folders*/ |
1265 | } | 1271 | } |
1266 | reqPicture[6]=location / 256; | 1272 | reqPicture[6]=location / 256; |
1267 | reqPicture[7]=location; | 1273 | reqPicture[7]=location; |
1268 | #else | ||
1269 | return ERR_NOTSUPPORTED; | ||
1270 | #endif | ||
1271 | } | 1274 | } |
1272 | Type = GSM_NokiaPictureImage; | 1275 | Type = GSM_NokiaPictureImage; |
1273 | count = 78; | 1276 | count = 78; |
1274 | PHONE_EncodeBitmap(Type, reqPicture + count, Bitmap); | 1277 | PHONE_EncodeBitmap(Type, reqPicture + count, Bitmap); |
1275 | count += PHONE_GetBitmapSize(Type,0,0); | 1278 | count += PHONE_GetBitmapSize(Type,0,0); |
1276 | smprintf(s, "Setting Picture Image\n"); | 1279 | smprintf(s, "Setting Picture Image\n"); |
1277 | return GSM_WaitFor (s, reqPicture, count, 0x14, 4, ID_SetBitmap); | 1280 | return GSM_WaitFor (s, reqPicture, count, 0x14, 4, ID_SetBitmap); |
1278 | default: | 1281 | default: |
1279 | break; | 1282 | break; |
1280 | } | 1283 | } |
1281 | return ERR_NOTSUPPORTED; | 1284 | return ERR_NOTSUPPORTED; |
1282 | } | 1285 | } |
@@ -2410,24 +2413,27 @@ static GSM_Error N6510_ReplySaveSMSMessage(GSM_Protocol_Message msg, GSM_StateMa | |||
2410 | folder = 0x02; /* OUTBOX SIM */ | 2413 | folder = 0x02; /* OUTBOX SIM */ |
2411 | } | 2414 | } |
2412 | break; | 2415 | break; |
2413 | default : folder = msg.Buffer[8] + 1; | 2416 | default : folder = msg.Buffer[8] + 1; |
2414 | } | 2417 | } |
2415 | N6510_SetSMSLocation(s, Data->SaveSMSMessage,folder,msg.Buffer[6]*256+msg.Buffer[7]); | 2418 | N6510_SetSMSLocation(s, Data->SaveSMSMessage,folder,msg.Buffer[6]*256+msg.Buffer[7]); |
2416 | smprintf(s, "Saved in folder %i at location %i\n",folder, msg.Buffer[6]*256+msg.Buffer[7]); | 2419 | smprintf(s, "Saved in folder %i at location %i\n",folder, msg.Buffer[6]*256+msg.Buffer[7]); |
2417 | Data->SaveSMSMessage->Folder = folder; | 2420 | Data->SaveSMSMessage->Folder = folder; |
2418 | return ERR_NONE; | 2421 | return ERR_NONE; |
2419 | case 0x02: | 2422 | case 0x02: |
2420 | printf("Incorrect location\n"); | 2423 | printf("Incorrect location\n"); |
2421 | return ERR_INVALIDLOCATION; | 2424 | return ERR_INVALIDLOCATION; |
2425 | case 0x03: | ||
2426 | printf("Memory full (for example no empty space in SIM)\n"); | ||
2427 | return ERR_FULL; | ||
2422 | case 0x05: | 2428 | case 0x05: |
2423 | printf("Incorrect folder\n"); | 2429 | printf("Incorrect folder\n"); |
2424 | return ERR_INVALIDLOCATION; | 2430 | return ERR_INVALIDLOCATION; |
2425 | default: | 2431 | default: |
2426 | smprintf(s, "ERROR: unknown %i\n",msg.Buffer[4]); | 2432 | smprintf(s, "ERROR: unknown %i\n",msg.Buffer[4]); |
2427 | return ERR_UNKNOWNRESPONSE; | 2433 | return ERR_UNKNOWNRESPONSE; |
2428 | } | 2434 | } |
2429 | case 0x17: | 2435 | case 0x17: |
2430 | smprintf(s, "SMS name changed\n"); | 2436 | smprintf(s, "SMS name changed\n"); |
2431 | return ERR_NONE; | 2437 | return ERR_NONE; |
2432 | } | 2438 | } |
2433 | return ERR_UNKNOWNRESPONSE; | 2439 | return ERR_UNKNOWNRESPONSE; |
@@ -2667,24 +2673,26 @@ static GSM_Error N6510_SetAlarm(GSM_StateMachine *s, GSM_Alarm *alarm) | |||
2667 | return GSM_WaitFor (s, req, 19, 0x19, 4, ID_SetAlarm); | 2673 | return GSM_WaitFor (s, req, 19, 0x19, 4, ID_SetAlarm); |
2668 | } | 2674 | } |
2669 | 2675 | ||
2670 | static GSM_Error N6510_ReplyGetRingtonesInfo(GSM_Protocol_Message msg, GSM_StateMachine *s) | 2676 | static GSM_Error N6510_ReplyGetRingtonesInfo(GSM_Protocol_Message msg, GSM_StateMachine *s) |
2671 | { | 2677 | { |
2672 | int tmp,i; | 2678 | int tmp,i; |
2673 | GSM_Phone_Data *Data = &s->Phone.Data; | 2679 | GSM_Phone_Data *Data = &s->Phone.Data; |
2674 | 2680 | ||
2675 | smprintf(s, "Ringtones info received\n"); | 2681 | smprintf(s, "Ringtones info received\n"); |
2676 | memset(Data->RingtonesInfo,0,sizeof(GSM_AllRingtonesInfo)); | 2682 | memset(Data->RingtonesInfo,0,sizeof(GSM_AllRingtonesInfo)); |
2677 | if (msg.Buffer[4] * 256 + msg.Buffer[5] == 0x00) return ERR_EMPTY; | 2683 | if (msg.Buffer[4] * 256 + msg.Buffer[5] == 0x00) return ERR_EMPTY; |
2678 | Data->RingtonesInfo->Number = msg.Buffer[4] * 256 + msg.Buffer[5]; | 2684 | Data->RingtonesInfo->Number = msg.Buffer[4] * 256 + msg.Buffer[5]; |
2685 | // allocate array of ringtones based on number | ||
2686 | Data->RingtonesInfo->Ringtone = calloc(Data->RingtonesInfo->Number, sizeof(GSM_RingtoneInfo)); | ||
2679 | tmp = 6; | 2687 | tmp = 6; |
2680 | for (i=0;i<Data->RingtonesInfo->Number;i++) { | 2688 | for (i=0;i<Data->RingtonesInfo->Number;i++) { |
2681 | Data->RingtonesInfo->Ringtone[i].Group = msg.Buffer[tmp+4]; | 2689 | Data->RingtonesInfo->Ringtone[i].Group = msg.Buffer[tmp+4]; |
2682 | Data->RingtonesInfo->Ringtone[i].ID = msg.Buffer[tmp+2] * 256 + msg.Buffer[tmp+3]; | 2690 | Data->RingtonesInfo->Ringtone[i].ID = msg.Buffer[tmp+2] * 256 + msg.Buffer[tmp+3]; |
2683 | memcpy(Data->RingtonesInfo->Ringtone[i].Name,msg.Buffer+tmp+8,(msg.Buffer[tmp+6]*256+msg.Buffer[tmp+7])*2); | 2691 | memcpy(Data->RingtonesInfo->Ringtone[i].Name,msg.Buffer+tmp+8,(msg.Buffer[tmp+6]*256+msg.Buffer[tmp+7])*2); |
2684 | smprintf(s, "%5i (%5i). \"%s\"\n", | 2692 | smprintf(s, "%5i (%5i). \"%s\"\n", |
2685 | Data->RingtonesInfo->Ringtone[i].ID, | 2693 | Data->RingtonesInfo->Ringtone[i].ID, |
2686 | Data->RingtonesInfo->Ringtone[i].Group, | 2694 | Data->RingtonesInfo->Ringtone[i].Group, |
2687 | DecodeUnicodeString(Data->RingtonesInfo->Ringtone[i].Name)); | 2695 | DecodeUnicodeString(Data->RingtonesInfo->Ringtone[i].Name)); |
2688 | tmp = tmp + (msg.Buffer[tmp]*256+msg.Buffer[tmp+1]); | 2696 | tmp = tmp + (msg.Buffer[tmp]*256+msg.Buffer[tmp+1]); |
2689 | } | 2697 | } |
2690 | return ERR_NONE; | 2698 | return ERR_NONE; |
@@ -2745,45 +2753,47 @@ static GSM_Error N6510_ReplyGetRingtone(GSM_Protocol_Message msg, GSM_StateMachi | |||
2745 | i++; | 2753 | i++; |
2746 | if (i==msg.Length) return ERR_EMPTY; | 2754 | if (i==msg.Length) return ERR_EMPTY; |
2747 | } | 2755 | } |
2748 | } | 2756 | } |
2749 | /* Copying frame */ | 2757 | /* Copying frame */ |
2750 | memcpy(Data->Ringtone->NokiaBinary.Frame,msg.Buffer+tmp,i-tmp); | 2758 | memcpy(Data->Ringtone->NokiaBinary.Frame,msg.Buffer+tmp,i-tmp); |
2751 | Data->Ringtone->NokiaBinary.Length=i-tmp; | 2759 | Data->Ringtone->NokiaBinary.Length=i-tmp; |
2752 | return ERR_NONE; | 2760 | return ERR_NONE; |
2753 | } | 2761 | } |
2754 | 2762 | ||
2755 | static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, bool PhoneRingtone) | 2763 | static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, bool PhoneRingtone) |
2756 | { | 2764 | { |
2757 | GSM_AllRingtonesInfo Info; | 2765 | GSM_AllRingtonesInfo Info = {0, NULL}; |
2758 | GSM_Error error; | 2766 | GSM_Error error; |
2759 | unsigned char req2[6] = {N7110_FRAME_HEADER, 0x12, | 2767 | unsigned char req2[6] = {N7110_FRAME_HEADER, 0x12, |
2760 | 0x00, 0xe7}; /* Location */ | 2768 | 0x00, 0xe7}; /* Location */ |
2761 | 2769 | ||
2762 | if (Ringtone->Format == 0x00) Ringtone->Format = RING_NOKIABINARY; | 2770 | if (Ringtone->Format == 0x00) Ringtone->Format = RING_NOKIABINARY; |
2763 | 2771 | ||
2764 | switch (Ringtone->Format) { | 2772 | switch (Ringtone->Format) { |
2765 | case RING_NOTETONE: | 2773 | case RING_NOTETONE: |
2766 | /* In the future get binary and convert */ | 2774 | /* In the future get binary and convert */ |
2767 | return ERR_NOTSUPPORTED; | 2775 | return ERR_NOTSUPPORTED; |
2768 | case RING_NOKIABINARY: | 2776 | case RING_NOKIABINARY: |
2769 | s->Phone.Data.Ringtone= Ringtone; | 2777 | s->Phone.Data.Ringtone= Ringtone; |
2770 | Info.Number = 0; | 2778 | Info.Number = 0; |
2771 | error=N6510_PrivGetRingtonesInfo(s, &Info, PhoneRingtone); | 2779 | error=N6510_PrivGetRingtonesInfo(s, &Info, PhoneRingtone); |
2772 | if (error != ERR_NONE) return error; | 2780 | if (error != ERR_NONE) return error; |
2773 | if (Ringtone->Location > Info.Number) return ERR_INVALIDLOCATION; | 2781 | if (Ringtone->Location > Info.Number) return ERR_INVALIDLOCATION; |
2774 | req2[4] = Info.Ringtone[Ringtone->Location-1].ID / 256; | 2782 | req2[4] = Info.Ringtone[Ringtone->Location-1].ID / 256; |
2775 | req2[5] = Info.Ringtone[Ringtone->Location-1].ID % 256; | 2783 | req2[5] = Info.Ringtone[Ringtone->Location-1].ID % 256; |
2776 | smprintf(s, "Getting binary ringtone\n"); | 2784 | smprintf(s, "Getting binary ringtone\n"); |
2777 | return GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone); | 2785 | error = GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone); |
2786 | if (Info.Ringtone) free(Info.Ringtone); | ||
2787 | return error; | ||
2778 | case RING_MIDI: | 2788 | case RING_MIDI: |
2779 | case RING_MMF: | 2789 | case RING_MMF: |
2780 | return ERR_NOTSUPPORTED; | 2790 | return ERR_NOTSUPPORTED; |
2781 | } | 2791 | } |
2782 | return ERR_NOTSUPPORTED; | 2792 | return ERR_NOTSUPPORTED; |
2783 | } | 2793 | } |
2784 | 2794 | ||
2785 | static GSM_Error N6510_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, bool start) | 2795 | static GSM_Error N6510_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, bool start) |
2786 | { | 2796 | { |
2787 | GSM_Error error; | 2797 | GSM_Error error; |
2788 | unsigned char reqStart[] = { | 2798 | unsigned char reqStart[] = { |
2789 | 0x00,0x06,0x01,0x00,0x07,0x00 }; | 2799 | 0x00,0x06,0x01,0x00,0x07,0x00 }; |
@@ -4045,24 +4055,115 @@ GSM_Error N6510_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, bool start | |||
4045 | Note->Location = 1; | 4055 | Note->Location = 1; |
4046 | } else { | 4056 | } else { |
4047 | Note->Location++; | 4057 | Note->Location++; |
4048 | } | 4058 | } |
4049 | 4059 | ||
4050 | if (Note->Location > LastNote->Number) return ERR_EMPTY; | 4060 | if (Note->Location > LastNote->Number) return ERR_EMPTY; |
4051 | 4061 | ||
4052 | s->Phone.Data.Note = Note; | 4062 | s->Phone.Data.Note = Note; |
4053 | smprintf(s, "Getting note\n"); | 4063 | smprintf(s, "Getting note\n"); |
4054 | return N6510_PrivGetGenericCalendar3(s, LastNote->Location[Note->Location-1], ID_GetNote); | 4064 | return N6510_PrivGetGenericCalendar3(s, LastNote->Location[Note->Location-1], ID_GetNote); |
4055 | } | 4065 | } |
4056 | 4066 | ||
4067 | static GSM_Error N6510_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Not) | ||
4068 | { | ||
4069 | GSM_Error error; | ||
4070 | GSM_NOKIACalToDoLocations *LastNote = &s->Phone.Data.Priv.N6510.LastNote; | ||
4071 | GSM_CalendarEntry Note; | ||
4072 | |||
4073 | if (!IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo, F_NOTES)) return ERR_NOTSUPPORTED; | ||
4074 | |||
4075 | error=N6510_GetCalendarInfo3(s,LastNote,2); | ||
4076 | if (error!=ERR_NONE) return error; | ||
4077 | |||
4078 | smprintf(s, "Deleting Note\n"); | ||
4079 | |||
4080 | if (Not->Location > LastNote->Number || Not->Location == 0) return ERR_INVALIDLOCATION; | ||
4081 | |||
4082 | Note.Location = LastNote->Location[Not->Location-1]; | ||
4083 | return N71_65_DelCalendar(s,&Note); | ||
4084 | } | ||
4085 | |||
4086 | static GSM_Error N6510_ReplyGetNoteFirstLoc(GSM_Protocol_Message msg, GSM_StateMachine *s) | ||
4087 | { | ||
4088 | smprintf(s, "First Note location: %i\n",msg.Buffer[8]*256+msg.Buffer[9]); | ||
4089 | s->Phone.Data.Note->Location = msg.Buffer[8]*256+msg.Buffer[9]; | ||
4090 | return ERR_NONE; | ||
4091 | } | ||
4092 | |||
4093 | static GSM_Error N6510_ReplyAddNote(GSM_Protocol_Message msg, GSM_StateMachine *s) | ||
4094 | { | ||
4095 | smprintf(s, "ToDo added\n"); | ||
4096 | return ERR_NONE; | ||
4097 | } | ||
4098 | |||
4099 | static GSM_Error N6510_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Not) | ||
4100 | { | ||
4101 | GSM_Error error; | ||
4102 | int count=54; | ||
4103 | unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95, | ||
4104 | 0x02};/* 1 = todo, 2 = note */ | ||
4105 | unsigned char req[5000] = { | ||
4106 | N6110_FRAME_HEADER, 0x65, | ||
4107 | 0x02, /* 0 = calendar, 1 = todo, 2 = note */ | ||
4108 | 0x00, 0x00, 0x00, | ||
4109 | 0x00, 0x00, /* location */ | ||
4110 | 0x00, 0x00, 0x00, 0x00, | ||
4111 | 0xFF, 0xFF, 0xFF, 0xFF, /* alarm */ | ||
4112 | 0x80, 0x00, 0x00, | ||
4113 | 0xA9, /* note icon */ | ||
4114 | 0x00, 0x00, 0x00, 0x00, /* alarm type */ | ||
4115 | 0x00, /* 0x02 or 0x00 */ | ||
4116 | 0x80, /* note type */ | ||
4117 | 0x07, 0xD2, 0x01, 0x01, 0x00, 0x00, /* start date/time */ | ||
4118 | 0x07, 0xD2, 0x01, 0x11, 0x00, 0x00, /* end date/time */ | ||
4119 | 0x00, 0x00, /* recurrance */ | ||
4120 | 0xFF, 0xFF, /* birth year */ | ||
4121 | 0x00, /* ToDo priority */ | ||
4122 | 0x00, /* ToDo completed ? */ | ||
4123 | 0x00, 0x00, 0x00, | ||
4124 | 0x00, /* note text length */ | ||
4125 | 0x00, /* phone length/meeting place */ | ||
4126 | 0x00, 0x00, 0x00}; | ||
4127 | |||
4128 | s->Phone.Data.Note = Not; | ||
4129 | |||
4130 | smprintf(s, "Getting first free Note location\n"); | ||
4131 | error = GSM_WaitFor (s, reqLoc, 5, 0x13, 4, ID_SetNote); | ||
4132 | if (error!=ERR_NONE) return error; | ||
4133 | req[8] = Not->Location/256; | ||
4134 | req[9] = Not->Location%256; | ||
4135 | |||
4136 | req[49] = UnicodeLength(Not->Text); | ||
4137 | CopyUnicodeString(req+54,Not->Text); | ||
4138 | count+= req[49]*2; | ||
4139 | |||
4140 | req[count++] = 0x00; | ||
4141 | |||
4142 | smprintf(s, "Adding Note\n"); | ||
4143 | return GSM_WaitFor (s, req, count, 0x13, 4, ID_SetNote); | ||
4144 | } | ||
4145 | |||
4146 | static GSM_Error N6510_GetNoteStatus(GSM_StateMachine *s, GSM_ToDoStatus *status) | ||
4147 | { | ||
4148 | GSM_NOKIACalToDoLocations*LastNote = &s->Phone.Data.Priv.N6510.LastNote; | ||
4149 | GSM_Error error; | ||
4150 | |||
4151 | error = N6510_GetCalendarInfo3(s,LastNote,2); | ||
4152 | if (error!=ERR_NONE) return error; | ||
4153 | |||
4154 | status->Used = LastNote->Number; | ||
4155 | return ERR_NONE; | ||
4156 | } | ||
4157 | |||
4057 | static int N6510_FindFileCheckSum(unsigned char *ptr, int len) | 4158 | static int N6510_FindFileCheckSum(unsigned char *ptr, int len) |
4058 | { | 4159 | { |
4059 | int acc, i, accx; | 4160 | int acc, i, accx; |
4060 | 4161 | ||
4061 | accx = 0; | 4162 | accx = 0; |
4062 | acc = 0xffff; | 4163 | acc = 0xffff; |
4063 | while (len--) { | 4164 | while (len--) { |
4064 | accx = (accx & 0xffff00ff) | (acc & 0xff00); | 4165 | accx = (accx & 0xffff00ff) | (acc & 0xff00); |
4065 | acc = (acc & 0xffff00ff) | *ptr++ << 8; | 4166 | acc = (acc & 0xffff00ff) | *ptr++ << 8; |
4066 | for (i = 0; i < 8; i++) { | 4167 | for (i = 0; i < 8; i++) { |
4067 | acc <<= 1; | 4168 | acc <<= 1; |
4068 | if (acc & 0x10000) acc ^= 0x1021; | 4169 | if (acc & 0x10000) acc ^= 0x1021; |
@@ -5180,37 +5281,38 @@ static GSM_Error N6510_AddToDo1(GSM_StateMachine *s, GSM_ToDoEntry *ToDo) | |||
5180 | return GSM_WaitFor (s, reqSet, 12+ulen*2, 0x55, 4, ID_SetToDo); | 5281 | return GSM_WaitFor (s, reqSet, 12+ulen*2, 0x55, 4, ID_SetToDo); |
5181 | } | 5282 | } |
5182 | 5283 | ||
5183 | static GSM_Error N6510_ReplyAddToDo2(GSM_Protocol_Message msg, GSM_StateMachine *s) | 5284 | static GSM_Error N6510_ReplyAddToDo2(GSM_Protocol_Message msg, GSM_StateMachine *s) |
5184 | { | 5285 | { |
5185 | smprintf(s, "ToDo added method 2\n"); | 5286 | smprintf(s, "ToDo added method 2\n"); |
5186 | return ERR_NONE; | 5287 | return ERR_NONE; |
5187 | } | 5288 | } |
5188 | 5289 | ||
5189 | static GSM_Error N6510_ReplyGetToDoFirstLoc2(GSM_Protocol_Message msg, GSM_StateMachine *s) | 5290 | static GSM_Error N6510_ReplyGetToDoFirstLoc2(GSM_Protocol_Message msg, GSM_StateMachine *s) |
5190 | { | 5291 | { |
5191 | smprintf(s, "First ToDo location method 2: %i\n",msg.Buffer[8]*256+msg.Buffer[9]); | 5292 | smprintf(s, "First ToDo location method 2: %i\n",msg.Buffer[8]*256+msg.Buffer[9]); |
5192 | s->Phone.Data.ToDo->Location = msg.Buffer[9]; | 5293 | s->Phone.Data.ToDo->Location = msg.Buffer[8]*256+msg.Buffer[9]; |
5193 | return ERR_NONE; | 5294 | return ERR_NONE; |
5194 | } | 5295 | } |
5195 | 5296 | ||
5196 | static GSM_Error N6510_AddToDo2(GSM_StateMachine *s, GSM_ToDoEntry *ToDo) | 5297 | static GSM_Error N6510_AddToDo2(GSM_StateMachine *s, GSM_ToDoEntry *ToDo) |
5197 | { | 5298 | { |
5198 | GSM_CalendarEntryNote; | 5299 | GSM_CalendarEntryNote; |
5199 | time_t t_time1,t_time2; | 5300 | time_t t_time1,t_time2; |
5200 | long diff; | 5301 | long diff; |
5201 | GSM_Error error; | 5302 | GSM_Error error; |
5202 | GSM_DateTime DT; | 5303 | GSM_DateTime DT; |
5203 | int Text, Alarm, EndTime, Completed, count=54, Phone; | 5304 | int Text, Alarm, EndTime, Completed, count=54, Phone; |
5204 | unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95, 0x01}; | 5305 | unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95, |
5306 | 0x01};/* 1 = todo, 2 = note */ | ||
5205 | unsigned char req[5000] = { | 5307 | unsigned char req[5000] = { |
5206 | N6110_FRAME_HEADER, 0x65, | 5308 | N6110_FRAME_HEADER, 0x65, |
5207 | 0x01, /* 0 = calendar, 1 = todo */ | 5309 | 0x01, /* 0 = calendar, 1 = todo */ |
5208 | 0x00, 0x00, 0x00, | 5310 | 0x00, 0x00, 0x00, |
5209 | 0x00, 0x00, /* location */ | 5311 | 0x00, 0x00, /* location */ |
5210 | 0x00, 0x00, 0x00, 0x00, | 5312 | 0x00, 0x00, 0x00, 0x00, |
5211 | 0xFF, 0xFF, 0xFF, 0xFF, /* alarm */ | 5313 | 0xFF, 0xFF, 0xFF, 0xFF, /* alarm */ |
5212 | 0x80, 0x00, 0x00, | 5314 | 0x80, 0x00, 0x00, |
5213 | 0x01, /* note icon */ | 5315 | 0x01, /* note icon */ |
5214 | 0xFF, 0xFF, 0xFF, 0xFF, /* alarm type */ | 5316 | 0xFF, 0xFF, 0xFF, 0xFF, /* alarm type */ |
5215 | 0x00, /* 0x02 or 0x00 */ | 5317 | 0x00, /* 0x02 or 0x00 */ |
5216 | 0x01, /* note type */ | 5318 | 0x01, /* note type */ |
@@ -5576,32 +5678,34 @@ static GSM_Reply_Function N6510ReplyFunctions[] = { | |||
5576 | {N71_65_ReplyAddCalendar1, "\x13",0x03,0x06,ID_SetCalendarNote }, | 5678 | {N71_65_ReplyAddCalendar1, "\x13",0x03,0x06,ID_SetCalendarNote }, |
5577 | {N71_65_ReplyAddCalendar1, "\x13",0x03,0x08,ID_SetCalendarNote }, | 5679 | {N71_65_ReplyAddCalendar1, "\x13",0x03,0x08,ID_SetCalendarNote }, |
5578 | {N71_65_ReplyDelCalendar, "\x13",0x03,0x0C,ID_DeleteCalendarNote }, | 5680 | {N71_65_ReplyDelCalendar, "\x13",0x03,0x0C,ID_DeleteCalendarNote }, |
5579 | {N71_65_ReplyGetNextCalendar1, "\x13",0x03,0x1A,ID_GetCalendarNote },/*method 1*/ | 5681 | {N71_65_ReplyGetNextCalendar1, "\x13",0x03,0x1A,ID_GetCalendarNote },/*method 1*/ |
5580 | {N6510_ReplyGetCalendarNotePos, "\x13",0x03,0x32,ID_GetCalendarNotePos },/*method 1*/ | 5682 | {N6510_ReplyGetCalendarNotePos, "\x13",0x03,0x32,ID_GetCalendarNotePos },/*method 1*/ |
5581 | {N6510_ReplyGetCalendarInfo, "\x13",0x03,0x3B,ID_GetCalendarNotesInfo},/*method 1*/ | 5683 | {N6510_ReplyGetCalendarInfo, "\x13",0x03,0x3B,ID_GetCalendarNotesInfo},/*method 1*/ |
5582 | #ifdef DEBUG | 5684 | #ifdef DEBUG |
5583 | {N71_65_ReplyGetNextCalendar2, "\x13",0x03,0x3F,ID_GetCalendarNote }, | 5685 | {N71_65_ReplyGetNextCalendar2, "\x13",0x03,0x3F,ID_GetCalendarNote }, |
5584 | #endif | 5686 | #endif |
5585 | {N71_65_ReplyAddCalendar2, "\x13",0x03,0x41,ID_SetCalendarNote },/*method 2*/ | 5687 | {N71_65_ReplyAddCalendar2, "\x13",0x03,0x41,ID_SetCalendarNote },/*method 2*/ |
5586 | {N6510_ReplyAddCalendar3, "\x13",0x03,0x66,ID_SetCalendarNote },/*method 3*/ | 5688 | {N6510_ReplyAddCalendar3, "\x13",0x03,0x66,ID_SetCalendarNote },/*method 3*/ |
5587 | {N6510_ReplyAddToDo2, "\x13",0x03,0x66,ID_SetToDo }, | 5689 | {N6510_ReplyAddToDo2, "\x13",0x03,0x66,ID_SetToDo }, |
5690 | {N6510_ReplyAddNote, "\x13",0x03,0x66,ID_SetNote }, | ||
5588 | {N6510_ReplyGetCalendar3, "\x13",0x03,0x7E,ID_GetCalendarNote },/*method 3*/ | 5691 | {N6510_ReplyGetCalendar3, "\x13",0x03,0x7E,ID_GetCalendarNote },/*method 3*/ |
5589 | {N6510_ReplyGetToDo2, "\x13",0x03,0x7E,ID_GetToDo }, | 5692 | {N6510_ReplyGetToDo2, "\x13",0x03,0x7E,ID_GetToDo }, |
5590 | {N6510_ReplyGetNote, "\x13",0x03,0x7E,ID_GetNote }, | 5693 | {N6510_ReplyGetNote, "\x13",0x03,0x7E,ID_GetNote }, |
5591 | {N6510_ReplyGetCalendarSettings, "\x13",0x03,0x86,ID_GetCalendarSettings }, | 5694 | {N6510_ReplyGetCalendarSettings, "\x13",0x03,0x86,ID_GetCalendarSettings }, |
5592 | {N6510_ReplyGetLocale, "\x13",0x03,0x8A,ID_GetLocale }, | 5695 | {N6510_ReplyGetLocale, "\x13",0x03,0x8A,ID_GetLocale }, |
5593 | {N6510_ReplyGetCalendarSettings, "\x13",0x03,0x8E,ID_GetCalendarSettings }, | 5696 | {N6510_ReplyGetCalendarSettings, "\x13",0x03,0x8E,ID_GetCalendarSettings }, |
5594 | {N6510_ReplyGetCalendarNotePos, "\x13",0x03,0x96,ID_GetCalendarNotePos },/*method 3*/ | 5697 | {N6510_ReplyGetCalendarNotePos, "\x13",0x03,0x96,ID_GetCalendarNotePos },/*method 3*/ |
5595 | {N6510_ReplyGetToDoFirstLoc2, "\x13",0x03,0x96,ID_SetToDo }, | 5698 | {N6510_ReplyGetToDoFirstLoc2, "\x13",0x03,0x96,ID_SetToDo }, |
5699 | {N6510_ReplyGetNoteFirstLoc, "\x13",0x03,0x96,ID_SetNote }, | ||
5596 | {N6510_ReplyGetCalendarInfo, "\x13",0x03,0x9F,ID_GetCalendarNotesInfo},/*method 3*/ | 5700 | {N6510_ReplyGetCalendarInfo, "\x13",0x03,0x9F,ID_GetCalendarNotesInfo},/*method 3*/ |
5597 | {N6510_ReplyGetToDoStatus2, "\x13",0x03,0x9F,ID_GetToDo }, | 5701 | {N6510_ReplyGetToDoStatus2, "\x13",0x03,0x9F,ID_GetToDo }, |
5598 | {N6510_ReplyGetNoteInfo, "\x13",0x03,0x9F,ID_GetNote }, | 5702 | {N6510_ReplyGetNoteInfo, "\x13",0x03,0x9F,ID_GetNote }, |
5599 | 5703 | ||
5600 | {N6510_ReplySaveSMSMessage, "\x14",0x03,0x01,ID_SaveSMSMessage }, | 5704 | {N6510_ReplySaveSMSMessage, "\x14",0x03,0x01,ID_SaveSMSMessage }, |
5601 | {N6510_ReplySetPicture, "\x14",0x03,0x01,ID_SetBitmap }, | 5705 | {N6510_ReplySetPicture, "\x14",0x03,0x01,ID_SetBitmap }, |
5602 | {N6510_ReplyGetSMSMessage, "\x14",0x03,0x03,ID_GetSMSMessage }, | 5706 | {N6510_ReplyGetSMSMessage, "\x14",0x03,0x03,ID_GetSMSMessage }, |
5603 | {N6510_ReplyDeleteSMSMessage, "\x14",0x03,0x05,ID_DeleteSMSMessage }, | 5707 | {N6510_ReplyDeleteSMSMessage, "\x14",0x03,0x05,ID_DeleteSMSMessage }, |
5604 | {N6510_ReplyDeleteSMSMessage, "\x14",0x03,0x06,ID_DeleteSMSMessage }, | 5708 | {N6510_ReplyDeleteSMSMessage, "\x14",0x03,0x06,ID_DeleteSMSMessage }, |
5605 | {N6510_ReplyGetSMSStatus, "\x14",0x03,0x09,ID_GetSMSStatus }, | 5709 | {N6510_ReplyGetSMSStatus, "\x14",0x03,0x09,ID_GetSMSStatus }, |
5606 | {N6510_ReplyGetSMSFolderStatus, "\x14",0x03,0x0d,ID_GetSMSFolderStatus }, | 5710 | {N6510_ReplyGetSMSFolderStatus, "\x14",0x03,0x0d,ID_GetSMSFolderStatus }, |
5607 | {N6510_ReplyGetSMSMessage, "\x14",0x03,0x0f,ID_GetSMSMessage }, | 5711 | {N6510_ReplyGetSMSMessage, "\x14",0x03,0x0f,ID_GetSMSMessage }, |
@@ -5723,25 +5827,25 @@ static GSM_Reply_Function N6510ReplyFunctions[] = { | |||
5723 | 5827 | ||
5724 | {DCT3DCT4_ReplyGetModelFirmware, "\xD2",0x02,0x00,ID_GetModel }, | 5828 | {DCT3DCT4_ReplyGetModelFirmware, "\xD2",0x02,0x00,ID_GetModel }, |
5725 | {DCT3DCT4_ReplyGetModelFirmware, "\xD2",0x02,0x00,ID_GetFirmware }, | 5829 | {DCT3DCT4_ReplyGetModelFirmware, "\xD2",0x02,0x00,ID_GetFirmware }, |
5726 | 5830 | ||
5727 | /* 0xD7 - Bluetooth */ | 5831 | /* 0xD7 - Bluetooth */ |
5728 | 5832 | ||
5729 | {N6510_ReplyGetRingtoneID, "\xDB",0x03,0x02,ID_SetRingtone }, | 5833 | {N6510_ReplyGetRingtoneID, "\xDB",0x03,0x02,ID_SetRingtone }, |
5730 | 5834 | ||
5731 | {NULL, "\x00",0x00,0x00,ID_None } | 5835 | {NULL, "\x00",0x00,0x00,ID_None } |
5732 | }; | 5836 | }; |
5733 | 5837 | ||
5734 | GSM_Phone_Functions N6510Phone = { | 5838 | GSM_Phone_Functions N6510Phone = { |
5735 | "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", | 5839 | "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", |
5736 | N6510ReplyFunctions, | 5840 | N6510ReplyFunctions, |
5737 | N6510_Initialise, | 5841 | N6510_Initialise, |
5738 | NONEFUNCTION, /* Terminate */ | 5842 | NONEFUNCTION, /* Terminate */ |
5739 | GSM_DispatchMessage, | 5843 | GSM_DispatchMessage, |
5740 | N6510_ShowStartInfo, | 5844 | N6510_ShowStartInfo, |
5741 | NOKIA_GetManufacturer, | 5845 | NOKIA_GetManufacturer, |
5742 | DCT3DCT4_GetModel, | 5846 | DCT3DCT4_GetModel, |
5743 | DCT3DCT4_GetFirmware, | 5847 | DCT3DCT4_GetFirmware, |
5744 | DCT4_GetIMEI, | 5848 | DCT4_GetIMEI, |
5745 | N6510_GetOriginalIMEI, | 5849 | N6510_GetOriginalIMEI, |
5746 | N6510_GetManufactureMonth, | 5850 | N6510_GetManufactureMonth, |
5747 | DCT4_GetProductCode, | 5851 | DCT4_GetProductCode, |
@@ -5832,25 +5936,31 @@ GSM_Phone_Functions N6510Phone = { | |||
5832 | N6510_AddToDo, | 5936 | N6510_AddToDo, |
5833 | N6510_DeleteToDo2, | 5937 | N6510_DeleteToDo2, |
5834 | N6510_DeleteAllToDo1, | 5938 | N6510_DeleteAllToDo1, |
5835 | N6510_GetCalendarStatus, | 5939 | N6510_GetCalendarStatus, |
5836 | NOTIMPLEMENTED, /* GetCalendar */ | 5940 | NOTIMPLEMENTED, /* GetCalendar */ |
5837 | N6510_GetNextCalendar, | 5941 | N6510_GetNextCalendar, |
5838 | NOTIMPLEMENTED, /* SetCalendar */ | 5942 | NOTIMPLEMENTED, /* SetCalendar */ |
5839 | N6510_AddCalendar, | 5943 | N6510_AddCalendar, |
5840 | N71_65_DelCalendar, | 5944 | N71_65_DelCalendar, |
5841 | NOTIMPLEMENTED, /* DeleteAllCalendar*/ | 5945 | NOTIMPLEMENTED, /* DeleteAllCalendar*/ |
5842 | N6510_GetCalendarSettings, | 5946 | N6510_GetCalendarSettings, |
5843 | NOTSUPPORTED, /* SetCalendarSettings*/ | 5947 | NOTSUPPORTED, /* SetCalendarSettings*/ |
5948 | N6510_GetNoteStatus, | ||
5949 | NOTIMPLEMENTED, /* GetNote */ | ||
5844 | N6510_GetNextNote, | 5950 | N6510_GetNextNote, |
5951 | NOTIMPLEMENTED, /* SetNote */ | ||
5952 | N6510_AddNote, | ||
5953 | N6510_DeleteNote, | ||
5954 | NOTSUPPORTED, /* DeleteAllNotes */ | ||
5845 | N6510_GetProfile, | 5955 | N6510_GetProfile, |
5846 | N6510_SetProfile, | 5956 | N6510_SetProfile, |
5847 | N6510_GetFMStation, | 5957 | N6510_GetFMStation, |
5848 | N6510_SetFMStation, | 5958 | N6510_SetFMStation, |
5849 | N6510_ClearFMStations, | 5959 | N6510_ClearFMStations, |
5850 | N6510_GetNextFileFolder, | 5960 | N6510_GetNextFileFolder, |
5851 | N6510_GetFilePart, | 5961 | N6510_GetFilePart, |
5852 | N6510_AddFilePart, | 5962 | N6510_AddFilePart, |
5853 | N6510_GetFileSystemStatus, | 5963 | N6510_GetFileSystemStatus, |
5854 | N6510_DeleteFile, | 5964 | N6510_DeleteFile, |
5855 | N6510_AddFolder, | 5965 | N6510_AddFolder, |
5856 | N6510_GetGPRSAccessPoint, | 5966 | N6510_GetGPRSAccessPoint, |