# newmodules/n7110.o
# newmodules/sniff/sniff.o \
# newmodules/newat.o \
+# gsm-phonebook.o \
+# gsm-coding.o \
+# gsm-sms.o \
+# gsm-networks.o \
OBJS = devices/device.o \
data/rlp-common.o \
data/rlp-crc24.o \
gsm-datetime.o \
gsm-api.o \
- gsm-sms.o \
- gsm-coding.o \
- gsm-phonebook.o \
- gsm-networks.o \
files/cfgreader.o \
misc.o \
protocol/fbus.o \
GSM_PhonebookEntry *CurrentPhonebookEntry;
GSM_Error CurrentPhonebookError;
-#ifndef UCLINUX
GSM_SpeedDial *CurrentSpeedDialEntry;
GSM_Error CurrentSpeedDialError;
-#endif /* UCLINUX */
unsigned char Current_IMEI[GSM_MAX_IMEI_LENGTH];
unsigned char Current_Revision[GSM_MAX_REVISION_LENGTH];
#include "gsm-networks.h"
#include "gsm-coding.h"
-#ifndef UCLINUX
-
static GSM_Country GSM_Countries[] =
{
{ "202", "Greece" },
output[4]=output[3];
output[3]=' ';
}
-
-#endif /* UCLINUX */
NULL_KeepAlive,
N6110_GetMemoryLocation,
N6110_WritePhonebookLocation,
-#ifndef UCLINUX
N6110_GetSpeedDial,
N6110_SetSpeedDial,
-#else /* UCLINUX */
- NULL,
- NULL,
-#endif /* UCLINUX */
N6110_GetMemoryStatus,
#ifndef UCLINUX
N6110_GetSMSStatus,
N6110_EnterSecurityCode,
N6110_GetSecurityCodeStatus,
N6110_GetSecurityCode,
+#else /* UCLINUX */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+#endif /* UCLINUX */
N6110_GetIMEI,
N6110_GetRevision,
N6110_GetModel,
+#ifndef UCLINUX
N6110_GetDateTime,
N6110_SetDateTime,
N6110_GetAlarm,
NULL,
NULL,
NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
#endif /* UCLINUX */
N6110_DialData,
#ifndef UCLINUX
return GE_NONE;
}
+#endif /* UCLINUX */
+
GSM_Error N6110_GetIMEI(char *imei)
{
if (strlen(Current_IMEI)>0) {
return (GE_TRYAGAIN);
}
-#endif /* UCLINUX */
-
static GSM_Error N6110_GetModel(char *model)
{
if (strlen(Current_Model)>0) {
sleep(1);
if (GetModelFeature (FN_PHONEBOOK)==F_PBK33) {//pbk with Unicode
+#ifndef UCLINUX
DecodeUnicode (CurrentPhonebookEntry->Name, MessageBuffer+6, count/2);
CurrentPhonebookEntry->Name[count/2] = 0x00;
+#else /* UCLINUX */
+ fprintf(stderr,"FATAL ERROR: DecodeUnicode disabled!\n");
+ exit(1);
+#endif /* UCLINUX */
} else {
memcpy(CurrentPhonebookEntry->Name, MessageBuffer + 6, count);
CurrentPhonebookEntry->Name[count] = 0x00;
current=7;
if (GetModelFeature (FN_PHONEBOOK)==F_PBK33) {
+#ifndef UCLINUX
req[6] = strlen(entry->Name)*2;
}
current+=strlen(entry->Name)*2;
+
+#else /* UCLINUX */
+
+ fprintf(stderr,"FATAL ERROR: EncodeUnicode disabled!\n");
+ exit(1);
+
+#endif /* UCLINUX */
} else {
req[6] = strlen(entry->Name);
(20, &CurrentSendDTMFError, 5+length, 0x01, req);
}
-void N6110_ReplyGetSpeedDial(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) {
+#endif /* UCLINUX */
+
+static void N6110_ReplyGetSpeedDial(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) {
switch (MessageBuffer[3]) {
(20, &CurrentSpeedDialError, 5, 0x03, req);
}
-void N6110_ReplySetSpeedDial(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) {
+static void N6110_ReplySetSpeedDial(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) {
switch (MessageBuffer[3]) {
(20, &CurrentSpeedDialError, 7, 0x03, req);
}
+#ifndef UCLINUX
+
/* This function finds parts of SMS in frame used in new Nokia phones
in internal protocols (they're coded according to GSM 03.40), copies them
to GSM_ETSISMSMessage and calls GSM_DecodeETSISMS to decode
case 0x06:N6110_ReplyWritePhonebookLocation(MessageLength,MessageBuffer,MessageType);break;
case 0x08:
case 0x09:N6110_ReplyGetMemoryStatus(MessageLength,MessageBuffer,MessageType);break;
-#ifndef UCLINUX
case 0x17:
case 0x18:N6110_ReplyGetSpeedDial(MessageLength,MessageBuffer,MessageType);break;
case 0x1a:
case 0x1b:N6110_ReplySetSpeedDial(MessageLength,MessageBuffer,MessageType);break;
+#ifndef UCLINUX
default :N6110_Dispatch0x03Message(MessageLength,MessageBuffer,MessageType);break;
#endif /* UCLINUX */
}
#endif /* UCLINUX */
static char *BinDir; /* Binaries directory from .gnokiirc file - not used here yet */
-#ifdef DEBUG
+#ifndef UCLINUX
static GSM_SMSMessage SMS[4];
-#endif
+#endif /* UCLINUX */
#ifndef UCLINUX
return 0;
}
-#endif /* UCLINUX */
-
static int GSM_SaveMultiPartSMSOnConsole(GSM_MultiSMSMessage *MultiSMS, int argnum, int argc, char *argv[],
bool inter, bool unicode, bool profile, bool scale) {
return 0;
}
-#ifndef UCLINUX
-
void GSM_PlayRingtoneOnConsole(GSM_Ringtone *ringtone)
{
int i;
));
#endif /* UCLINUX */
+#ifndef UCLINUX
fprintf(stdout, _(
" gnokii --getmemory memory_type [start [end]] [-short|-v30|-v21|-v]\n"
+ ));
+#else /* UCLINUX */
+ fprintf(stdout, _(
+" gnokii --getmemory memory_type [start [end]] [-short]\n"
+ ));
+#endif /* UCLINUX */
+
+ fprintf(stdout, _(
" gnokii --writephonebook [-i]\n"
));
" gnokii --sendphonebookentry destination memory_type location\n"
" [--smsc message_center_number] [--smscno message_center_index]\n"
" [-s] [-v n] [-d]\n"
- ));
-#endif /* UCLINUX */
-
- fprintf(stdout, _(
" gnokii --savephonebookentry memory_type location\n"
" [--smsc message_center_number] [--smscno message_center_index]\n"
" [-r] [-i] [-s] [-a] [--name name]\n"
- ));
-
-#ifndef UCLINUX
- fprintf(stdout, _(
" gnokii --getvoicemailbox\n"
));
#endif /* UCLINUX */
{ "sendcalendarnote", required_argument, NULL, OPT_SENDCALENDARNOTE },
{ "savecalendarnote", required_argument, NULL, OPT_SAVECALENDARNOTE },
{ "sendphonebookentry", required_argument, NULL, OPT_SENDPHONEBOOKENTRY},
-#endif /* UCLINUX */
{ "savephonebookentry", required_argument, NULL, OPT_SAVEPHONEBOOKENTRY},
-#ifndef UCLINUX
{ "deletecalendarnote", required_argument, NULL, OPT_DELCALENDARNOTE },// Delete calendar note mode
#endif /* UCLINUX */
{ "getmemory", required_argument, NULL, OPT_GETMEMORY },// Get memory mode
case OPT_DELCALENDARNOTE: rc = deletecalendarnote(optarg);break;
case OPT_SAVECALENDARNOTE: rc = savecalendarnote(nargc, nargv);break;
case OPT_SENDCALENDARNOTE: rc = sendcalendarnote(nargc, nargv);break;
-#endif /* UCLINUX */
case OPT_SAVEPHONEBOOKENTRY: rc = savephonebookentry(nargc, nargv);break;
-#ifndef UCLINUX
case OPT_SENDPHONEBOOKENTRY: rc = sendphonebookentry(nargc, nargv);break;
case OPT_WRITECALENDARNOTE: rc = writecalendarnote(nargv); break;
#endif /* UCLINUX */
i_used++;
else if (do_all)
break;
+#ifndef UCLINUX
if (output_opt && !strcmp( output_opt,"-v30")) {
semicolon_pipe_substitution( &entry, 0 );
fprintf(stdout,_("%s"),GSM_GetVCARD(&entry,30));
fprintf(stdout,_("%s"),GSM_GetVCARD(&entry,10));
formatdone=true;
}
+#endif /* UCLINUX */
if (output_opt && !strcmp(output_opt,"-short")) {
semicolon_pipe_substitution( &entry, 0 );
fprintf(stdout, "%s;%s;%s;%d;%d;", entry.Name, entry.Number, memory_type_string, entry.Location, entry.Group);
return 0;
}
-#endif /* UCLINUX */
-
-static int savephonebookentry(int argc, char *argv[])
+int savephonebookentry(int argc, char *argv[])
{
GSM_MultiSMSMessage MultiSMS;
GSM_PhonebookEntry entry;
return 0;
}
-#ifndef UCLINUX
-
int sendphonebookentry(int argc, char *argv[])
{
GSM_MultiSMSMessage MultiSMS;
int receivesms(int argc, char *argv[]);
int getsmsstatus(int argc, char *argv[]);
int divert(int argc, char *argv[]);
-#endif /* UCLINUX */
-static int savephonebookentry(int argc, char *argv[]);
-#ifndef UCLINUX
+int savephonebookentry(int argc, char *argv[]);
int sendphonebookentry(int argc, char *argv[]);
#endif /* UCLINUX */
extern GSM_PhonebookEntry *CurrentPhonebookEntry;
extern GSM_Error CurrentPhonebookError;
-#ifndef UCLINUX
extern GSM_SpeedDial *CurrentSpeedDialEntry;
extern GSM_Error CurrentSpeedDialError;
-#endif /* UCLINUX */
extern unsigned char Current_IMEI[GSM_MAX_IMEI_LENGTH];
extern unsigned char Current_Revision[GSM_MAX_REVISION_LENGTH];
static GSM_Error N6110_GetMemoryLocation(GSM_PhonebookEntry *entry);
static GSM_Error N6110_WritePhonebookLocation(GSM_PhonebookEntry *entry);
-#ifndef UCLINUX
static GSM_Error N6110_GetSpeedDial(GSM_SpeedDial *entry);
static GSM_Error N6110_SetSpeedDial(GSM_SpeedDial *entry);
-#endif /* UCLINUX */
static GSM_Error N6110_GetMemoryStatus(GSM_MemoryStatus *Status);
#ifndef UCLINUX
static GSM_Error N6110_GetSMSCenter(GSM_MessageCenter *MessageCenter);
static GSM_Error N6110_SetSMSCenter(GSM_MessageCenter *MessageCenter);
+#endif /* UCLINUX */
static GSM_Error N6110_GetIMEI(char *imei);
static GSM_Error N6110_GetRevision(char *revision);
static GSM_Error N6110_GetModel(char *model);
-#endif /* UCLINUX */
static GSM_Error N6110_GetManufacturer(char *manufacturer);
#ifndef UCLINUX