annotate gsm-fw/g23m-aci/aci/ati_err.c @ 775:eedbf248bac0

gsm-fw/g23m-aci subtree: initial import from LoCosto source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 12 Oct 2014 01:45:14 +0000
parents
children 09382de17df9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
775
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 | Project : GSM-F&D (8411)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 | Modul : ATI
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 | All rights reserved.
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 | Instruments Berlin, AG
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 | Purpose : AT Command Interpreter: Error handling.
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 +-----------------------------------------------------------------------------
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 /*********************************/
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 /* General Error Handling in ACI */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 /*********************************/
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #ifndef ATI_ERR_C
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #define ATI_ERR_C
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 #undef DUMMY_ATI_STRINGS
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #include "aci_all.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "aci_cmh.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #include "ati_cmd.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "aci_io.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #include "aci_cmd.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 #include "l4_tim.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #include "aci.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "aci_mem.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #include "aci_lst.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #include "ati_int.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #ifdef FF_ATI_BAT
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #include "typedefs.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 #include "gdd.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 #include "bat.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 #include "ati_bat.h"
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #endif /*FF_ATI_BAT*/
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 LOCAL CHAR *AT_Fail_Error(void);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 EXTERN T_ACI_ERR_DESC aciErrDesc;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 LOCAL CHAR ErrBuff[MAX_CMD_LEN];
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 typedef struct
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 CHAR *msg;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 CHAR *nmb;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 AtErrCode code;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 } AtErrTable;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 LOCAL const AtErrTable tabAtError[]=
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 "OK", "0", atOk,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 "CONNECT", "1", atConnect,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 "RING", "2", atRing,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 "NO CARRIER", "3", atNoCarrier,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 "NO DIALTONE", "6", atNoDialtone,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 "BUSY", "7", atBusy,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 "NO ANSWER", "8", atNoAnswer,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 "CONNECT 9600","15", atConnect1,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 /* this has to be the last entry */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 "ERROR", "4", atError
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 GLOBAL CHAR *disable_or_numeric(const CHAR* key,LONG e) /* e is actually enum...*/
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 UBYTE srcId = srcId_cb;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 if(ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Disable)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 cmdAtError(atError);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 else if(ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Numeric)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 sprintf(cmdErrStr,"%s ERROR: %d",key,e);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 return cmdErrStr;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 | STATE : code ROUTINE : cmdExtError |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 PURPOSE : handle extended errors
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 LOCAL const struct T_ATI_EXT_ERR /* error code - error message mapping */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 const CHAR* msg; /* error message */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 const T_ACI_EXT_ERR code; /* error code */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 const ULONG displ_code; /* error code to be display */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 err[] =
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 "parameter not allowed", EXT_ERR_Parameter, EXT_ERR_Parameter,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 "data corrupted", EXT_ERR_DataCorrupt, EXT_ERR_DataCorrupt,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 "internal error", EXT_ERR_Internal, EXT_ERR_Internal,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 "call table full", EXT_ERR_CallTabFull, EXT_ERR_CallTabFull,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 "service table full", EXT_ERR_SrvTabFull, EXT_ERR_SrvTabFull,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 "call not found", EXT_ERR_CallNotFound, EXT_ERR_CallNotFound,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 "no data-call supported", EXT_ERR_NoDataCallSup, EXT_ERR_NoDataCallSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 "one call on hold", EXT_ERR_OneCallOnHold, EXT_ERR_OneCallOnHold,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 "hold call not supported for this type", EXT_ERR_CallTypeNoHold, EXT_ERR_CallTypeNoHold,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 "number not allowed by FDN", EXT_ERR_FdnCheck, EXT_ERR_FdnCheck,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 "number not allowed by BDN", EXT_ERR_BdnCheck, EXT_ERR_BdnCheck,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 "parallel USSD not supported", EXT_ERR_ParallelUSSD, EXT_ERR_ParallelUSSD,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 "fax minimum speed condition", EXT_ERR_FaxMinSpeedCond, EXT_ERR_FaxMinSpeedCond,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 "conflict with command details", EXT_ERR_CmdDetailsSAT, EXT_ERR_CmdDetailsSAT,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 "IMEI illegal", EXT_ERR_IMEICheck, EXT_ERR_IMEICheck,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 "not allowed by ALS-Lock", EXT_ERR_AlsLock, EXT_ERR_AlsLock,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 #ifdef REL99
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 "Last failed message not present", EXT_ERR_FailedMsgNotPresent,EXT_ERR_FailedMsgNotPresent,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 #endif
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 #if defined FF_EOTD
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 "Command not supported", EXT_ERR_LCS_CmdNotSup, 0,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 "Command not recognised/out of range", EXT_ERR_LCS_CmdNotRec, 1,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 "LCS Client ID not recognised/out of range", EXT_ERR_LCS_CLPSClientNotRec, 2,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 "Interval attribute out of range", EXT_ERR_LCS_IntervalNotSup, 3,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 "Repeat attribute not supported/ out of range", EXT_ERR_LCS_RepeatNotSup, 4,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 "Send request type not recognised / out of range", EXT_ERR_LCS_SendReqTyNotRec, 2,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 "User confirmation request type not recognised / out of range", EXT_ERR_LCS_UsConfReqTyNotRec, 3,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 "LCS Client ID not recognised/out of range", EXT_ERR_LCS_CLSRClientIdNotRec, 4,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 "Circuit switched call number out of range", EXT_ERR_LCS_CSCallNumNotSup, 5,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 #endif /* FF_EOTD */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 #ifdef SIM_PERS
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 "BlockedNetwork lock - PIN required", EXT_ERR_BlockedNetworkPersPinReq, EXT_ERR_BlockedNetworkPersPinReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149 "BlockedNetwork lock - PUK required", EXT_ERR_BlockedNetworkPersPukReq, EXT_ERR_BlockedNetworkPersPukReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 "Busy Error", EXT_ERR_Busy, EXT_ERR_Busy, /* Penalty timer is running */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 "MEPD not present", EXT_ERR_NoMEPD, EXT_ERR_NoMEPD, /* Penalty timer is running */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 #endif
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 "error unknown", EXT_ERR_Unknown, EXT_ERR_Unknown,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 /* this has to be the last entry */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 "other error", EXT_ERR_NotPresent, 0xFFFFFFFF
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 GLOBAL CHAR *cmdExtError (T_ACI_EXT_ERR e)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 SHORT idx=0;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 T_ACI_ERR_DESC aed;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 UBYTE srcId = srcId_cb;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 if ( e EQ EXT_ERR_NotPresent )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 if (((aed = qAT_ErrDesc()) >> 16) EQ ACI_ERR_CLASS_Ext)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 e = (T_ACI_EXT_ERR)(aed & 0xFFFF);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 e = EXT_ERR_Unknown;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 *ErrBuff = '\0';
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 cmdErrStr = ErrBuff;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 if (ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Verbose OR
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Numeric)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 /* search the array for the index of the notified failure */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 while ( err[idx].code NEQ EXT_ERR_NotPresent AND
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 err[idx].code NEQ e )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 idx++;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 else /* Catch some Extended Error Codes and map them to more suitable codes */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 switch (e)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 case EXT_ERR_CallTabFull:
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 case EXT_ERR_FdnCheck:
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 case EXT_ERR_BdnCheck:
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 return(cmdAtError(atNoCarrier));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 if (ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Verbose)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201 strcat(cmdErrStr,"+EXT ERROR: ");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 strcat( cmdErrStr, err[idx].msg );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 return(disable_or_numeric("+EXT", err[idx].displ_code));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 | STATE : code ROUTINE : cmdCmeError |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213 PURPOSE : handle Mobile Equipment Errors
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 #ifdef GPRS
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 #define GPRS_ERR(a,b) a,b,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 #else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 #define GPRS_ERR(a,b)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 #endif /* GPRS */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 LOCAL const struct T_ATI_CME_ERR /* error code - error message mapping */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 const CHAR* msg; /* error message */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 const T_ACI_CME_ERR code; /* error code */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 error[] =
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 "phone failure", CME_ERR_PhoneFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 "no connection to phone", CME_ERR_NoConnect,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 "phone-adaptor link reserved", CME_ERR_LinkRes,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 "operation not allowed", CME_ERR_OpNotAllow,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 "operation not supported", CME_ERR_OpNotSupp,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 "PH-SIM PIN required", CME_ERR_PhSimPinReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 "SIM not inserted", CME_ERR_SimNotIns,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 "SIM PIN required", CME_ERR_SimPinReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 "SIM PUK required", CME_ERR_SimPukReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 "SIM failure", CME_ERR_SimFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 "SIM busy", CME_ERR_SimBusy,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 "SIM wrong", CME_ERR_SimWrong,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 "incorrect password", CME_ERR_WrongPasswd,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 "SIM PIN2 required", CME_ERR_SimPin2Req,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 "SIM PUK2 required", CME_ERR_SimPuk2Req,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 "memory full", CME_ERR_MemFull,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 "invalid index", CME_ERR_InvIdx,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246 "not found", CME_ERR_NotFound,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247 "memory failure", CME_ERR_MemFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 "text string too long", CME_ERR_TxtToLong,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 "invalid characters in text string", CME_ERR_InvalidTxtChar,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 "dial string too long", CME_ERR_DialToLong,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 "invalid characters in dial string", CME_ERR_InvDialChar,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 "no network service", CME_ERR_NoServ,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 "network timeout", CME_ERR_Timeout,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 "network not allowed - emergency calls only", CME_ERR_LimServ,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 "Network lock - PIN required", CME_ERR_NetworkPersPinReq, /* PIN to change network personalisation required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 "Network lock - PUK required", CME_ERR_NetworkPersPukReq, /* network personalisation PUK is required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 "Subnetwork lock - PIN required", CME_ERR_NetworkSubsetPersPinReq, /* keycode to change nw subset personalisation required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 "Subnetwork lock - PUK required", CME_ERR_NetworkSubsetPersPukReq, /* network subset personalisation PUK is required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 "Provider lock - PIN required", CME_ERR_ProviderPersPinReq, /* keycode to change service provider personal. required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260 "Provider lock - PUK required", CME_ERR_ProviderPersPukReq, /* service provider personalisation PUK is required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 "Corporate lock - PIN required", CME_ERR_CorporatePersPinReq, /* keycode to change corporate personalisation required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 "Corporate lock - PUK required", CME_ERR_CorporatePersPukReq, /* corporate personalisation PUK is required */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 "unknown", CME_ERR_Unknown, /* ATTENTION! If you insert new entries before CME_ERR_Unknown, remember to increase NBR_CME_NORM_ERR */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 GPRS_ERR("illegal MS", CME_ERR_GPRSBadMs)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 GPRS_ERR("illegal ME", CME_ERR_GPRSBadMe)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 GPRS_ERR("GPRS service not allowed", CME_ERR_GPRSNoService)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 GPRS_ERR("PLMN not allowed", CME_ERR_GPRSBadPlmn)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 GPRS_ERR("Location not allowed", CME_ERR_GPRSBadLoc)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269 GPRS_ERR("Roaming not allowed in Location Area", CME_ERR_GPRSNoRoam)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 GPRS_ERR("GPRS service option not supported", CME_ERR_GPRSSerOptNsup)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 GPRS_ERR("requested service option not subscribed",CME_ERR_GPRSSerOptNsub)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 GPRS_ERR("service option temporarily out of order",CME_ERR_GPRSSerOptOOO)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 GPRS_ERR("unspecified GPRS error", CME_ERR_GPRSUnspec)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 GPRS_ERR("PDP authorisation error", CME_ERR_GPRSPdpAuth)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 GPRS_ERR("invalid module class", CME_ERR_GPRSBadModClass)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 "failed to abort", CME_ERR_FailedToAbort,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 "ACM reset needed", CME_ERR_AcmResetNeeded,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 "sim extension memory full", CME_ERR_SimNoExtAvail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279 "sim reset needed", CME_ERR_SimResetNeeded,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 "Aborted by Network", CME_ERR_AbortedByNetwork,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 /* this has to be the last entry */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 "other error", CME_ERR_NotPresent
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 GLOBAL CHAR *cmdCmeError (T_ACI_CME_ERR e)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287 SHORT idx=0;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 T_ACI_ERR_DESC aed;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 UBYTE srcId = srcId_cb;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 *ErrBuff = '\0'; /* initialization */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 cmdErrStr = ErrBuff;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 if ( e EQ CME_ERR_NotPresent )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 if (((aed = qAT_ErrDesc()) >> 16) EQ ACI_ERR_CLASS_Cme)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 e = (T_ACI_CME_ERR)(aed & 0xFFFF);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300 else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302 e = CME_ERR_Unknown;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 else if( e EQ CME_ERR_Unknown )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 return(AT_Fail_Error());
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 if (ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Verbose)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 strcat(cmdErrStr,"+CME ERROR: ");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 /* search for the description of the notified error */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 while ( error[idx].code NEQ CME_ERR_NotPresent AND
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316 error[idx].code NEQ e )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318 idx++;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 strcat( cmdErrStr, error[idx].msg );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 return(disable_or_numeric("+CME",e));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329 | STATE : code ROUTINE : cmdCmsError |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332 PURPOSE : handle Short Message Errors
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 LOCAL const struct T_ATI_CMS_ERR /* error code - error message mapping */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338 const CHAR* msg; /* error message */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 const T_ACI_CMS_ERR code; /* error code */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341 cms_err[] =
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 "unassigned (unallocated) number", CMS_ERR_UnAllocNum,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 "operator determined barring", CMS_ERR_OpDetermBarr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 "call barred", CMS_ERR_CallBarr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 "short message transfer rejected", CMS_ERR_TransReject,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 "destination out of service", CMS_ERR_DestOutOfServ,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 "unidentified subscriber", CMS_ERR_UnidentSubsc,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 "facility rejected", CMS_ERR_FacReject,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 "unknown subscriber", CMS_ERR_UnKnownSubsc,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 "network out of order", CMS_ERR_NetOutOfOrder,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
352 "temporary failure", CMS_ERR_TempFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
353 "congestion", CMS_ERR_Congestion,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354 "resources unavailable, unspecified", CMS_ERR_ResUnAvail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 "requested facility not subscribed", CMS_ERR_FacNotSubscr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 "requested facility not implemented", CMS_ERR_FacNotImpl,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 "invalid short message transfer ref. value", CMS_ERR_TransRefInval,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 "semantically incorrect message", CMS_ERR_InValSM,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359 "invalid mandatory information", CMS_ERR_InValManInfo,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360 "message type non-existent or not implemented", CMS_ERR_MsgTypNotExist,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 "message not compatible with SM protocol state", CMS_ERR_MsgNotCompatible,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362 "information element non-existent or not impl.", CMS_ERR_InfoElemNotImpl,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363 "protocol error, unspecified", CMS_ERR_ProtErr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 "interworking, unspecified", CMS_ERR_InterWrkUnSpec,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 "telematic interworking not supported", CMS_ERR_TlmtkNotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 "short message type 0 not supported", CMS_ERR_SM0NotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367 "cannot replace short message", CMS_ERR_CantReplceSM,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 "unspecified TP-PID error", CMS_ERR_UnSpecPIDErr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369 "data coding scheme (alphabet) not supported", CMS_ERR_DcsNotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 "message class not supported", CMS_ERR_MsgClassNotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 "unspecified TP-DCS error", CMS_ERR_UnSpecTpDcs,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 "command cannot be actioned", CMS_ERR_CmdNotAct,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373 "command unsupported", CMS_ERR_CmdUnSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
374 "unspecified TP-Command error", CMS_ERR_UnSpecTpCmd,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 "TPDU not supported", CMS_ERR_TpduUnSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 "SC busy", CMS_ERR_ScBsy,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 "no SC subscription", CMS_ERR_NoScSubsc,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 "SC system failure", CMS_ERR_ScSysFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 "invalid SME address", CMS_ERR_InValSme,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 "destination SME barred", CMS_ERR_DestSmeBarr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381 "SM rejected-duplicate SM", CMS_ERR_SmRejctDuplSm,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 "TP-VPF not supported", CMS_ERR_SmTPVPFNotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383 "TP-VP not supported", CMS_ERR_SmTPVPNotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384 "SIM SMS storage full", CMS_ERR_SimSmsStorFull,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 "no SMS storage capability in SIM", CMS_ERR_NoStorInSim,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 "error in MS", CMS_ERR_ErrInMs,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387 "memory capacity exceeded", CMS_ERR_MemCabExcee,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 "unspecified error cause", CMS_ERR_UnSpecErr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 "ME failure", CMS_ERR_MeFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 "SMS service of ME reserved", CMS_ERR_ServRes,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 "operation not allowed", CMS_ERR_OpNotAllowed,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 "operation not supported", CMS_ERR_OpNotSup,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 "invalid PDU mode parameter", CMS_ERR_InValPduMod,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394 "invalid text mode parameter", CMS_ERR_InValTxtMod,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
395 "SIM not inserted", CMS_ERR_SimNotIns,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 "SIM PIN required", CMS_ERR_SimPinReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 "PH-SIM PIN required", CMS_ERR_PhSimPinReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 "SIM failure", CMS_ERR_SimFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 "SIM busy", CMS_ERR_SimBsy,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 "SIM wrong", CMS_ERR_SimWrong,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 "SIM PUK required", CMS_ERR_SimPukReq,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 "SIM PIN2 required", CMS_ERR_SimPin2Req,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 "SIM PUK2 required", CMS_ERR_SimPuk2Req,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 "memory failure", CMS_ERR_MemFail,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 "invalid memory index", CMS_ERR_InValMemIdx,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 "memory full", CMS_ERR_MemFull,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 "SMSC address unknown", CMS_ERR_SmscAdrUnKnown,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408 "no network service", CMS_ERR_NoNetServ,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 "network timeout", CMS_ERR_NetTimeOut,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 "no +CNMA acknowledegment expected", CMS_ERR_NoCnmaAckExpect,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 "unknown error", CMS_ERR_UnknownErr,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412 "failed to abort", CMS_ERR_FailedToAbort,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413 /* this must be the last entry */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 "other error", CMS_ERR_NotPresent
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417 #define NBR_CMS_ERR 69
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 #define MAX_CMS_LTH 60
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 GLOBAL char* cmdCmsError ( T_ACI_CMS_ERR e )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 int i = 0;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 T_ACI_ERR_DESC aed;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 UBYTE srcId = srcId_cb;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426 if ( e EQ CMS_ERR_NotPresent )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 if (((aed = qAT_ErrDesc()) >> 16) EQ ACI_ERR_CLASS_Cms)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 e = (T_ACI_CMS_ERR)(aed & 0xFFFF);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 else /* no SMS error code */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 e = CMS_ERR_UnknownErr;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
439 *ErrBuff = '\0'; /* build message */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440 cmdErrStr = ErrBuff;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 if ( ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Verbose )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 strcat( cmdErrStr, "+CMS ERROR: " );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 while ( cms_err[i].code NEQ CMS_ERR_NotPresent AND
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447 cms_err[i].code NEQ e )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449 i++;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 strcat( cmdErrStr, cms_err[i].msg );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 else if ( ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Disable )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
454 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455 strcat ( cmdErrStr, "ERROR" );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 else if ( ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Numeric )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 sprintf ( cmdErrStr, "+CMS ERROR: %d", e );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 return cmdErrStr;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 | STATE : code ROUTINE : atPlusCEER |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
472 PURPOSE : Extented error report
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 typedef struct
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
476 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
477 char * desc;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478 T_ACI_CEER rpt;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 } CEER_TABLE;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 /* Defined by standards CEER cause description table */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 const CEER_TABLE StdCEERDesc[]=
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 {"unassigned number", CEER_Unassign },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485 {"no route to destination", CEER_NoRoute },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 {"channel unacceptable", CEER_ChanUnaccept },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 {"operator determined barring", CEER_Barred },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488 {"normal call clearing", CEER_CallClear },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 {"user busy", CEER_UserBusy },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490 {"no user responding", CEER_NoResponse },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 {"user alerting, no answer", CEER_AlertNoAnswer },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 {"call rejected", CEER_CallReject },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493 {"number changed", CEER_NumChanged },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 {"non selected user clearing", CEER_UserClear },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 {"destination out of order", CEER_DestOutOfOrder },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 {"invalid number format", CEER_NumFormat },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 {"facility rejected", CEER_FacilityReject },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
498 {"response to status enquiry", CEER_StatusEnquiry },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
499 {"normal, unspecified", CEER_Unspecified },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500 {"no channel available", CEER_NoChanAvail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
501 {"network out of order", CEER_NetworkOutOfOrder },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502 {"temporary failure", CEER_TempFailure },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 {"switching equipment congestion", CEER_SwitchCongest },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 {"access information discarded", CEER_InfoDiscard },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 {"requested channel unavailable", CEER_ReqChanUnavail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
506 {"recources unavailable", CEER_ResourceUnavail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507 {"quality of service unavailable", CEER_QOS_Unavail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 {"requested facility unsubscribed", CEER_FAC_Unsubscr },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509 {"incoming calls barred within CUG", CEER_BarredInCUG },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 {"bearer capability not authorized", CEER_BearerCapNotAuth },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
511 {"bearer capability not available", CEER_BearerCapUnavail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
512 {"service not available", CEER_ServUnavail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513 {"bearer service not implemented", CEER_BearerNotImpl },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 {"ACM reached ACM maximum", CEER_ACM_Max },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 {"facility not implemented", CEER_FAC_NotImpl },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516 {"only restricted bearer cap. avail.", CEER_RestrictBearerCap },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 {"service not implemented", CEER_ServNotImpl },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 {"invalid TI", CEER_InvalidTI },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 {"no member of CUG", CEER_UserNotInCUG },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
520 {"incompatible destination", CEER_IncompatDest },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 {"invalid transit network selection", CEER_InvalidTransNet },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 {"incorrect message", CEER_IncorrMsg },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 {"invalid mandatory information", CEER_InvalidMandInfo },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 {"message type not implemented", CEER_MsgTypeNotImpl },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 {"message type incompatible", CEER_MsgTypeIncomp },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 {"info element not implemented", CEER_InfoElemNotImpl },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 {"conditional info element error", CEER_CondInfoElem },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528 {"message incompatible", CEER_MsgIncomp },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 {"recovery on time expiry", CEER_Timer },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 {"protocol error", CEER_Protocol },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 {"interworking error", CEER_Interworking },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 {"bearer service not available", CEER_ReqBearerServNotAvail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 {"no TI available", CEER_NoTransIdAvail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534 {"timer 303 expiry", CEER_Timer303 },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 {"establishment failure", CEER_EstabFail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 {"no error", CEER_NoError },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537 {"operation failed", CEER_Failed },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 {"timeout", CEER_Timeout },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 {"bearer service not compatible", CEER_BearerServNotCompat },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 #ifdef GPRS
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 {"unsuccessful GPRS attach", CEER_FailedGPRSAttach },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 {"unsuccessful PDP context activation",CEER_FailedGPRSContextAct },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 {"GPRS detach", CEER_GPRSDetach },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 {"GPRS PDP context deactivation", CEER_GPRSDeactivation },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 #endif /* GPRS */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 /* these have to be the last entries */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547 {"no error", CEER_NotPresent },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 /* last entry for at+ceer */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 { NULL, CEER_NotPresent}
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 /* Proprietary ACI CEER cause description table */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 const CEER_TABLE pACI_CEERDesc[]=
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555 {"ACM reached ACM maximum", (T_ACI_CEER)P_CEER_ACMMaxReachedOrExceeded },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 {"number not in FDN list", (T_ACI_CEER) P_CEER_InvalidFDN },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 /* these have to be the last entries */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 {"no error", CEER_NotPresent },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 /* last entry for at+ceer */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 { NULL, CEER_NotPresent}
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 /* Proprietary MM CEER cause description table */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564 const CEER_TABLE pMM_CEERDesc[]=
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 {"IMSI not present in HLR", (T_ACI_CEER)P_MM_CEER_IMSINotInHLR},
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 {"no service", (T_ACI_CEER)P_MM_CEER_NoService },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 /* these have to be the last entries */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569 {"no error", CEER_NotPresent },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 /* last entry for at+ceer */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571 { NULL, CEER_NotPresent}
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
572 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 /* Proprietary SS CEER cause description table */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 const CEER_TABLE pSS_CEERDesc[]=
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 {"Unknown Subscriber", (T_ACI_CEER)P_SS_CEER_UnknownSubscriber },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
578 {"Illegal Subscriber", (T_ACI_CEER)P_SS_CEER_IllegalSubscriber },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
579 {"Bearer service not provisioned", (T_ACI_CEER)P_SS_CEER_BearerSvcNotProv },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 {"Teleservice not provisioned", (T_ACI_CEER)P_SS_CEER_TeleSvcNotProv },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 {"Illegal Equipment", (T_ACI_CEER)P_SS_CEER_IllegalEquipment },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
582 {"Call barred", (T_ACI_CEER)P_SS_CEER_CallBarred },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 {"Illegal supplementary service operation", (T_ACI_CEER)P_SS_CEER_IllegalSSOperation },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 {"SS error status", (T_ACI_CEER)P_SS_CEER_SSerrStatus },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585 {"SS not available", (T_ACI_CEER)P_SS_CEER_SSNotAvail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586 {"SS subscript violation", (T_ACI_CEER)P_SS_CEER_SSSubsViolation },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 {"SS incompatible", (T_ACI_CEER)P_SS_CEER_SSIncomp },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 {"Facility not supported", (T_ACI_CEER)P_SS_CEER_FacNotSupported },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589 {"Absent subscriber", (T_ACI_CEER)P_SS_CEER_AbsentSubs },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
590 {"System failure", (T_ACI_CEER)P_SS_CEER_SystenFail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 {"Data Missing", (T_ACI_CEER)P_SS_CEER_DataMissing },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
592 {"Unexpected Data Value", (T_ACI_CEER)P_SS_CEER_UnexpectData },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
593 {"Password registration failure", (T_ACI_CEER)P_SS_CEER_PwdRegFail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
594 {"Negative password check", (T_ACI_CEER)P_SS_CEER_NegPwdCheck},
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
595 {"Number of password attempts violation", (T_ACI_CEER)P_SS_CEER_NumPwdViolation },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
596 {"Unknown alphabet", (T_ACI_CEER)P_SS_CEER_UnknownAlpha },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
597 {"Unstructured supplementary service data busy", (T_ACI_CEER)P_SS_CEER_UssdBusy },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
598 {"Number of multiparty participants exceeded", (T_ACI_CEER)P_SS_CEER_MaxNumMptyExceed },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
599 {"Resource not available", (T_ACI_CEER)P_SS_CEER_ResourceNotAvail },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
600
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
601 /* these have to be the last entries */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 {"no error", CEER_NotPresent },
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
603 /* last entry for at+ceer */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
604 { NULL, CEER_NotPresent}
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 };
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
606 #define MAX_CEER_DESC_LTH (50)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
607 #define MAX_CEER_VAL_LTH (11)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
608
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
609 GLOBAL void getCeerDesc(USHORT cause, char *desc)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
610 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 SHORT idx;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
612 int val;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
613
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
614 TRACE_FUNCTION("getCeerDesc()");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
615
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
616 memset(desc,0,MAX_CEER_DESC_LTH);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
617
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 if ( GET_CAUSE_DEFBY(cause) EQ DEFBY_STD )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
620 TRACE_EVENT_P1("Cause: %d, defined by standard", cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
621 val = GET_CAUSE_VALUE(cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
622
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623 if ( val EQ NOT_PRESENT_8BIT )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
624 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
625 val = CEER_NotPresent;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
627 TRACE_EVENT("Get desc from Standard CEER desc table");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 for( idx = 0; StdCEERDesc[idx].desc NEQ NULL; idx++ )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
629 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
630 if ( StdCEERDesc[idx].rpt EQ val )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
631 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
632 memcpy(desc, StdCEERDesc[idx].desc, strlen(StdCEERDesc[idx].desc) );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
633 return;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
635 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
636 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
638 if ( GET_CAUSE_DEFBY(cause) EQ DEFBY_CONDAT )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
639 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
640 if ( GET_CAUSE_ORIGIN_ENTITY(cause) EQ MNCC_ACI_ORIGINATING_ENTITY )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
641 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
642 TRACE_EVENT_P1("Cause: %d, is ACI proprietary", cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
643 val = GET_CAUSE_VALUE(cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
644
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
645 if ( val EQ NOT_PRESENT_8BIT )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
647 val = P_CEER_NotPresent;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
649 TRACE_EVENT("Get desc from proprietary ACI CEER desc table");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
650 for( idx = 0; pACI_CEERDesc[idx].desc NEQ NULL; idx++ )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 if ( pACI_CEERDesc[idx].rpt EQ val )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 memcpy(desc, pACI_CEERDesc[idx].desc, strlen(pACI_CEERDesc[idx].desc) );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 return;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
656 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
659 else if ( GET_CAUSE_ORIGIN_ENTITY(cause) EQ MM_ORIGINATING_ENTITY )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
661 TRACE_EVENT_P1("Cause: %d, is MM proprietary", cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 val = GET_CAUSE_VALUE(cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
663
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
664 if ( val EQ NOT_PRESENT_8BIT )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
665 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
666 val = P_MM_CEER_NotPresent;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
667 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668 TRACE_EVENT("Get desc from proprietary MM CEER desc table");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
669 for( idx = 0; pMM_CEERDesc[idx].desc NEQ NULL; idx++ )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
670 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
671 if ( pMM_CEERDesc[idx].rpt EQ val )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
672 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
673 memcpy(desc, pMM_CEERDesc[idx].desc, strlen(pMM_CEERDesc[idx].desc) );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674 return;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
677 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678 else if ( GET_CAUSE_ORIGIN_ENTITY(cause) EQ SS_ORIGINATING_ENTITY )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
679 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 TRACE_EVENT_P1("Cause: %d, is SS proprietary", cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
681 val = GET_CAUSE_VALUE(cause);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
682
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 if ( val EQ NOT_PRESENT_8BIT )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
684 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
685 val = P_SS_CEER_NotPresent;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
686 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
687 TRACE_EVENT("Get desc from proprietary SS CEER desc table");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
688 for( idx = 0; pSS_CEERDesc[idx].desc NEQ NULL; idx++ )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
689 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
690 if ( pSS_CEERDesc[idx].rpt EQ val )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
691 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
692 memcpy(desc, pSS_CEERDesc[idx].desc, strlen(pSS_CEERDesc[idx].desc) );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
693 return;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
694 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
695 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
696 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
697 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
698 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
699
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
700
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
701 GLOBAL T_ATI_RSLT atPlusCEER(char *cl, UBYTE srcId)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
702 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
703 TRACE_FUNCTION("atPlusCEER()");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
704
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
705 #ifdef FF_ATI_BAT
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
706 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
707 T_BAT_cmd_send cmd;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
708 T_BAT_no_parameter dummy;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
709
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
710 cmd.ctrl_params=BAT_CMD_SET_PLUS_CEER;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
711 dummy.bat_dummy = 0xFF;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
712 cmd.params.ptr_set_plus_ceer = &dummy;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
713 bat_send(ati_bat_get_client(srcId), &cmd);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
714 return(ATI_EXCT);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
715 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
716 #else /* no FF_ATI_BAT */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
717 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 char desc[MAX_CEER_DESC_LTH];
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
719 T_ACI_RETURN ret;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
720 USHORT cause;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
721
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
722 ret=qAT_PlusCEER( (T_ACI_CMD_SRC)srcId, &cause );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
723 if (ret EQ AT_CMPL)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
724 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
725 /* check if description text is available*/
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
726 getCeerDesc(cause, desc);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
727
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
728 if ( desc[0] EQ 0 )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
729 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
730 /* no description text is available */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
731 sprintf( g_sa, "+CEER: %d,%d,%d,%d",
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
732 GET_CAUSE_DEFBY(cause), GET_CAUSE_ORIGSIDE(cause),
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
733 GET_CAUSE_ORIGIN_ENTITY(cause), GET_CAUSE_VALUE(cause));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
734 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
735 else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
736 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
737 /* description text is available */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
738 sprintf( g_sa, "+CEER: %d,%d,%d,%d,%s",
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
739 GET_CAUSE_DEFBY(cause), GET_CAUSE_ORIGSIDE(cause),
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
740 GET_CAUSE_ORIGIN_ENTITY(cause), GET_CAUSE_VALUE(cause),
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
741 desc );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
742 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
743 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
744 return ATI_CMPL;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
745 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
746 else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
747 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
748 cmdAtError(atError);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
749 return ATI_FAIL;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
750 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
751 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
752 #endif /* no FF_ATI_BAT */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
753 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
754
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
755 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
756 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
757 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
758 | STATE : code ROUTINE : atPercentCSSD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
759 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
760
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
761 PURPOSE : Supplementary Service Diagnostic
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
762 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
763
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
764 GLOBAL T_ATI_RSLT atPercentCSSD(char *cl, UBYTE srcId)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
765 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
766 T_ACI_RETURN ret;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
767 UBYTE ss_diag;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
768 CHAR *me = "%CSSD: ";
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
769
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
770 TRACE_FUNCTION("atPercentCSSD()");
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
771
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
772 ret = qAT_PercentCSSD( (T_ACI_CMD_SRC)srcId, &ss_diag);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
773
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
774 if (ret EQ AT_CMPL)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
775 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
776 sprintf( g_sa, "%s%d", me, ss_diag );
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
777 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
778 return ATI_CMPL;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
779 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
780 else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
781 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
782 cmdAtError(atError);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
783 return ATI_FAIL;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
784 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
785
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
786 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
787
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
788 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
789 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
790 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
791 | STATE : code ROUTINE : cmdCeerError |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
792 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
793
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
794 PURPOSE : handle CEER Errors
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
795
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
796 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
797
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
798 GLOBAL CHAR *cmdCeerError(USHORT cause)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
799 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
800 T_ACI_ERR_DESC aed;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
801 char desc[MAX_CEER_DESC_LTH];
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
802 UBYTE srcId = srcId_cb;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
803
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
804 *ErrBuff = '\0'; /* build message */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
805 cmdErrStr = ErrBuff;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
806
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
807 if ( GET_CAUSE_VALUE(cause) EQ NOT_PRESENT_8BIT )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
808 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
809 if (((aed = qAT_ErrDesc()) >> 16) EQ ACI_ERR_CLASS_Ceer)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
810 cause = (T_ACI_CEER)(aed & 0xFFFF);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
811 else
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
812 cause = CAUSE_MAKE(DEFBY_STD, ORIGSIDE_MS, MNCC_ACI_ORIGINATING_ENTITY,
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
813 CEER_NoError);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
814 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
815 if (ati_user_output_cfg[srcId].CMEE_stat EQ CMEE_MOD_Verbose)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
816 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
817 sprintf(cmdErrStr, "+CEER ERROR: %d,%d,%d,%d,",
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
818 GET_CAUSE_DEFBY(cause), GET_CAUSE_ORIGSIDE(cause),
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
819 GET_CAUSE_ORIGIN_ENTITY(cause), GET_CAUSE_VALUE(cause));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
820
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
821 getCeerDesc(cause, desc);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
822
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
823 if ( desc[0] NEQ 0 )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
824 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
825 strcat( cmdErrStr, desc);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
826 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
827
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
828 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
829 return(disable_or_numeric("+CEER",cause));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
830 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
831
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
832 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
833 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
834 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
835 | STATE : code ROUTINE : cmdAtError |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
836 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
837
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
838 PURPOSE : handle standard AT Errors
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
839
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
840 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
841
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
842 GLOBAL CHAR *cmdAtError (AtErrCode e)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
843 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
844 SHORT idx=0;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
845
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
846 *ErrBuff = '\0';
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
847 cmdErrStr = ErrBuff;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
848
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
849 /* search for the description of the notified error */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
850 while ( tabAtError[idx].code NEQ atError AND
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
851 tabAtError[idx].code NEQ e )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
852 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
853 idx++;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
854 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
855 sprintf(cmdErrStr,(at.s1415.atV) ? tabAtError[idx].msg : tabAtError[idx].nmb);
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
856 return cmdErrStr;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
857 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
858
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
859 /*
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
860 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
861 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
862 | STATE : code ROUTINE : AT_FailError |
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
863 +--------------------------------------------------------------------+
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
864
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
865 PURPOSE : General handling of errors (either CME CMS CEER or EXT errors)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
866 when function returns AT_FAIL
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
867
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
868 */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
869 #define ACI_GET_ERR_CLASS() ((aciErrDesc & 0xFFFF0000) >> 16)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
870 #define ACI_GET_ERR_VALUE() (aciErrDesc & 0x0000FFFF)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
871 #define ACI_RESET_ERR_DESC() (aciErrDesc = 0xFFFFFFFF)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
872 #define ACI_VALID_ERR_DESC() (aciErrDesc NEQ 0xFFFFFFFF)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
873
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
874 LOCAL CHAR *AT_Fail_Error(void)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
875 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
876 T_ACI_ERR_CLASS err_class;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
877
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
878 if ( ACI_VALID_ERR_DESC() )
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
879 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
880 err_class = (T_ACI_ERR_CLASS)ACI_GET_ERR_CLASS();
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
881 switch(err_class)
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
882 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
883 case(ACI_ERR_CLASS_NotPresent):
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
884 break;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
885 case(ACI_ERR_CLASS_Cme):
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
886 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
887 T_ACI_CME_ERR l_err;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
888
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
889 l_err = (T_ACI_CME_ERR)ACI_GET_ERR_VALUE();
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
890 ACI_RESET_ERR_DESC(); /* needs to be reinitialized */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
891 return(cmdCmeError (l_err));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
892 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
893 case(ACI_ERR_CLASS_Cms):
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
894 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
895 T_ACI_CMS_ERR l_err;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
896
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
897 l_err = (T_ACI_CMS_ERR)ACI_GET_ERR_VALUE();
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
898 ACI_RESET_ERR_DESC(); /* needs to be reinitialized */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
899 return(cmdCmsError (l_err));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
900 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
901 case(ACI_ERR_CLASS_Ceer):
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
902 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
903 T_ACI_CEER l_err;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
904
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
905 l_err = (T_ACI_CEER)ACI_GET_ERR_VALUE();
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
906 ACI_RESET_ERR_DESC(); /* needs to be reinitialized */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
907 /* return(cmdCeerError((USHORT)err)); */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
908 return(cmdCeerError(l_err));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
909 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
910 case(ACI_ERR_CLASS_Ext):
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
911 {
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
912 T_ACI_EXT_ERR l_err;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
913
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
914 l_err = (T_ACI_EXT_ERR)ACI_GET_ERR_VALUE();
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
915 ACI_RESET_ERR_DESC(); /* needs to be reinitialized */
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
916 return(cmdExtError (l_err));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
917 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
918 default:
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
919 break;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
920 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
921 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
922 *ErrBuff = '\0';
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
923 cmdErrStr = ErrBuff;
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
924
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
925 return (cmdCmeError(CME_ERR_NotPresent));
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
926 }
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
927
eedbf248bac0 gsm-fw/g23m-aci subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
928 #endif /* ATI_ERR_C */