-rw-r--r-- | gammu/emb/common/gsmstate.c | 74 |
1 files changed, 53 insertions, 21 deletions
diff --git a/gammu/emb/common/gsmstate.c b/gammu/emb/common/gsmstate.c index b8f5f89..31e365d 100644 --- a/gammu/emb/common/gsmstate.c +++ b/gammu/emb/common/gsmstate.c | |||
@@ -187,4 +187,7 @@ GSM_Error GSM_RegisterAllPhoneModules(GSM_StateMachine *s) | |||
187 | GSM_RegisterModule(s,&N3650Phone); | 187 | GSM_RegisterModule(s,&N3650Phone); |
188 | #endif | 188 | #endif |
189 | #ifdef GSM_ENABLE_NOKIA650 | ||
190 | GSM_RegisterModule(s,&N650Phone); | ||
191 | #endif | ||
189 | #ifdef GSM_ENABLE_NOKIA6110 | 192 | #ifdef GSM_ENABLE_NOKIA6110 |
190 | GSM_RegisterModule(s,&N6110Phone); | 193 | GSM_RegisterModule(s,&N6110Phone); |
@@ -211,5 +214,4 @@ GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum) | |||
211 | GSM_DateTimetime; | 214 | GSM_DateTimetime; |
212 | int i; | 215 | int i; |
213 | char Buffer[80]; | ||
214 | 216 | ||
215 | for (i=0;i<s->ConfigNum;i++) { | 217 | for (i=0;i<s->ConfigNum;i++) { |
@@ -251,16 +253,14 @@ GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum) | |||
251 | if (s->di.dl == DL_TEXTALL || s->di.dl == DL_TEXT || s->di.dl == DL_TEXTERROR || | 253 | if (s->di.dl == DL_TEXTALL || s->di.dl == DL_TEXT || s->di.dl == DL_TEXTERROR || |
252 | s->di.dl == DL_TEXTALLDATE || s->di.dl == DL_TEXTDATE || s->di.dl == DL_TEXTERRORDATE) { | 254 | s->di.dl == DL_TEXTALLDATE || s->di.dl == DL_TEXTDATE || s->di.dl == DL_TEXTERRORDATE) { |
253 | smprintf(s,"[Gammu - version %s built %s %s]\n",VERSION,__TIME__,__DATE__); | 255 | smprintf(s,"[Gammu - %s built %s %s",VERSION,__TIME__,__DATE__); |
254 | smprintf(s,"[Connection - \"%s\"]\n",s->CurrentConfig->Connection); | 256 | if (strlen(GetCompiler()) != 0) { |
257 | smprintf(s," in %s",GetCompiler()); | ||
258 | } | ||
259 | smprintf(s,"]\n[Connection - \"%s\"]\n",s->CurrentConfig->Connection); | ||
255 | smprintf(s,"[Model type - \"%s\"]\n",s->CurrentConfig->Model); | 260 | smprintf(s,"[Model type - \"%s\"]\n",s->CurrentConfig->Model); |
256 | smprintf(s,"[Device - \"%s\"]\n",s->CurrentConfig->Device); | 261 | smprintf(s,"[Device - \"%s\"]\n",s->CurrentConfig->Device); |
257 | 262 | if (strlen(GetOS()) != 0) { | |
258 | Buffer[0] = 0; | 263 | smprintf(s,"[Run on - %s]\n",GetOS()); |
259 | if (strlen(GetOS()) != 0) sprintf(Buffer,"%s",GetOS()); | ||
260 | if (strlen(GetCompiler()) != 0) { | ||
261 | if (Buffer[0] != 0) strcat(Buffer+strlen(Buffer),", "); | ||
262 | strcat(Buffer+strlen(Buffer),GetCompiler()); | ||
263 | } | 264 | } |
264 | if (Buffer[0] != 0) smprintf(s,"[OS/compiler - %s]\n",Buffer); | ||
265 | } | 265 | } |
266 | if (s->di.dl==DL_BINARY) { | 266 | if (s->di.dl==DL_BINARY) { |
@@ -555,4 +555,5 @@ static GSM_Error CheckReplyFunctions(GSM_StateMachine *s, GSM_Reply_Function *Re | |||
555 | bool available = false; | 555 | bool available = false; |
556 | int i = 0; | 556 | int i = 0; |
557 | //int j; | ||
557 | 558 | ||
558 | while (Reply[i].requestID!=ID_None) { | 559 | while (Reply[i].requestID!=ID_None) { |
@@ -569,6 +570,16 @@ static GSM_Error CheckReplyFunctions(GSM_StateMachine *s, GSM_Reply_Function *Re | |||
569 | } | 570 | } |
570 | } else { | 571 | } else { |
571 | if (strncmp(Reply[i].msgtype,msg->Buffer,strlen(Reply[i].msgtype))==0) { | 572 | // printf("msg length %i %i\n",strlen(Reply[i].msgtype),msg->Length); |
572 | execute=true; | 573 | if ((int)strlen(Reply[i].msgtype)<msg->Length) { |
574 | // printf("Comparing \"%s\" and \"",Reply[i].msgtype); | ||
575 | // for (j=0;j<strlen(Reply[i].msgtype);j++) { | ||
576 | // if (msg->Buffer[j]!=13 && msg->Buffer[j]!=10) { | ||
577 | // printf("%c",msg->Buffer[j]); | ||
578 | // } | ||
579 | // } | ||
580 | // printf("\"\n"); | ||
581 | if (strncmp(Reply[i].msgtype,msg->Buffer,strlen(Reply[i].msgtype))==0) { | ||
582 | execute=true; | ||
583 | } | ||
573 | } | 584 | } |
574 | } | 585 | } |
@@ -846,6 +857,9 @@ bool GSM_ReadConfig(INI_Section *cfg_info, GSM_Config *cfg, int num) | |||
846 | 857 | ||
847 | static OnePhoneModel allmodels[] = { | 858 | static OnePhoneModel allmodels[] = { |
859 | #ifdef GSM_ENABLE_NOKIA650 | ||
860 | {"0650" ,"THF-12","", {0}}, | ||
861 | #endif | ||
848 | #ifdef GSM_ENABLE_NOKIA6510 | 862 | #ifdef GSM_ENABLE_NOKIA6510 |
849 | {"1100", "RH-18" ,"", {0}}, | 863 | {"1100" ,"RH-18" ,"", {0}}, |
850 | {"1100a","RH-38" ,"", {0}}, | 864 | {"1100a","RH-38" ,"", {0}}, |
851 | {"1100b","RH-36" ,"", {0}}, | 865 | {"1100b","RH-36" ,"", {0}}, |
@@ -855,9 +869,9 @@ static OnePhoneModel allmodels[] = { | |||
855 | #endif | 869 | #endif |
856 | #ifdef GSM_ENABLE_NOKIA6510 | 870 | #ifdef GSM_ENABLE_NOKIA6510 |
857 | {"3100" ,"RH-19" ,"", {F_PBKTONEGAL,F_PBKSMSLIST,0}}, | 871 | {"3100" ,"RH-19" ,"", {F_PBKTONEGAL,F_PBKSMSLIST,0}},//fixme |
858 | {"3100b","RH-50" ,"", {F_PBKTONEGAL,F_PBKSMSLIST,0}}, | 872 | {"3100b","RH-50" ,"", {F_PBKTONEGAL,F_PBKSMSLIST,0}},//fixme |
859 | {"3108", "RH-6", "Nokia 3108",{0}}, //does it have irda ? | 873 | {"3108", "RH-6", "Nokia 3108",{0}}, //does it have irda ? |
860 | {"3200", "RH-30" ,"Nokia 3200",{F_PBKTONEGAL,0}}, | 874 | {"3200", "RH-30" ,"Nokia 3200",{F_PBKTONEGAL,0}},//fixme |
861 | {"3200a","RH-31" ,"Nokia 3200",{F_PBKTONEGAL,0}}, | 875 | {"3200a","RH-31" ,"Nokia 3200",{F_PBKTONEGAL,0}},//fixme |
862 | #endif | 876 | #endif |
863 | #ifdef GSM_ENABLE_NOKIA6110 | 877 | #ifdef GSM_ENABLE_NOKIA6110 |
@@ -866,6 +880,6 @@ static OnePhoneModel allmodels[] = { | |||
866 | #endif | 880 | #endif |
867 | #ifdef GSM_ENABLE_NOKIA6510 | 881 | #ifdef GSM_ENABLE_NOKIA6510 |
868 | {"3300" ,"NEM-1" ,"Nokia 3300", {F_PBKTONEGAL,0}}, | 882 | {"3300" ,"NEM-1" ,"Nokia 3300", {F_PBKTONEGAL,0}},//fixme |
869 | {"3300" ,"NEM-2" ,"Nokia 3300", {F_PBKTONEGAL,0}}, | 883 | {"3300" ,"NEM-2" ,"Nokia 3300", {F_PBKTONEGAL,0}},//fixme |
870 | #endif | 884 | #endif |
871 | #ifdef GSM_ENABLE_NOKIA6110 | 885 | #ifdef GSM_ENABLE_NOKIA6110 |
@@ -899,4 +913,6 @@ static OnePhoneModel allmodels[] = { | |||
899 | {"5100" ,"NPM-6U","Nokia 5100", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, | 913 | {"5100" ,"NPM-6U","Nokia 5100", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, |
900 | {"5100" ,"NPM-6X","Nokia 5100", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, | 914 | {"5100" ,"NPM-6X","Nokia 5100", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, |
915 | {"5140" ,"NPL-4" ,"Nokia 5140", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKUSER,F_WAPMMSPROXY,0}}, | ||
916 | {"5140" ,"NPL-5" ,"Nokia 5140", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKUSER,F_WAPMMSPROXY,0}}, | ||
901 | #endif | 917 | #endif |
902 | #ifdef GSM_ENABLE_NOKIA6110 | 918 | #ifdef GSM_ENABLE_NOKIA6110 |
@@ -923,5 +939,5 @@ static OnePhoneModel allmodels[] = { | |||
923 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA6510) | 939 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA6510) |
924 | {"6200" ,"NPL-3" ,"Nokia 6200", {F_PBKTONEGAL,0}}, | 940 | {"6200" ,"NPL-3" ,"Nokia 6200", {F_PBKTONEGAL,0}}, |
925 | {"6220" ,"RH-20" ,"Nokia 6220", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,F_PBKUSER,F_WAPMMSPROXY,0}}, | 941 | {"6220" ,"RH-20" ,"Nokia 6220", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,F_PBKUSER,F_WAPMMSPROXY,F_NOTES,0}}, |
926 | #endif | 942 | #endif |
927 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA7110) | 943 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA7110) |
@@ -930,5 +946,5 @@ static OnePhoneModel allmodels[] = { | |||
930 | #endif | 946 | #endif |
931 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA6510) | 947 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA6510) |
932 | {"6230" ,"RH-12" ,"Nokia 6230", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,F_PBKUSER,0}}, | 948 | {"6230" ,"RH-12" ,"Nokia 6230", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,F_PBKUSER,F_WAPMMSPROXY,F_NOTES,0}}, |
933 | {"6310" ,"NPE-4" ,"Nokia 6310", {F_TODO63,F_CAL65,F_NOMIDI,F_NOMMS,F_VOICETAGS,0}}, | 949 | {"6310" ,"NPE-4" ,"Nokia 6310", {F_TODO63,F_CAL65,F_NOMIDI,F_NOMMS,F_VOICETAGS,0}}, |
934 | {"6310i","NPL-1" ,"Nokia 6310i",{F_TODO63,F_CAL65,F_NOMIDI,F_BLUETOOTH,F_NOMMS,F_VOICETAGS,0}}, | 950 | {"6310i","NPL-1" ,"Nokia 6310i",{F_TODO63,F_CAL65,F_NOMIDI,F_BLUETOOTH,F_NOMMS,F_VOICETAGS,0}}, |
@@ -936,6 +952,9 @@ static OnePhoneModel allmodels[] = { | |||
936 | {"6510" ,"NPM-9" ,"Nokia 6510", {F_TODO63,F_CAL65,F_NOMIDI,F_RADIO,F_NOFILESYSTEM,F_NOMMS,F_VOICETAGS,0}}, | 952 | {"6510" ,"NPM-9" ,"Nokia 6510", {F_TODO63,F_CAL65,F_NOMIDI,F_RADIO,F_NOFILESYSTEM,F_NOMMS,F_VOICETAGS,0}}, |
937 | {"6610" ,"NHL-4U","Nokia 6610", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, | 953 | {"6610" ,"NHL-4U","Nokia 6610", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, |
954 | {"6610i","RM-37" ,"Nokia 6610i",{F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, | ||
938 | {"6800" ,"NSB-9" ,"Nokia 6800", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}}, | 955 | {"6800" ,"NSB-9" ,"Nokia 6800", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}}, |
939 | {"6800" ,"NHL-6" ,"Nokia 6800", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}}, | 956 | {"6800" ,"NHL-6" ,"Nokia 6800", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}}, |
957 | {"6810" ,"RM-2" ,"Nokia 6810", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}},//quess | ||
958 | {"6820" ,"NHL-9" ,"Nokia 6820", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}},//quess | ||
940 | #endif | 959 | #endif |
941 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA7110) | 960 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA7110) |
@@ -944,4 +963,5 @@ static OnePhoneModel allmodels[] = { | |||
944 | #endif | 963 | #endif |
945 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA6510) | 964 | #if defined(GSM_ENABLE_ATGEN) || defined(GSM_ENABLE_NOKIA6510) |
965 | {"7200" ,"RH-23" ,"Nokia 7200", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,F_PBKUSER,0}},//quess | ||
946 | {"7210" ,"NHL-4" ,"Nokia 7210", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, | 966 | {"7210" ,"NHL-4" ,"Nokia 7210", {F_PBKTONEGAL,F_TODO66,F_RADIO,0}}, |
947 | {"7250" ,"NHL-4J","Nokia 7250", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKIMG,0}}, | 967 | {"7250" ,"NHL-4J","Nokia 7250", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKIMG,0}}, |
@@ -976,6 +996,8 @@ static OnePhoneModel allmodels[] = { | |||
976 | #ifdef GSM_ENABLE_ATGEN | 996 | #ifdef GSM_ENABLE_ATGEN |
977 | {"at" , "at", "", {0}}, | 997 | {"at" , "at", "", {0}}, |
998 | /* Siemens */ | ||
978 | {"M20" , "M20", "", {F_M20SMS,F_SLOWWRITE,0}}, | 999 | {"M20" , "M20", "", {F_M20SMS,F_SLOWWRITE,0}}, |
979 | {"MC35" , "MC35", "", {0}}, | 1000 | {"MC35" , "MC35", "", {0}}, |
1001 | {"TC35" , "TC35", "", {0}}, | ||
980 | {"S25", "S25", "SIEMENS S25", {0}}, | 1002 | {"S25", "S25", "SIEMENS S25", {0}}, |
981 | {"C35i" , "C35i", "", {0}}, | 1003 | {"C35i" , "C35i", "", {0}}, |
@@ -992,4 +1014,13 @@ static OnePhoneModel allmodels[] = { | |||
992 | {"ME45" , "3618" , "", {0}}, | 1014 | {"ME45" , "3618" , "", {0}}, |
993 | {"S55" , "S55" , "", {0}}, | 1015 | {"S55" , "S55" , "", {0}}, |
1016 | /* Samsung */ | ||
1017 | {"S100" , "SGH-S100" , "", {0}}, | ||
1018 | {"S200" , "SGH-S200" , "", {0}}, | ||
1019 | {"S300" , "SGH-S300" , "", {0}}, | ||
1020 | {"S500" , "SGH-S500" , "", {0}}, | ||
1021 | {"V200" , "SGH-V200" , "", {0}}, | ||
1022 | {"T100" , "SGH-T100" , "", {0}}, | ||
1023 | {"E700" , "SGH-E700" , "", {0}}, | ||
1024 | /* Ericsson/Sony Ericsson */ | ||
994 | {"T28s", "1101101-BVT28s","", {0}}, | 1025 | {"T28s", "1101101-BVT28s","", {0}}, |
995 | {"R320s" , "1101201-BV R320s","", {0}}, | 1026 | {"R320s" , "1101201-BV R320s","", {0}}, |
@@ -1005,4 +1036,5 @@ static OnePhoneModel allmodels[] = { | |||
1005 | {"T310", "1130602-BVT310" ,"", {0}}, | 1036 | {"T310", "1130602-BVT310" ,"", {0}}, |
1006 | {"P800", "7130501-BVP800" ,"", {0}}, | 1037 | {"P800", "7130501-BVP800" ,"", {0}}, |
1038 | /* Other */ | ||
1007 | {"iPAQ" , "iPAQ" , "" , {0}}, | 1039 | {"iPAQ" , "iPAQ" , "" , {0}}, |
1008 | {"A2D" , "A2D" , "" , {0}}, | 1040 | {"A2D" , "A2D" , "" , {0}}, |