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.c | 14 |
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 | |||
@@ -98,12 +98,13 @@ extern GSM_Error ATGEN_Reset (GSM_StateMachine *s, bool hard); | |||
98 | extern GSM_Error ATGEN_PressKey (GSM_StateMachine *s, GSM_KeyCode Key, bool Press); | 98 | extern GSM_Error ATGEN_PressKey (GSM_StateMachine *s, GSM_KeyCode Key, bool Press); |
99 | extern GSM_Error ATGEN_GetDisplayStatus (GSM_StateMachine *s, GSM_DisplayFeatures *features); | 99 | extern GSM_Error ATGEN_GetDisplayStatus (GSM_StateMachine *s, GSM_DisplayFeatures *features); |
100 | extern GSM_Error ATGEN_SetAutoNetworkLogin(GSM_StateMachine *s); | 100 | extern GSM_Error ATGEN_SetAutoNetworkLogin(GSM_StateMachine *s); |
101 | extern GSM_Error ATGEN_DeleteAllMemory (GSM_StateMachine *s, GSM_MemoryType type); | 101 | extern GSM_Error ATGEN_DeleteAllMemory (GSM_StateMachine *s, GSM_MemoryType type); |
102 | 102 | ||
103 | extern GSM_Error ATGEN_DispatchMessage (GSM_StateMachine *s); | 103 | extern GSM_Error ATGEN_DispatchMessage (GSM_StateMachine *s); |
104 | extern GSM_Error ATGEN_SetFastSMSSending(GSM_StateMachine *s, bool enable); | ||
104 | extern GSM_Error ATGEN_SetIncomingCB (GSM_StateMachine *s, bool enable); | 105 | extern GSM_Error ATGEN_SetIncomingCB (GSM_StateMachine *s, bool enable); |
105 | extern GSM_Error ATGEN_SetIncomingSMS (GSM_StateMachine *s, bool enable); | 106 | extern GSM_Error ATGEN_SetIncomingSMS (GSM_StateMachine *s, bool enable); |
106 | 107 | ||
107 | /** | 108 | /** |
108 | * Alcatel uses some 8-bit characters in contacts, calendar etc.. This table | 109 | * Alcatel uses some 8-bit characters in contacts, calendar etc.. This table |
109 | * attempts to decode it, it is probably not complete, here are just chars | 110 | * attempts to decode it, it is probably not complete, here are just chars |
@@ -541,12 +542,14 @@ static GSM_Error ALCATEL_SetATMode(GSM_StateMachine *s) | |||
541 | if (error != ERR_NONE) return error; | 542 | if (error != ERR_NONE) return error; |
542 | 543 | ||
543 | dbgprintf ("Changing protocol to AT\n"); | 544 | dbgprintf ("Changing protocol to AT\n"); |
544 | s->Protocol.Functions = &ATProtocol; | 545 | s->Protocol.Functions = &ATProtocol; |
545 | s->Phone.Functions->ReplyFunctions= ATGENReplyFunctions; | 546 | s->Phone.Functions->ReplyFunctions= ATGENReplyFunctions; |
546 | Priv->Mode = ModeAT; | 547 | Priv->Mode = ModeAT; |
548 | s->Phone.Data.Priv.ATGEN.PBKCharset= 0; | ||
549 | s->Phone.Data.Priv.ATGEN.PBKMemory= 0; | ||
547 | 550 | ||
548 | my_sleep(100); | 551 | my_sleep(100); |
549 | 552 | ||
550 | /* In case we don't send AT command short after closing binary mode, | 553 | /* In case we don't send AT command short after closing binary mode, |
551 | * phone takes VERY long to react next time. The error code in | 554 | * phone takes VERY long to react next time. The error code in |
552 | * intetionally ignored. | 555 | * intetionally ignored. |
@@ -3819,12 +3822,20 @@ static GSM_Error ALCATEL_SetIncomingSMS (GSM_StateMachine *s, bool enable) | |||
3819 | GSM_Error error; | 3822 | GSM_Error error; |
3820 | 3823 | ||
3821 | if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error; | 3824 | if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error; |
3822 | return ATGEN_SetIncomingSMS(s, enable); | 3825 | return ATGEN_SetIncomingSMS(s, enable); |
3823 | } | 3826 | } |
3824 | 3827 | ||
3828 | static GSM_Error ALCATEL_SetFastSMSSending(GSM_StateMachine *s, bool enable) | ||
3829 | { | ||
3830 | GSM_Error error; | ||
3831 | |||
3832 | if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error; | ||
3833 | return ATGEN_SetFastSMSSending(s, enable); | ||
3834 | } | ||
3835 | |||
3825 | static GSM_Reply_Function ALCATELReplyFunctions[] = { | 3836 | static GSM_Reply_Function ALCATELReplyFunctions[] = { |
3826 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelAttach }, | 3837 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelAttach }, |
3827 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelDetach }, | 3838 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelDetach }, |
3828 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelCommit }, | 3839 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelCommit }, |
3829 | {ALCATEL_ReplyCommit, "\x02",0x00,0x00, ID_AlcatelCommit2 }, | 3840 | {ALCATEL_ReplyCommit, "\x02",0x00,0x00, ID_AlcatelCommit2 }, |
3830 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelEnd }, | 3841 | {ALCATEL_ReplyGeneric, "\x02",0x00,0x00, ID_AlcatelEnd }, |
@@ -3910,12 +3921,13 @@ GSM_Phone_Functions ALCATELPhone = { | |||
3910 | ALCATEL_GetNextSMS, | 3921 | ALCATEL_GetNextSMS, |
3911 | NOTSUPPORTED, /* SetSMS */ | 3922 | NOTSUPPORTED, /* SetSMS */ |
3912 | ALCATEL_AddSMS, | 3923 | ALCATEL_AddSMS, |
3913 | ALCATEL_DeleteSMS, | 3924 | ALCATEL_DeleteSMS, |
3914 | ALCATEL_SendSMS, | 3925 | ALCATEL_SendSMS, |
3915 | ALCATEL_SendSavedSMS, | 3926 | ALCATEL_SendSavedSMS, |
3927 | ALCATEL_SetFastSMSSending, | ||
3916 | ALCATEL_SetIncomingSMS, | 3928 | ALCATEL_SetIncomingSMS, |
3917 | ALCATEL_SetIncomingCB, | 3929 | ALCATEL_SetIncomingCB, |
3918 | ALCATEL_GetSMSFolders, | 3930 | ALCATEL_GetSMSFolders, |
3919 | NOTSUPPORTED, /* AddSMSFolder */ | 3931 | NOTSUPPORTED, /* AddSMSFolder */ |
3920 | NOTSUPPORTED, /* DeleteSMSFolder */ | 3932 | NOTSUPPORTED, /* DeleteSMSFolder */ |
3921 | ALCATEL_DialVoice, | 3933 | ALCATEL_DialVoice, |
@@ -3964,13 +3976,13 @@ GSM_Phone_Functions ALCATELPhone = { | |||
3964 | ALCATEL_SetCalendar, | 3976 | ALCATEL_SetCalendar, |
3965 | ALCATEL_AddCalendar, | 3977 | ALCATEL_AddCalendar, |
3966 | ALCATEL_DeleteCalendar, | 3978 | ALCATEL_DeleteCalendar, |
3967 | ALCATEL_DeleteAllCalendar, | 3979 | ALCATEL_DeleteAllCalendar, |
3968 | NOTSUPPORTED, /* GetCalendarSettings*/ | 3980 | NOTSUPPORTED, /* GetCalendarSettings*/ |
3969 | NOTSUPPORTED, /* SetCalendarSettings*/ | 3981 | NOTSUPPORTED, /* SetCalendarSettings*/ |
3970 | NOTSUPPORTED, /* GetNote */ | 3982 | NOTSUPPORTED, /* GetNextNote */ |
3971 | NOTSUPPORTED, /* GetProfile */ | 3983 | NOTSUPPORTED, /* GetProfile */ |
3972 | NOTSUPPORTED, /* SetProfile */ | 3984 | NOTSUPPORTED, /* SetProfile */ |
3973 | NOTSUPPORTED, /* GetFMStation */ | 3985 | NOTSUPPORTED, /* GetFMStation */ |
3974 | NOTSUPPORTED, /* SetFMStation */ | 3986 | NOTSUPPORTED, /* SetFMStation */ |
3975 | NOTSUPPORTED, /* ClearFMStations */ | 3987 | NOTSUPPORTED, /* ClearFMStations */ |
3976 | NOTSUPPORTED, /* GetNextFileFolder*/ | 3988 | NOTSUPPORTED, /* GetNextFileFolder*/ |