comparison src/g23m-aci/aci/psa_mms.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 fa8dc04885d8
children
comparison
equal deleted inserted replaced
302:d32ac4edb634 303:f76436d19a7a
111 else 111 else
112 { 112 {
113 mmr_reg_req->service_mode = SERVICE_MODE_FULL; 113 mmr_reg_req->service_mode = SERVICE_MODE_FULL;
114 } 114 }
115 115
116 116 /*
117 * FreeCalypso TCS2/TCS3 hybrid: this C module was taken from TCS211,
118 * but the new TCS3 version of mmreg SAP has a new field in MMR_REG_REQ
119 * primitive that needs to be set. The new field is bootup_act, it needs
120 * to be set to NORMAL_REG for classic TCS2-like operation of this SAP,
121 * and failure to set it results in uninitialized memory garbage being
122 * passed to MM, producing law-of-chance Heisenbug behaviour.
123 */
124 mmr_reg_req->bootup_act = NORMAL_REG;
117 125
118 PSENDX (MM, mmr_reg_req); 126 PSENDX (MM, mmr_reg_req);
119 } 127 }
120 128
121 frstFlg = FALSE; 129 frstFlg = FALSE;
193 #endif /*FF_DUAL_SIM*/ 201 #endif /*FF_DUAL_SIM*/
194 ) 202 )
195 { 203 {
196 PALLOC (mmr_reg_req, MMR_REG_REQ); 204 PALLOC (mmr_reg_req, MMR_REG_REQ);
197 mmr_reg_req->service_mode = SERVICE_MODE_FULL; 205 mmr_reg_req->service_mode = SERVICE_MODE_FULL;
206 mmr_reg_req->bootup_act = NORMAL_REG;
198 PSENDX (MM, mmr_reg_req); 207 PSENDX (MM, mmr_reg_req);
199 frstFlg = FALSE; 208 frstFlg = FALSE;
200 } 209 }
201 else 210 else
202 { 211 {