summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/phone/alcatel/alcatel.c
Side-by-side diff
Diffstat (limited to 'gammu/emb/common/phone/alcatel/alcatel.c') (more/less context) (show whitespace changes)
-rw-r--r--gammu/emb/common/phone/alcatel/alcatel.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gammu/emb/common/phone/alcatel/alcatel.c b/gammu/emb/common/phone/alcatel/alcatel.c
index f004ad4..3821f13 100644
--- a/gammu/emb/common/phone/alcatel/alcatel.c
+++ b/gammu/emb/common/phone/alcatel/alcatel.c
@@ -92,24 +92,25 @@ extern GSM_Error ATGEN_GetSecurityStatus (GSM_StateMachine *s, GSM_SecurityCodeT
extern GSM_Error ATGEN_ResetPhoneSettings (GSM_StateMachine *s, GSM_ResetSettingsType Type);
extern GSM_Error ATGEN_SendDTMF (GSM_StateMachine *s, char *sequence);
extern GSM_Error ATGEN_GetSIMIMSI (GSM_StateMachine *s, char *IMSI);
extern GSM_Error ATGEN_HandleCMSError (GSM_StateMachine *s);
extern GSM_Error ATGEN_GetNetworkInfo (GSM_StateMachine *s, GSM_NetworkInfo *netinfo);
extern GSM_Error ATGEN_Reset (GSM_StateMachine *s, bool hard);
extern GSM_Error ATGEN_PressKey (GSM_StateMachine *s, GSM_KeyCode Key, bool Press);
extern GSM_Error ATGEN_GetDisplayStatus (GSM_StateMachine *s, GSM_DisplayFeatures *features);
extern GSM_Error ATGEN_SetAutoNetworkLogin (GSM_StateMachine *s);
extern GSM_Error ATGEN_DeleteAllMemory (GSM_StateMachine *s, GSM_MemoryType type);
extern GSM_Error ATGEN_DispatchMessage (GSM_StateMachine *s);
+extern GSM_Error ATGEN_SetFastSMSSending (GSM_StateMachine *s, bool enable);
extern GSM_Error ATGEN_SetIncomingCB (GSM_StateMachine *s, bool enable);
extern GSM_Error ATGEN_SetIncomingSMS (GSM_StateMachine *s, bool enable);
/**
* Alcatel uses some 8-bit characters in contacts, calendar etc.. This table
* attempts to decode it, it is probably not complete, here are just chars
* that I found...
*/
unsigned char GSM_AlcatelAlphabet[] =
{
/* in phone unicode description */
0x80, 0x00,0x20, /* empty */
@@ -535,24 +536,26 @@ static GSM_Error ALCATEL_SetATMode(GSM_StateMachine *s)
if (Priv->Mode == ModeAT) return ERR_NONE;
error = ALCATEL_GoToBinaryState(s, StateAttached, 0, 0);
if (error != ERR_NONE) return error;
error = s->Protocol.Functions->Terminate(s);
if (error != ERR_NONE) return error;
dbgprintf ("Changing protocol to AT\n");
s->Protocol.Functions = &ATProtocol;
s->Phone.Functions->ReplyFunctions = ATGENReplyFunctions;
Priv->Mode = ModeAT;
+ s->Phone.Data.Priv.ATGEN.PBKCharset = 0;
+ s->Phone.Data.Priv.ATGEN.PBKMemory = 0;
my_sleep(100);
/* In case we don't send AT command short after closing binary mode,
* phone takes VERY long to react next time. The error code in
* intetionally ignored.
*/
GSM_WaitFor (s, "AT\r", 3, 0x00, 0, ID_IncomingFrame);
return ERR_NONE;
}
@@ -3813,24 +3816,32 @@ static GSM_Error ALCATEL_SetIncomingCB (GSM_StateMachine *s, bool enable)
if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error;
return ATGEN_SetIncomingCB(s, enable);
}
static GSM_Error ALCATEL_SetIncomingSMS (GSM_StateMachine *s, bool enable)
{
GSM_Error error;
if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error;
return ATGEN_SetIncomingSMS(s, enable);
}
+static GSM_Error ALCATEL_SetFastSMSSending(GSM_StateMachine *s, bool enable)
+{
+ GSM_Error error;
+
+ if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error;
+ return ATGEN_SetFastSMSSending(s, enable);
+}
+
static GSM_Reply_Function ALCATELReplyFunctions[] = {
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelAttach },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelDetach },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelCommit },
{ALCATEL_ReplyCommit, "\x02",0x00,0x00, ID_AlcatelCommit2 },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelEnd },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelClose },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelStart },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelSelect1 },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelSelect2 },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelSelect3 },
{ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelBegin1 },
@@ -3904,24 +3915,25 @@ GSM_Phone_Functions ALCATELPhone = {
NOTSUPPORTED, /* GetSpeedDial */
NOTSUPPORTED, /* SetSpeedDial */
ALCATEL_GetSMSC,
ALCATEL_SetSMSC,
ALCATEL_GetSMSStatus,
ALCATEL_GetSMS,
ALCATEL_GetNextSMS,
NOTSUPPORTED, /* SetSMS */
ALCATEL_AddSMS,
ALCATEL_DeleteSMS,
ALCATEL_SendSMS,
ALCATEL_SendSavedSMS,
+ ALCATEL_SetFastSMSSending,
ALCATEL_SetIncomingSMS,
ALCATEL_SetIncomingCB,
ALCATEL_GetSMSFolders,
NOTSUPPORTED, /* AddSMSFolder */
NOTSUPPORTED, /* DeleteSMSFolder */
ALCATEL_DialVoice,
ALCATEL_AnswerCall,
ALCATEL_CancelCall,
NOTSUPPORTED, /* HoldCall */
NOTSUPPORTED, /* UnholdCall */
NOTSUPPORTED, /* ConferenceCall */
NOTSUPPORTED, /* SplitCall */
@@ -3958,25 +3970,25 @@ GSM_Phone_Functions ALCATELPhone = {
ALCATEL_AddToDo,
ALCATEL_DeleteToDo,
ALCATEL_DeleteAllToDo,
ALCATEL_GetCalendarStatus,
ALCATEL_GetCalendar,
ALCATEL_GetNextCalendar,
ALCATEL_SetCalendar,
ALCATEL_AddCalendar,
ALCATEL_DeleteCalendar,
ALCATEL_DeleteAllCalendar,
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
NOTSUPPORTED, /* GetProfile */
NOTSUPPORTED, /* SetProfile */
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
NOTSUPPORTED, /* ClearFMStations */
NOTSUPPORTED, /* GetNextFileFolder */
NOTSUPPORTED, /* GetFilePart */
NOTSUPPORTED, /* AddFilePart */
NOTSUPPORTED, /* GetFileSystemStatus */
NOTSUPPORTED, /* DeleteFile */
NOTSUPPORTED, /* AddFolder */
NOTSUPPORTED, /* GetGPRSAccessPoint */