annotate src/g23m-gsm/alr2/alr_mmi.c @ 303:f76436d19a7a default tip

!GPRS config: fix long-standing AT+COPS chance hanging bug There has been a long-standing bug in FreeCalypso going back years: sometimes in the AT command bring-up sequence of an ACI-only MS, the AT+COPS command would produce only a power scan followed by cessation of protocol stack activity (only L1 ADC traces), instead of the expected network search sequence. This behaviour was seen in different FC firmware versions going back to Citrine, and seemed to follow some law of chance, not reliably repeatable. This bug has been tracked down and found to be specific to !GPRS configuration, stemming from our TCS2/TCS3 hybrid and reconstruction of !GPRS support that was bitrotten in TCS3.2/LoCosto version. ACI module psa_mms.c, needed only for !GPRS, was missing in the TCS3 version and had to be pulled from TCS2 - but as it turns out, there is a new field in the MMR_REG_REQ primitive that needs to be set correctly, and that psa_mms.c module is the place where this initialization needed to be added.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 08:23:37 +0000
parents 3a14ee9a9843
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Project : GSM-PS
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | Modul : ALR_MMI
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 | All rights reserved.
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 |
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | Instruments Berlin, AG
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | Purpose : This Modul defines the functions for the SDL process
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 | MMI_Control of the TI++ functionality.
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 +-----------------------------------------------------------------------------
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 */
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #ifndef ALR_MMI_C
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #define ALR_MMI_C
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #define ENTITY_PL
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 /*==== INCLUDES ===================================================*/
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include <string.h>
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include <stdlib.h>
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include <ctype.h>
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "typedefs.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "pconst.cdg"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "mconst.cdg"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "message.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "ccdapi.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #include "vsi.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "custom.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #include "gsm.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #include "prim.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #include "cnf_alr.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #include "mon_alr.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #include "pei.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #include "tok.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #include "pcm.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #ifdef GPRS
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #include "alr_gprs.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #endif
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #include "alr.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #if defined TM_SPECIAL
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #include "gdi.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #include "audio.h"
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #endif
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 /*==== EXPORT =====================================================*/
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #if defined (WIN32)
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #define TRACING
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #endif
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 #if defined (TRACING)
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #define ALR_TRACE_MMI(a) ALR_TRACE(a)
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #else
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #define ALR_TRACE_MMI(a)
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #endif
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 /*==== PRIVAT =====================================================*/
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 /*==== FUNCTIONS ==================================================*/
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 /*
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 * -------------------------------------------------------------------
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 * PRIMITIVE Processing functions
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 * -------------------------------------------------------------------
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 */
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
3a14ee9a9843 src/g23m-gsm: same alr2 & alr3 structure as in Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #endif