19 #ifdef GSM_ENABLE_NOKIA6110 26 #include "../../../misc/coding/coding.h" 27 #include "../../../misc/locales.h" 28 #include "../../../gsmcomon.h" 29 #include "../../../service/gsmlogo.h" 30 #include "../../../service/gsmring.h" 31 #include "../../../service/gsmnet.h" 32 #include "../../pfunc.h" 37 static unsigned char N6110_MEMORY_TYPES[] = {
76 smprintf(s,
"Getting profile feature\n");
80 struct N6110_Lang_Char {
83 unsigned char Unicode1;
84 unsigned char Unicode2;
87 static struct N6110_Lang_Char N6110_Lang_Table[] = {
110 static void N6110_EncodeUnicode(
GSM_StateMachine *s,
unsigned char *dest,
const unsigned char *src,
int len)
112 int i_len = 0, o_len, i;
117 for (o_len = 0; i_len < len; o_len++) {
122 if (N6110_Lang_Table[i].Lang == 0)
break;
124 N6110_Lang_Table[i].Phone == src[i_len]) {
125 dest[o_len*2] = N6110_Lang_Table[i].Unicode1;
126 dest[(o_len*2)+1] = N6110_Lang_Table[i].Unicode2;
136 dest[o_len*2] = (wc >> 8) & 0xff;
137 dest[(o_len*2)+1] = wc & 0xff;
141 dest[(o_len*2)+1] = 0;
158 static void N6110_GetNokiaAuthentication(
unsigned char *Imei,
unsigned char *MagicBytes,
unsigned char *MagicResponse)
161 unsigned char Temp[16];
164 Temp[0] = Imei[6]; Temp[1] = Imei[7];
165 Temp[2] = Imei[8]; Temp[3] = Imei[9];
166 Temp[4] = Imei[10]; Temp[5] = Imei[11];
167 Temp[6] = Imei[12]; Temp[7] = Imei[13];
170 Temp[8] = Imei[2]; Temp[9] = Imei[3];
171 Temp[10] = Imei[4]; Temp[11] = Imei[5];
174 Temp[12] = MagicBytes[0]; Temp[13] = MagicBytes[1];
175 Temp[14] = MagicBytes[2]; Temp[15] = MagicBytes[3];
177 for (i=0; i<=11; i++)
if (Temp[i + 1]& 1) Temp[i]<<=1;
178 switch (Temp[15] & 0x03) {
180 case 2: j = Temp[13] & 0x07;
181 for (i=0; i<=3; i++) Temp[i+j] ^= Temp[i+12];
183 default: j = Temp[14] & 0x07;
184 for (i=0; i<=3; i++) Temp[i + j] |= Temp[i + 12];
186 for (i=0; i<=15; i++) CRC ^= Temp[i];
187 for (i=0; i<=15; i++) {
188 switch (Temp[15 - i] & 0x06) {
189 case 0: j = Temp[i] | CRC;
break;
191 case 4: j = Temp[i] ^ CRC;
break;
192 case 6: j = Temp[i] & CRC;
break;
194 if (j == CRC) j = 0x2c;
195 if (Temp[i] == 0) j = 0;
196 MagicResponse[i] = j;
209 smprintf(s,
"Message: Mobile phone identification received:\n");
235 unsigned char magic_connect[] = {
239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
242 'N',
'O',
'K',
'I',
'A',
'&',
'N',
'O',
'K',
'I',
'A',
243 'a',
'c',
'c',
'e',
's',
's',
'o',
'r',
'y',
244 0x00, 0x00, 0x00, 0x00};
246 smprintf(s,
"Getting magic bytes for authentication\n");
251 smprintf(s,
"Sending authentication bytes\n");
263 error=N6110_MakeAuthentication(s);
274 N6110_GetPhoneLanguage(s);
303 smprintf(s,
"Phonebook entry received\n");
309 if (msg->
Buffer[count]!=0x00) {
337 count=count+msg->
Buffer[count]+1;
355 count=count+msg->
Buffer[count]+1;
358 if (msg->
Buffer[count]<5) {
398 smprintf(s,
"ERROR: Invalid memory type\n");
426 smprintf(s,
"Getting phonebook entry\n");
434 smprintf(s,
"Memory status received\n");
449 smprintf(s,
"Phone is probably powered off.\n");
452 smprintf(s,
"Memory type not supported by phone model.\n");
455 smprintf(s,
"Waiting for security code.\n");
475 smprintf(s,
"Getting memory status\n");
483 smprintf(s,
"SMS status received\n");
508 smprintf(s,
"SMS Message received\n");
518 case 0x00:
case 0x01:
533 smprintf(s,
"Unknown. Probably phone too busy\n");
536 smprintf(s,
"Too high location ?\n");
545 smprintf(s,
"Access error. No PIN ?\n");
598 smprintf(s,
"Phone status received :\n");
601 case 0x01:
smprintf(s,
"registered within the network\n");
break;
602 case 0x02:
smprintf(s,
"call in progress\n");
break;
603 case 0x03:
smprintf(s,
"waiting for security code\n");
break;
604 case 0x04:
smprintf(s,
"powered off\n");
break;
609 case 0x01:
smprintf(s,
"AC/DC\n");
break;
610 case 0x02:
smprintf(s,
"battery\n");
break;
649 smprintf(s,
"Getting network level\n");
671 smprintf(s,
"Getting battery level\n");
692 smprintf(s,
"SMS message saving status\n");
701 smprintf(s,
"All locations busy\n");
735 if (error !=
ERR_NONE)
return error;
750 return N6110_PrivSetSMSMessage(s, sms);
756 return N6110_PrivSetSMSMessage(s, sms);
766 smprintf(s,
"Error setting ringtone\n");
769 smprintf(s,
"Too high location ?\n");
785 smprintf(s,
"Invalid location. Too high ?\n");
794 size_t size=200,current=8;
799 unsigned char reqBin[1000] = {0x00,0x01,0xa0,0x00,0x00,0x0c,0x01,0x2c};
804 switch (Ringtone->
Format) {
815 memcpy(req+2,UDHHeader.
Text,UDHHeader.
Length);
836 reqBin[current++] = 0x00;
837 reqBin[current++] = 0x00;
838 reqBin[current++] = 0x00;
843 smprintf(s,
"Setting binary ringtone\n");
857 smprintf(s,
"Operator logo received\n");
861 smprintf(s,
"Network name for Gammu : %s ",
878 smprintf(s,
"Startup logo & notes received\n");
879 for (i=0;i<msg->
Buffer[4];i++) {
880 switch (msg->
Buffer[count++]) {
898 count = count + msg->
Buffer[count] + 1;
901 smprintf(s,
"Dealer welcome note\n");
906 count = count + msg->
Buffer[count] + 1;
923 smprintf(s,
"Caller group info received\n");
928 count = msg->
Buffer[5] + 6;
952 smprintf(s,
"Error getting caller group info\n");
967 smprintf(s,
"Picture Image received\n");
968 if (msg->
Buffer[count]!=0) {
978 count = count + i + 1;
986 (!strcmp(Data->
Model,
"NHM-5") && Data->
VerNum < 5.79)) {
991 if (!strcmp(Data->
Model,
"NHM-5")) {
995 i = msg->
Buffer[count] * 256 + msg->
Buffer[count+1] - 2;
1013 smprintf(s,
"Picture Image set OK\n");
1016 smprintf(s,
"Can't set Picture Image - invalid location ?\n");
1019 smprintf(s,
"Can't get Picture Image - invalid location ?\n");
1031 switch (Bitmap->
Type) {
1062 switch (msg->
Buffer[3]) {
1064 smprintf(s,
"Feature of profile set\n");
1067 smprintf(s,
"Error setting profile feature\n");
1073 static GSM_Error N6110_SetProfileFeature(
GSM_StateMachine *s,
unsigned char profile,
unsigned char feature,
unsigned char value)
1083 smprintf(s,
"Setting profile feature\n");
1089 smprintf(s,
"Startup logo set OK\n");
1095 switch (msg->
Buffer[3]) {
1097 smprintf(s,
"Caller group set OK\n");
1100 smprintf(s,
"Error setting caller group\n");
1108 unsigned char reqPreview[1000] = {0x0c,0x01};
1111 size_t count = 0, textlen, Width, Height;
1116 switch (Bitmap->
Type) {
1124 UDHHeader.
Type = UDHType;
1127 memcpy(reqPreview+2,UDHHeader.
Text,UDHHeader.
Length);
1128 count = count + UDHHeader.
Length;
1140 reqPreview[count]=0x00;
1159 switch (Bitmap->
Type) {
1167 error = N6110_SetProfileFeature(s,0,0x2e,((
unsigned char)(Bitmap->
Location-1)));
1169 error = N6110_SetProfileFeature(s,0,0x29,((
unsigned char)(Bitmap->
Location-1)));
1172 if (error !=
ERR_NONE)
return error;
1175 req[count++] = 0x18;
1176 req[count++] = 0x01;
1177 req[count++] = 0x01;
1179 req[count++] = Height;
1180 req[count++] = Width;
1186 req[count++] = 0x18;
1187 req[count++] = 0x01;
1189 req[count++] = 0x02;
1191 req[count++] = 0x03;
1194 req[count++] = textlen;
1200 req[count++] = 0x13;
1201 req[count++] = Bitmap->
Location - 1;
1206 req[count++] = textlen;
1227 if (Bitmap->
BitmapEnabled) req[count++] = 0x01;
else req[count++] = 0x00;
1234 req[count++] = 0x30;
1235 req[count++] = 0x01;
1244 req[count++] = 0x03;
1245 req[count++] = Bitmap->
Location - 1;
1249 textlen = req[count];
1250 if (textlen % 2) textlen++;
1251 count += textlen / 2 + 1;
1254 req[count++] = 0x00;
1255 req[count++] = 0x00;
1257 req[count++] = 0x00;
1261 req[count++] = textlen;
1267 req[count++] = textlen;
1270 req[count++] = textlen+2;
1271 req[count++] = 0x00;
1272 req[count++] = 0x1e;
1274 memcpy(req+count,Bitmap->
Text,textlen);
1294 switch (msg->
Buffer[3]) {
1296 smprintf(s,
"Call established, waiting for answer\n");
1305 smprintf(s,
"Remote end hang up\n");
1314 for (tmp=0; tmp <count; tmp++)
smprintf(s,
"%c", msg->
Buffer[7+tmp]);
1323 smprintf(s,
"Call answer initiated\n");
1330 smprintf(s,
"Call is being released\n");
1347 smprintf(s,
"Joining call to the conference (conference)\n");
1350 smprintf(s,
"Removing call from the conference (split)\n");
1359 if (msg->
Buffer[3] == 0x09) {
1369 if (msg->
Buffer[3] == 0x07) {
1375 if (msg->
Buffer[3] == 0x25) {
1381 if (msg->
Buffer[3] == 0x23) {
1387 if (msg->
Buffer[3] == 0x29) {
1393 if (msg->
Buffer[3] == 0x2B) {
1416 smprintf(s,
"Reply for writing memory\n");
1417 switch (msg->
Buffer[3]) {
1423 switch (msg->
Buffer[4]) {
1425 smprintf(s,
"Too high location ?\n");
1428 smprintf(s,
"Too long name...or other error\n");
1439 int current, Group, Name, Number, i;
1472 req[current++]=0x00;
1473 req[current++]=0x00;
1481 }
else req[current++] = 0;
1486 req[current++] = 0xff;
1492 smprintf(s,
"Writing phonebook entry\n");
1504 return N6110_SetMemory(s, &dwa);
1514 smprintf(s,
"Ringtone received\n");
1515 switch (msg->
Buffer[4]) {
1521 if (buffer[9]==0x4a && buffer[10]==0x3a) i=8;
1528 while (msg->
Buffer[i]!=0) {
1531 smprintf(s,
"Ringtone name too long!\n");
1572 smprintf(s,
"Invalid location. Too high ?\n");
1581 unsigned char req[] = {0x00, 0x01, 0x9e,
1588 if (Ringtone->
Format == 0x00) {
1596 switch (Ringtone->
Format) {
1613 smprintf(s,
"Getting (binary) ringtone\n");
1622 smprintf(s,
"Security code status\n");
1642 smprintf(s,
"Getting security code status\n");
1648 switch (msg->
Buffer[3]) {
1653 switch (msg->
Buffer[4]) {
1675 len = strlen(Code->
Code);
1676 memcpy(req+5,Code->
Code,len);
1680 smprintf(s,
"Entering security code\n");
1688 switch (msg->
Buffer[3]) {
1690 smprintf(s,
"Speed dial received\n");
1691 switch (msg->
Buffer[4]) {
1710 smprintf(s,
"Error getting speed dial. Invalid location\n");
1724 smprintf(s,
"Getting speed dial\n");
1730 switch (msg->
Buffer[3]) {
1732 smprintf(s,
"During sending DTMF\n");
1746 smprintf(s,
"Display status received\n");
1748 for (i=0;i<msg->
Buffer[4];i++) {
1749 if (msg->
Buffer[2*i+6] == 0x02) {
1751 switch (msg->
Buffer[2*i+5]) {
1752 case 0x01:
smprintf(s,
"Call in progress\n");
break;
1753 case 0x02:
smprintf(s,
"Unknown\n");
break;
1754 case 0x03:
smprintf(s,
"Unread SMS\n");
break;
1755 case 0x04:
smprintf(s,
"Voice call\n");
break;
1756 case 0x05:
smprintf(s,
"Fax call active\n");
break;
1757 case 0x06:
smprintf(s,
"Data call active\n");
break;
1758 case 0x07:
smprintf(s,
"Keyboard lock\n");
break;
1759 case 0x08:
smprintf(s,
"SMS storage full\n");
break;
1763 switch (msg->
Buffer[2*i+5]) {
1793 smprintf(s,
"Getting display status\n");
1828 {0x00, 0x00, 0x00,0x00}
1866 {0x00, 0x00, 0x00,0x00}
1873 switch (msg->
Buffer[3]) {
1878 switch (msg->
Buffer[6]) {
1886 smprintf(s,
"screen saver number\n");
1900 switch (msg->
Buffer[6]) {
1931 smprintf(s,
"Invalid profile location\n");
1939 if (msg->
Length > 0x0A) {
1962 smprintf(s,
"Getting profile name\n");
1989 case 6: Profile->
Name[0] = 0; Profile->
Name[1] = 0;
2010 for (i = 0x00; i <= 0x09; i++) {
2011 feat_req[5] = Profile->
Location - 1;
2013 smprintf(s,
"Getting profile feature\n");
2032 smprintf(s,
"Getting profile feature\n");
2042 unsigned char ID,Value;
2050 if (ProfilePhone == Profile3310) {
2070 if (ProfilePhone == Profile6110) {
2086 error=N6110_SetProfileFeature (s,((
unsigned char)(Profile->
Location-1)),ID,Value);
2099 smprintf(s,
"SMS message received\n");
2116 smprintf(s,
"Writing calendar note: ");
2117 switch (msg->
Buffer[4]) {
2122 smprintf(s,
"OK, but text was shortened\n");
2129 smprintf(s,
"during editing notes in phone menu\n");
2140 int Text, Time, Alarm, Phone, EndTime, Location, i, current, j;
2144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2145 0x00, 0x00, 0x00, 0x01, 0x00, 0x66, 0x01};
2152 switch(Note->
Type) {
2176 default : req[7]=0x01;
break;
2179 switch(Note->
Type) {
2184 default : req[7]=0x01;
break;
2208 Reminder3310 =
TRUE;
2217 req[current++] = 0x01;
2230 if (!Reminder3310) {
2235 }
else req[22] = 0x00;
2242 }
else req[current++] = 0x00;
2245 req[6] = current - 8;
2247 smprintf(s,
"Writing calendar note\n");
2253 smprintf(s,
"Deleting calendar note: ");
2254 switch (msg->
Buffer[4]) {
2259 smprintf(s,
"during editing notes in phone menu\n");
2262 smprintf(s,
"Can't be done - too high location ?\n");
2279 smprintf(s,
"Deleting calendar note\n");
2291 while (i!=msg->
Buffer[23]) {
2314 while (i!=msg->
Buffer[23]) {
2329 switch (msg->
Buffer[4]) {
2331 smprintf(s,
"Calendar note received\n");
2332 switch (msg->
Buffer[8]) {
2361 switch (msg->
Buffer[8]) {
2362 case 0x01:
smprintf(s,
"Reminder\n");
break;
2363 case 0x02:
smprintf(s,
"Call\n");
break;
2364 case 0x03:
smprintf(s,
"Meeting\n");
break;
2365 case 0x04:
smprintf(s,
"Birthday\n");
break;
2371 smprintf(s,
"Time : %02i-%02i-%04i %02i:%02i:%02i\n",
2379 smprintf(s,
"Alarm : %02i-%02i-%04i %02i:%02i:%02i\n",
2412 SpecialSubSet =
TRUE;
2413 switch (msg->
Buffer[24]) {
2414 case 2 : Decode3310Subset2(i,msg,&s->
Phone.
Data);
break;
2415 case 3 : Decode3310Subset3(i,msg,&s->
Phone.
Data);
break;
2416 default : SpecialSubSet =
FALSE;
break;
2419 if (!SpecialSubSet) {
2424 if (msg->
Buffer[23] != 0x00) {
2439 smprintf(s,
"Can't get calendar note - too high location?\n");
2447 int Text, Time, Alarm, Phone, EndTime, Location;
2466 smprintf(s,
"Getting calendar note\n");
2472 error=N6110_GetDateTime(s, &date_time);
2481 unsigned char buffer[2000];
2488 smprintf(s,
"USSD reply: \"%s\"\n",buffer);
2506 0x07, 0xa2, 0x88, 0x81, 0x21, 0x15, 0x63, 0xa8,
2507 0x00, 0x00, 0x07, 0xa3, 0xb8, 0x81, 0x20, 0x15,
2511 smprintf(s,
"Answering call part 1\n");
2513 if (error !=
ERR_NONE)
return error;
2522 unsigned int pos = 4;
2528 req[pos++] = strlen(number);
2529 memcpy(req+pos,number,strlen(number));
2530 pos += strlen(number);
2536 switch (ShowNumber) {
2550 smprintf(s,
"Making voice call\n");
2558 req[4] = (
unsigned char)ID;
2569 req[4] = (
unsigned char)ID;
2581 req[4] = (
unsigned char)ID;
2594 req[4] = (
unsigned char)ID;
2613 req[4] = (
unsigned char)ID;
2631 req[4] = (
unsigned char)ID;
2640 {N6110_ReplyCallInfo,
"\x01",0x03,0x03,ID_IncomingFrame },
2641 {N6110_ReplyCallInfo,
"\x01",0x03,0x04,ID_IncomingFrame },
2642 {N6110_ReplyCallInfo,
"\x01",0x03,0x05,ID_IncomingFrame },
2644 {N6110_ReplyCallInfo,
"\x01",0x03,0x07,ID_IncomingFrame },
2646 {N6110_ReplyCallInfo,
"\x01",0x03,0x09,ID_IncomingFrame },
2647 {N6110_ReplyCallInfo,
"\x01",0x03,0x0A,ID_IncomingFrame },
2648 {N6110_ReplyCallInfo,
"\x01",0x03,0x23,
ID_HoldCall },
2649 {N6110_ReplyCallInfo,
"\x01",0x03,0x23,ID_IncomingFrame },
2651 {N6110_ReplyCallInfo,
"\x01",0x03,0x25,ID_IncomingFrame },
2652 {N6110_ReplyCallInfo,
"\x01",0x03,0x27,ID_IncomingFrame },
2654 {N6110_ReplyCallInfo,
"\x01",0x03,0x29,ID_IncomingFrame },
2656 {N6110_ReplyCallInfo,
"\x01",0x03,0x2B,ID_IncomingFrame },
2657 {N6110_ReplySendDTMF,
"\x01",0x03,0x40,
ID_SendDTMF },
2659 {
NoneReply,
"\x01",0x03,0x40,ID_IncomingFrame },
2660 {
NoneReply,
"\x01",0x03,0x43,ID_AnswerCall },
2661 {N6110_ReplySendDTMF,
"\x01",0x03,0x51,ID_SendDTMF },
2665 {N6110_ReplyIncomingSMS,
"\x02",0x03,0x10,ID_IncomingFrame },
2666 #ifdef GSM_ENABLE_CELLBROADCAST 2668 {DCT3_ReplySetIncomingCB,
"\x02",0x03,0x22,ID_SetIncomingCB },
2669 {DCT3_ReplyIncomingCB,
"\x02",0x03,0x23,ID_IncomingFrame },
2676 {N6110_ReplyGetMemory,
"\x03",0x03,0x02,
ID_GetMemory },
2677 {N6110_ReplyGetMemory,
"\x03",0x03,0x03,ID_GetMemory },
2678 {N6110_ReplySetMemory,
"\x03",0x03,0x05,
ID_SetMemory },
2679 {N6110_ReplySetMemory,
"\x03",0x03,0x06,ID_SetMemory },
2681 {N6110_ReplyGetMemoryStatus,
"\x03",0x03,0x09,ID_GetMemoryStatus },
2682 {N6110_ReplyGetCallerLogo,
"\x03",0x03,0x11,
ID_GetBitmap },
2683 {N6110_ReplyGetCallerLogo,
"\x03",0x03,0x12,ID_GetBitmap },
2684 {N6110_ReplySetCallerLogo,
"\x03",0x03,0x14,
ID_SetBitmap },
2685 {N6110_ReplySetCallerLogo,
"\x03",0x03,0x15,ID_SetBitmap },
2687 {N6110_ReplyGetSpeedDial,
"\x03",0x03,0x18,ID_GetSpeedDial },
2693 {N6110_ReplyGetProfileFeature,
"\x05",0x03,0x0d,
ID_GetProfile },
2694 {N6110_ReplySetProfileFeature,
"\x05",0x03,0x11,
ID_SetProfile },
2695 {N6110_ReplySetProfileFeature,
"\x05",0x03,0x12,ID_SetProfile },
2696 {N6110_ReplyGetProfileFeature,
"\x05",0x03,0x14,ID_GetProfile },
2698 {N6110_ReplyGetProfileFeature,
"\x05",0x03,0x15,ID_GetProfile },
2699 {N6110_ReplyGetPhoneLanguage,
"\x05",0x03,0x15,ID_GetLanguage },
2700 {N6110_ReplyGetStartup,
"\x05",0x03,0x17,ID_GetBitmap },
2701 {N6110_ReplySetStartup,
"\x05",0x03,0x19,ID_SetBitmap },
2702 {N6110_ReplyGetProfileFeature,
"\x05",0x03,0x1b,ID_GetProfile },
2705 {N6110_ReplyGetOpLogo,
"\x05",0x03,0x34,ID_GetBitmap },
2707 {N6110_ReplySetRingtone,
"\x05",0x03,0x38,ID_SetRingtone },
2711 {N6110_ReplyUSSDInfo,
"\x06",0x03,0x05,ID_IncomingFrame },
2712 {
NoneReply,
"\x06",0x03,0x06,ID_IncomingFrame },
2716 {N6110_ReplyEnterSecurityCode,
"\x08",0x03,0x0c,ID_EnterSecurityCode },
2725 {N6110_ReplyGetDisplayStatus,
"\x0D",0x03,0x52,ID_IncomingFrame },
2733 {N6110_ReplyAddCalendar,
"\x13",0x03,0x65,ID_IncomingFrame },
2736 {N6110_ReplyDeleteCalendar,
"\x13",0x03,0x69,ID_IncomingFrame },
2739 {N6110_ReplySaveSMSMessage,
"\x14",0x03,0x06,ID_SaveSMSMessage },
2741 {N6110_ReplyGetSMSMessage,
"\x14",0x03,0x09,ID_GetSMSMessage },
2745 {N6110_ReplyGetSMSStatus,
"\x14",0x03,0x38,ID_GetSMSStatus },
2776 {N6110_ReplySetBinRingtone,
"\x40",0x02,0xA0,ID_SetRingtone },
2783 {N6110_ReplyGetSetPicture,
"\x47",0x03,0x02,ID_GetBitmap },
2784 {N6110_ReplyGetSetPicture,
"\x47",0x03,0x04,ID_SetBitmap },
2785 {N6110_ReplyGetSetPicture,
"\x47",0x03,0x05,ID_SetBitmap },
2786 {N6110_ReplyGetSetPicture,
"\x47",0x03,0x06,ID_GetBitmap },
2795 {NULL,
"\x00",0x00,0x00,
ID_None }
2799 "2100|3210|3310|3330|3390|3390b|3410|3610|5110|5110i|5130|5190|5210|5510|6110|6130|6150|6190|8210|8250|8290|8850|8855|8890",
2800 N6110ReplyFunctions,
2805 N6110_ShowStartInfo,
2825 N6110_EnterSecurityCode,
2826 N6110_GetSecurityStatus,
2827 N6110_GetDisplayStatus,
2829 N6110_GetBatteryCharge,
2830 N6110_GetSignalQuality,
2835 N6110_GetMemoryStatus,
2847 N6110_GetSMSMessage,
2848 N6110_GetNextSMSMessage,
2851 N6110_DeleteSMSMessage,
2866 N6110_ConferenceCall,
2905 N6110_GetNextCalendarNote,
2907 N6110_AddCalendarNote,
2908 N6110_DeleteCalendarNote,
unsigned char MagicBytes[4]
GSM_SecurityCodeType * SecurityStatus
gboolean EnableIncomingUSSD
GSM_Error DCT3DCT4_ReplyGetActiveConnectSet(GSM_Protocol_Message *msg, GSM_StateMachine *s)
unsigned char Name[(GSM_MAX_RINGTONE_NAME_LENGTH+1) *2]
void GSM_SetDefaultReceivedSMSData(GSM_SMSMessage *SMS)
GSM_Error DCT3_EnableSecurity(GSM_StateMachine *s, unsigned char status)
GSM_Profile_Feat_ID FeatureID[15]
GSM_ChargeState ChargeState
const unsigned char * GSM_GetNetworkName(const char *NetworkCode)
IncomingUSSDCallback IncomingUSSD
char * DecodeUnicodeString(const unsigned char *src)
void GSM_PhonebookFindDefaultNameNumberGroup(const GSM_MemoryEntry *entry, int *Name, int *Number, int *Group)
void DumpMessage(GSM_Debug_Info *d, const unsigned char *message, const size_t messagesize)
size_t PHONE_GetBitmapSize(GSM_Phone_Bitmap_Types Type, size_t Width, size_t Height)
GSM_RingtoneFormat Format
GSM_Error DCT3DCT4_GetModel(GSM_StateMachine *s)
void CopyUnicodeString(unsigned char *Dest, const unsigned char *Source)
void NOKIA_DecodeSMSState(GSM_StateMachine *s, unsigned char state, GSM_SMSMessage *sms)
GSM_Error N61_71_ReplyResetPhoneSettings(GSM_Protocol_Message *msg, GSM_StateMachine *s)
void * IncomingCallUserData
GSM_Error DCT3_CancelCall(GSM_StateMachine *s, int ID, gboolean all)
GSM_Error NOKIA_SetIncomingUSSD(GSM_StateMachine *s, gboolean enable)
GSM_Error DCT3_PressKey(GSM_StateMachine *s, GSM_KeyCode Key, gboolean Press)
GSM_MemoryType MemoryType
void * IncomingUSSDUserData
#define GSM_PHONEBOOK_TEXT_LENGTH
GSM_Error DCT3_GetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time, unsigned char msgtype)
GSM_Error DCT3_ReplyGetWAPSettings(GSM_Protocol_Message *msg, GSM_StateMachine *s)
gboolean FileSystemRingtone
int GSM_PackSemiOctetNumber(const unsigned char *Number, unsigned char *Output, gboolean semioctet)
char Code[GSM_SECURITY_CODE_LEN+1]
GSM_ConnectionType ConnectionType
GSM_Error DCT3_ReplyGetIMEI(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_ReplyGetDateTime(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_DialVoice(GSM_StateMachine *s, char *number, GSM_CallShowNumber ShowNumber)
GSM_Error DCT3_ReplyPlayTone(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_DecodeSMSFrame(GSM_StateMachine *s, GSM_SMSMessage *SMS, unsigned char *buffer)
#define N6110_FRAME_HEADER
GSM_Error DCT3_ReplySIMLogin(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_MemoryType NOKIA_GetMemoryType(GSM_StateMachine *s, GSM_MemoryType memory_type, unsigned char *ID)
GSM_SMSMemoryStatus * SMSStatus
GSM_Error DCT3_GetPPM(GSM_StateMachine *s, char *value)
GSM_MultiSMSMessage * GetSMSMessage
unsigned char Sender[2 *(GSM_MAX_NUMBER_LENGTH+1)]
void NOKIA_EncodeDateTime(GSM_StateMachine *s UNUSED, unsigned char *buffer, GSM_DateTime *datetime)
GSM_Error DCT3_ReplyDialCommand(GSM_Protocol_Message *msg, GSM_StateMachine *s)
int DecodeWithUTF8Alphabet(const unsigned char *src, wchar_t *dest, size_t len)
GSM_Error DCT3_ReplyEnableSecurity(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error GSM_DispatchMessage(GSM_StateMachine *s)
GSM_Error DCT3_GetWAPSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
#define GSM_MAX_RINGTONE_NAME_LENGTH
void PHONE_EncodeBitmap(GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap)
GSM_Error DCT3DCT4_ReplyEnableConnectFunc(GSM_Protocol_Message *msg, GSM_StateMachine *s)
gboolean FileSystemPicture
void NOKIA_FindFeatureValue(GSM_StateMachine *s, GSM_Profile_PhoneTableValue ProfileTable[], unsigned char ID, unsigned char Value, GSM_Phone_Data *Data, gboolean CallerGroups)
GSM_Error(* GetSMSStatus)(GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
GSM_Error NoneReply(GSM_Protocol_Message *msg UNUSED, GSM_StateMachine *s)
GSM_Error DCT3DCT4_ReplyDisableConnectFunc(GSM_Protocol_Message *msg, GSM_StateMachine *s)
size_t UnicodeLength(const unsigned char *str)
GSM_SMSMessageLayout PHONE_SMSDeliver
gboolean EnableIncomingCall
void PHONE_DecodeBitmap(GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap)
GSM_Error PHONE_Terminate(GSM_StateMachine *s)
GSM_Error DCT3_Reset(GSM_StateMachine *s, gboolean hard)
GSM_Error DCT3_SetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time, unsigned char msgtype)
GSM_Error(* WriteMessage)(GSM_StateMachine *s, unsigned const char *buffer, int length, int type)
char IMEI[GSM_MAX_IMEI_LENGTH+1]
GSM_Error DCT3_ReplyDeleteSMSMessage(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_ReplySetAlarm(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error NOKIA_SetIncomingCall(GSM_StateMachine *s, gboolean enable)
GSM_SMSMemoryStatus LastSMSStatus
GSM_Error DCT3_ReplyGetWAPBookmark(GSM_Protocol_Message *msg, GSM_StateMachine *s)
unsigned char GSM_EncodeNokiaRTTLRingtone(GSM_Ringtone *ringtone, unsigned char *package, size_t *maxlength)
GSM_PhoneModel * ModelInfo
GSM_Error DCT3_AnswerAllCalls(GSM_StateMachine *s)
GSM_Error DCT3_ReplySetSMSC(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_ReplyGetSMSC(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_SignalQuality * SignalQuality
GSM_Error DCT3_SetWAPSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
void NOKIA_CopyBitmap(GSM_Phone_Bitmap_Types Type, GSM_Bitmap *Bitmap, char *Buffer, size_t *Length)
GSM_Error DCT3_SetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
void GSM_CalendarFindDefaultTextTimeAlarmPhone(GSM_CalendarEntry *entry, int *Text, int *Time, int *Alarm, int *Phone, int *EndTime, int *Location)
GSM_Error DCT3DCT4_GetFirmware(GSM_StateMachine *s)
GSM_Error DCT3DCT4_ReplySetActiveConnectSet(GSM_Protocol_Message *msg, GSM_StateMachine *s)
void GSM_ClearBatteryCharge(GSM_BatteryCharge *bat)
GSM_Error N61_71_ResetPhoneSettings(GSM_StateMachine *s, GSM_ResetSettingsType Type)
unsigned char Text[(GSM_PHONEBOOK_TEXT_LENGTH+1) *2]
void NOKIA_DecodeNetworkCode(const unsigned char *buffer, char *output)
GSM_Error DCT3_GetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
void GSM_PrintBitmap(FILE *file, GSM_Bitmap *bitmap)
GSM_CalendarNoteType Type
GSM_Debug_Info GSM_global_debug
GSM_Error DCT3DCT4_SetCallDivert(GSM_StateMachine *s, GSM_CallDivert *divert)
void EncodeUnicode(unsigned char *dest, const char *src, size_t len)
unsigned char Name[(GSM_MAX_SMS_NAME_LENGTH+1) *2]
GSM_Error DCT3_ReplySetWAPSettings(GSM_Protocol_Message *msg, GSM_StateMachine *s)
struct GSM_Phone_Data::@2 Priv
gboolean NOKIA_FindPhoneFeatureValue(GSM_StateMachine *s, GSM_Profile_PhoneTableValue ProfileTable[], GSM_Profile_Feat_ID FeatureID, GSM_Profile_Feat_Value FeatureValue, unsigned char *PhoneID, unsigned char *PhoneValue)
GSM_NokiaBinaryRingtone NokiaBinary
GSM_Error DCT3_ReplyPressKey(GSM_Protocol_Message *msg, GSM_StateMachine *s)
void NOKIA_GetDefaultCallerGroupName(GSM_Bitmap *Bitmap)
GSM_Error GSM_WaitFor(GSM_StateMachine *s, unsigned const char *buffer, size_t length, int type, int timeout, GSM_Phone_RequestID request)
unsigned char Frame[50000]
GSM_Error DCT3_GetIMEI(GSM_StateMachine *s)
unsigned char Text[2 *(GSM_MAX_USSD_LENGTH+1)]
GSM_Error DCT3_ReplyGetAlarm(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_SetWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
GSM_Phone_RequestID RequestID
GSM_Error DCT3_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
GSM_Error DCT3_ReplySIMLogout(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error N61_91_ReplySetOpLogo(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_ReplySendSMSMessage(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3DCT4_ReplyCallDivert(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_SetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm, unsigned char msgtype)
GSM_Error DCT3_SetIncomingCB(GSM_StateMachine *s, gboolean enable)
GSM_Profile_Feat_Value FeatureValue[15]
GSM_SMSMessage SMS[GSM_MAX_MULTI_SMS]
GSM_CalendarType EntryType
IncomingCallCallback IncomingCall
GSM_Error DCT3_SendSMSMessage(GSM_StateMachine *s, GSM_SMSMessage *sms)
GSM_Error DCT3DCT4_ReplyDelWAPBookmark(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_MemoryType MemoryType
GSM_BatteryCharge * BatteryCharge
unsigned char PhoneNumber[(GSM_MAX_NUMBER_LENGTH+1) *2]
GSM_Error PHONE_GetSMSFolders(GSM_StateMachine *s UNUSED, GSM_SMSFolders *folders)
GSM_Error DCT3DCT4_CancelAllDiverts(GSM_StateMachine *s)
void NOKIA_EncodeNetworkCode(unsigned char *buffer, const char *input)
GSM_Error DCT3DCT4_ReplySetWAPBookmark(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3DCT4_GetCallDivert(GSM_StateMachine *s, GSM_CallDivert *reqest, GSM_MultiCallDivert *response)
GSM_Error GSM_DecodeNokiaRTTLRingtone(GSM_Ringtone *ringtone, unsigned char *package, size_t maxlength UNUSED)
int EncodeWithUnicodeAlphabet(const unsigned char *src, wchar_t *dest)
GSM_Error DCT3_GetProductCode(GSM_StateMachine *s, char *value)
GSM_Error GSM_UnpackSemiOctetNumber(GSM_Debug_Info *di, unsigned char *retval, const unsigned char *Number, size_t *pos, size_t bufferlength, gboolean semioctet)
GSM_SubCalendarEntry Entries[GSM_CALENDAR_ENTRIES]
int GSM_UnpackEightBitsToSeven(size_t offset, size_t in_length, size_t out_length, const unsigned char *input, unsigned char *output)
GSM_Error DCT3_ReplyNetmonitor(GSM_Protocol_Message *msg, GSM_StateMachine *s)
N6110_Language PhoneLanguage
GSM_Error DCT3DCT4_ReplyGetModelFirmware(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_MemoryType MemoryType
void GSM_ClearBitmap(GSM_Bitmap *bmp)
gboolean GSM_IsPhoneFeatureAvailable(GSM_PhoneModel *model, GSM_Feature feature)
GSM_Phone_Functions * Functions
GSM_Error NOKIA_ReplyGetPhoneString(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_SMSMessageLayout PHONE_SMSSubmit
void PHONE_GetBitmapWidthHeight(GSM_Phone_Bitmap_Types Type, size_t *width, size_t *height)
GSM_Error(* GetSMS)(GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
GSM_EntryLocation Location
GSM_Error DCT3_GetHardware(GSM_StateMachine *s, char *value)
void GSM_EncodeUDHHeader(GSM_Debug_Info *di, GSM_UDHHeader *UDH)
GSM_Error DCT3_GetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm, unsigned char msgtype)
void * IncomingSMSUserData
GSM_Error DCT3_DeleteWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
unsigned char Text[2 *(GSM_BITMAP_TEXT_LENGTH+1)]
GSM_Protocol_Functions * Functions
GSM_Error NOKIA_GetManufacturer(GSM_StateMachine *s)
GSM_MemoryStatus * MemoryStatus
GSM_SecurityCodeType Type
GSM_SMSMessage * SaveSMSMessage
void NOKIA_DecodeDateTime(GSM_StateMachine *s, unsigned char *buffer, GSM_DateTime *datetime, gboolean seconds, gboolean DayMonthReverse)
GSM_Error DCT3_ReplyWaitSMSC(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3_GetOriginalIMEI(GSM_StateMachine *s, char *value)
GSM_Error NOKIA_SetIncomingSMS(GSM_StateMachine *s, gboolean enable)
int EncodeWithUTF8Alphabet(unsigned long src, unsigned char *ret)
GSM_Error DCT3_GetWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
gboolean EnableIncomingSMS
GSM_Error PHONE_EncodeSMSFrame(GSM_StateMachine *s, GSM_SMSMessage *SMS, unsigned char *buffer, GSM_SMSMessageLayout Layout, int *length, gboolean clear)
GSM_DisplayFeatures * DisplayFeatures
GSM_Error DCT3_Netmonitor(GSM_StateMachine *s, int testnumber, char *value)
GSM_DisplayFeature Feature[7]
GSM_Error DCT3_GetNetworkInfo(GSM_StateMachine *s, GSM_NetworkInfo *netinfo)
GSM_Error DCT3DCT4_AnswerCall(GSM_StateMachine *s, int ID)
GSM_Error DCT3_GetSMSStatus(GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
char Model[GSM_MAX_MODEL_LENGTH+1]
GSM_SpeedDial * SpeedDial
int DecodeWithUnicodeAlphabet(wchar_t src, unsigned char *dest)
GSM_Error DCT3_ReplySetDateTime(GSM_Protocol_Message *msg, GSM_StateMachine *s)
IncomingSMSCallback IncomingSMS
GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message *msg, GSM_StateMachine *s)
unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH+1) *2]
void NOKIA_GetDefaultProfileName(GSM_Profile *Profile)
GSM_Error DCT3DCT4_SendDTMF(GSM_StateMachine *s, char *sequence)
const unsigned char * GSM_GetCountryName(const char *CountryCode)
char ProductCodeCache[50]
int smprintf(GSM_StateMachine *s, const char *format,...)
GSM_Error DCT3_GetManufactureMonth(GSM_StateMachine *s, char *value)
GSM_SubMemoryEntry Entries[GSM_PHONEBOOK_ENTRIES]