4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #ifndef __TYPE_SIM_H__
22 #define __TYPE_SIM_H__
28 #define SIM_ICCID_LEN_MAX 20 // 3gpp
29 #define SIM_LANG_CNT_MAX 30 //telephony defined
30 #define SIM_SST_LEN_MAX 20 //telephony defined
31 #define SIM_SST_SERVICE_CNT_MAX 56 //3gpp
32 #define SIM_UST_BYTE_LEN_MAX 8 //telephony defined
33 #define SIM_SPN_LEN_MAX 16 //3gpp
34 #define SIM_SPDI_PLMN_MAX 41 //telephony defined
35 #define SIM_XDN_ALPHA_ID_LEN_MAX 30 //telephony defined
36 #define SIM_XDN_NUMBER_LEN_MAX 20 //telephony defined
37 #define SIM_ECC_BYTE_LEN_MAX 3 //3gpp
38 #define SIM_ECC_STRING_LEN_MAX 50 //telephony defined
39 #define SIM_ECC_RECORD_CNT_MAX 15 //telephony defined
40 #define SIM_CF_RECORD_CNT_MAX 2 //telephony defined
41 #define SIM_MSISDN_RECORD_CNT_MAX 10 //telephony defined
42 #define SIM_GROUP_IDENTIFIER_LEN_MAX 10 //telephony defined
43 #define SIM_MAIL_BOX_IDENTIFIER_LEN_MAX 5 //3gpp
44 #define SIM_MSP_CNT_MAX 2 //telephony defined
45 #define SIM_OPL_PNN_RECORD_CNT_MAX 5//85 //telephony defined
46 #define SIM_NW_FULL_NAME_LEN_MAX 40 //telephony defined TODO should be defined one value in all.
47 #define SIM_OPLMNWACT_LEN_MAX 100 //telephony defined
48 #define SIM_AUTH_REQ_DATA_LEN_MAX 256 //telephony defined
49 #define SIM_AUTH_RESP_DATA_LEN_MAX 128 //telephony defined
50 #define SIM_CPHS_CALL_FORWARDING_LEN_MAX 2 //telephony defined
51 #define SIM_CPHS_CSP_ENTRY_CNT_MAX 11 //telephony defined
52 #define SIM_CPHS_CSP_LEN_MAX 22 //telephony defined
53 #define SIM_CPHS_VMWF_LEN_MAX 2 //telephony defined
54 #define SIM_CPHS_OPERATOR_NAME_LEN_MAX 25 //telephony defined
55 #define SIM_CPHS_OPERATOR_NAME_SHORT_FORM_LEN_MAX 10 //CPHS spec
56 #define SIM_CPHS_INFO_LEN_MAX 3 //telephony defined
58 enum tel_sim_file_id {
59 SIM_EF_DIR = 0x2F00, /**< Root Directory for the USIM */
60 SIM_EF_ICCID = 0x2FE2, /**< the ICC Identification file */
61 SIM_EF_IMSI = 0x6F07, /**< the IMSI file */
62 SIM_EF_SST = 0x6F38, /**< the SIM Service Table file. EF UST has same address */
63 SIM_EF_EST = 0x6F56, /**< the Enabled Service Table file */
64 SIM_EF_OPLMN_ACT = 0x6F61, /**< the OPLMN List file*/
65 SIM_EF_GID1 = 0x6F3E, /**< the Group Identifier Level 1 */
66 SIM_EF_GID2 = 0x6F3F, /**< the Group Identifier Level 2 */
68 SIM_EF_ELP = 0x2F05, /**< the Extended Language Preference file */
69 SIM_EF_LP = 0x6F05, /**< SIM: Language preference */
70 SIM_EF_ECC = 0x6FB7, /**< the Emergency Call Codes */
71 SIM_EF_SPN = 0x6F46, /**< the Service Provider Name */
72 SIM_EF_SPDI = 0x6FCD, /**< the Service provider display information*/
73 SIM_EF_PNN = 0x6FC5, /**< the PLMN Network Name File*/
74 SIM_EF_OPL = 0x6FC6, /**< the Operator PLMN List File*/
75 SIM_EF_MBDN = 0x6FC7, /** < SIM Mail Box Dialing Number file */
76 SIM_EF_MSISDN = 0x6F40, /**< MSISDN */
78 SIM_EF_USIM_LI = 0x6A05, /**< USIM: Language Indication */
79 SIM_EF_USIM_PL = 0x2A05, /**< the Language Preference file of USIM */
80 SIM_EF_USIM_MBI = 0x6FC9, /** < Mailbox Identifier -linear fixed*/
81 SIM_EF_USIM_MWIS = 0x6FCA, /** < Message Waiting Indication Status -linear fixed*/
82 SIM_EF_USIM_CFIS = 0x6FCB, /** < Call forward indication status -linear fixed*/
85 SIM_EF_CPHS_VOICE_MSG_WAITING = 0x6F11, /** < CPHS voice MSG waiting indication */
86 SIM_EF_CPHS_SERVICE_STRING_TABLE = 0x6F12, /** < CPHS service string table */
87 SIM_EF_CPHS_CALL_FORWARD_FLAGS = 0x6F13, /** < CPHS call forward flags */
88 SIM_EF_CPHS_OPERATOR_NAME_STRING = 0x6F14, /** < CPHS operator name string */
89 SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE = 0x6F15, /** < CPHS customer service profile */
90 SIM_EF_CPHS_CPHS_INFO = 0x6F16, /** < CPHS information */
91 SIM_EF_CPHS_MAILBOX_NUMBERS = 0x6F17, /** < CPHS mail box numbers */
92 SIM_EF_CPHS_OPERATOR_NAME_SHORT_FORM_STRING = 0x6F18, /** < CPHS operator name short form string */
93 SIM_EF_CPHS_INFORMATION_NUMBERS = 0x6F19, /** < CPHS information numbers */
94 /* CPHS ALS FILE ID */
95 SIM_EF_CPHS_DYNAMICFLAGS = 0x6F9F, /** < CPHS Dynamics flags */
96 SIM_EF_CPHS_DYNAMIC2FLAG = 0x6F92, /** < CPHS Dynamics2 flags */
97 SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2 = 0x6F98, /** < CPHS CSP2 */
99 /* Invalid File ID, All the file ID are less than this Value*/
100 SIM_EF_INVALID = 0xFFFF, /**< Invalid file.*/
101 SIM_EF_OTHERS, /**< Element to indicate an unknown file.*/
105 SIM_TYPE_UNKNOWN, /**< Unknown card */
106 SIM_TYPE_GSM, /**< 2G GSM card*/
107 SIM_TYPE_USIM, /**< 3G USIM card */
108 SIM_TYPE_RUIM, /** CDMA based card*/
109 SIM_TYPE_ISIM /** IMS based card */
112 enum tel_sim_status {
113 SIM_STATUS_CARD_ERROR = 0x00, /**< Bad card / On the fly SIM gone bad **/
114 SIM_STATUS_CARD_NOT_PRESENT = 0x01, /**< Card not present **/
115 SIM_STATUS_INITIALIZING = 0x02, /**< SIM is Initializing state **/
116 SIM_STATUS_INIT_COMPLETED = 0x03, /**< SIM Initialization OK **/
117 SIM_STATUS_PIN_REQUIRED = 0x04, /**< PIN required state **/
118 SIM_STATUS_PUK_REQUIRED = 0x05, /**< PUK required state **/
119 SIM_STATUS_CARD_BLOCKED = 0x06, /**< PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) **/
120 SIM_STATUS_NCK_REQUIRED = 0x07, /**< Network Control Key required state **/
121 SIM_STATUS_NSCK_REQUIRED = 0x08, /**< Network Subset Control Key required state **/
122 SIM_STATUS_SPCK_REQUIRED = 0x09, /**< Service Provider Control Key required state **/
123 SIM_STATUS_CCK_REQUIRED = 0x0a, /**< Corporate Control Key required state **/
124 SIM_STATUS_CARD_REMOVED = 0x0b, /**< Card removed **/
125 SIM_STATUS_LOCK_REQUIRED = 0x0c, /**< PH-SIM (phone-SIM) locked state **/
126 SIM_STATUS_UNKNOWN = 0xff /**< unknown state. not checked yet. **/
129 enum tel_sim_facility_status {
130 SIM_FACILITY_STATUS_DISABLED = 0x00, /**< PIN1 or PIN2 Disabled */
131 SIM_FACILITY_STATUS_ENABLED = 0x01, /**< PIN1 or PIN2 Enabled */
132 SIM_FACILITY_STATUS_BLOCKED = 0x02, /**< SIM is present, but PIN1 or PIN2 is blocked. need unblocking by PUK or PUK2 */
133 SIM_FACILITY_STATUS_PUK_BLOCKED = 0x03, /**< SIM is present, but PUK is blocked. */
134 SIM_FACILITY_STATUS_UNKNOWN = 0xFF /**< SIM is in unknown state */
137 enum tel_sim_access_result {
138 SIM_ACCESS_SUCCESS, /**< Access to file successful. */
139 SIM_ACCESS_CARD_ERROR, /**< SIM card error */
140 SIM_ACCESS_FILE_NOT_FOUND, /**< File not found */
141 SIM_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition is not fulfilled */
142 SIM_ACCESS_FAILED, /**< Access failed. */
145 enum tel_sim_pin_operation_result {
146 SIM_PIN_OPERATION_SUCCESS, /**< Operation involving PIN (verification/change/enable/disable, etc) is successful. */
147 SIM_BUSY, /**< SIM is busy */
148 SIM_CARD_ERROR, /**< SIM card error - Permanently blocked and general errors */
149 SIM_INCOMPATIBLE_PIN_OPERATION, /**< SIM Incompatible pin operation that is in case when invalid SIM command is given or incorrect parameters are supplied to the SIM. */
150 SIM_INCORRECT_PASSWORD, /**< SIM PIN Incorrect password */
151 SIM_PIN_REQUIRED, /**< PIN Required */
152 SIM_PUK_REQUIRED, /**< PUK Required */
153 SIM_NCK_REQUIRED, /**< Network Control Key Required */
154 SIM_NSCK_REQUIRED, /**< Network Subset Control Key Required */
155 SIM_SPCK_REQUIRED, /**< Service Provider Control Key Required */
156 SIM_CCK_REQUIRED, /**< Corporate Control Key Required */
157 SIM_LOCK_REQUIRED, /**< PH-SIM (phone-SIM) locked state **/
158 SIM_ADM_REQUIRED /**< Admin key locked state **/
161 enum tel_sim_language_type {
162 SIM_LANG_GERMAN = 0x00, /**< German */
163 SIM_LANG_ENGLISH = 0x01, /**< English */
164 SIM_LANG_ITALIAN = 0x02, /**< Italian */
165 SIM_LANG_FRENCH = 0x03, /**< French */
166 SIM_LANG_SPANISH = 0x04, /**< Spanish */
167 SIM_LANG_DUTCH = 0x05, /**< Dutch */
168 SIM_LANG_SWEDISH = 0x06, /**< Swedish */
169 SIM_LANG_DANISH = 0x07, /**< Danish */
170 SIM_LANG_PORTUGUESE = 0x08, /**< Portuguese */
171 SIM_LANG_FINNISH = 0x09, /**< Finnish */
172 SIM_LANG_NORWEGIAN = 0x0A, /**< Norwegian */
173 SIM_LANG_GREEK = 0x0B, /**< Greek */
174 SIM_LANG_TURKISH = 0x0C, /**< Turkish */
175 SIM_LANG_HUNGARIAN = 0x0D, /**< Hungarian */
176 SIM_LANG_POLISH = 0x0E, /**< Polish */
177 SIM_LANG_KOREAN = 0x0F, /**< Korean */
178 SIM_LANG_CHINESE = 0x10, /**< Chinese */
179 SIM_LANG_RUSSIAN = 0x11, /**< Russian */
180 SIM_LANG_JAPANESE = 0x12, /**< Japanese */
181 SIM_LANG_UNSPECIFIED = 0xFF /**< Unspecified */
184 enum tel_sim_msgwaiting_idication_mask {
185 SIM_MWIS_NONE = 0x00, /**< MWIS none*/
186 SIM_MWIS_VOICE = 0x01, /**< MWIS voice*/
187 SIM_MWIS_FAX = 0x02, /**< MWIS FAX*/
188 SIM_MWIS_EMAIL = 0x04, /**< MWIS email*/
189 SIM_MWIS_OTHER = 0x08, /**< MWIS other*/
190 SIM_MWIS_VIDEO = 0x10, /**< MWIS video*/
191 SIM_MWIS_RFU = 0xff /**< MWIS RFU*/
194 enum tel_sim_pin_type {
195 SIM_PTYPE_PIN1 = 0x00, /**< PIN 1 code */
196 SIM_PTYPE_PIN2 = 0x01, /**< PIN 2 code */
197 SIM_PTYPE_PUK1 = 0x02, /**< PUK 1 code */
198 SIM_PTYPE_PUK2 = 0x03, /**< PUK 2 code */
199 SIM_PTYPE_UPIN = 0x04, /**< Universal PIN - Unused now */
200 SIM_PTYPE_ADM = 0x05, /**< Administrator - Unused now */
201 SIM_PTYPE_SIM = 0x06 /**< SIM Lock code */
204 enum tel_sim_facility_type {
205 SIM_FACILITY_PS, /**< PH-SIM, Lock PHone to SIM/UICC card*/
206 SIM_FACILITY_SC, /**< Lock SIM/UICC card, simply PIN1 */
207 SIM_FACILITY_FD, /**< Fixed Dialing Number feature, need PIN2 */
208 SIM_FACILITY_PN, /**< Network Personalization */
209 SIM_FACILITY_PU, /**< network sUbset Personalization */
210 SIM_FACILITY_PP, /**< service Provider Personalization */
211 SIM_FACILITY_PC, /**< Corporate Personalization */
214 enum tel_sim_lock_status {
215 SIM_LOCK_STATUS_UNLOCKED,
218 SIM_LOCK_STATUS_PIN2,
219 SIM_LOCK_STATUS_PUK2,
220 SIM_LOCK_STATUS_PERM_BLOCKED,
223 enum tel_sim_cphs_dynamic_flag_selected_line {
224 SIM_DYNAMIC_FLAGS_LINE1 = 0x01, /**< line 1 */
225 SIM_DYNAMIC_FLAGS_LINE2 = 0x00, /**< line 2*/
226 SIM_DYNAMIC_FLAGS_RFU = 0xff /**< rfu*/
229 enum tel_sim_cphs_dynamic2_flag_als_status {
230 SIM_PIN2_ACCESSIBLE_FLAGS_LOCKED = 0x01, /**< Dynamic flags locked */
231 SIM_PIN2_ACCESSIBLE_FLAGS_UNLOCKED = 0x00, /**< Dynamic flags unlocked */
232 SIM_PIN2_ACCESSIBLE_FLAGS_RFU = 0xff /**< rfu */
235 enum tel_sim_cphs_phase {
236 SIM_CPHS_PHASE1 = 0x01, /**< phase1 */
237 SIM_CPHS_PHASE2 = 0x02, /**< phase2 */
238 SIM_CPHS_PHASE_RFU = 0xff /**< RFU */
242 SIM_TON_UNKNOWN = 0, /**< unknown */
243 SIM_TON_INTERNATIONAL = 1, /**< international number */
244 SIM_TON_NATIONAL = 2, /**< national number */
245 SIM_TON_NETWORK_SPECIFIC = 3, /**< network specific number */
246 SIM_TON_DEDICATED_ACCESS = 4, /**< subscriber number */
247 SIM_TON_ALPHA_NUMERIC = 5, /**< alphanumeric, GSM 7-bit default alphabet) */
248 SIM_TON_ABBREVIATED_NUMBER = 6, /**< abbreviated number */
249 SIM_TON_RESERVED_FOR_EXT = 7 /**< reserved for extension */
253 SIM_NPI_UNKNOWN = 0, /**< Unknown */
254 SIM_NPI_ISDN_TEL = 1, /**< ISDN/Telephone numbering plan */
255 SIM_NPI_DATA_NUMBERING_PLAN = 3, /**< Data numbering plan */
256 SIM_NPI_TELEX = 4, /**< Telex numbering plan */
257 SIM_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /**< Service Center Specific plan */
258 SIM_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6, /**< Service Center Specific plan */
259 SIM_NPI_NATIONAL = 8, /**< National numbering plan */
260 SIM_NPI_PRIVATE = 9, /**< Private numbering plan */
261 SIM_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
262 SIM_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
265 enum tel_sim_emergency_service_type {
266 SIM_ECC_POLICE = 0x01, /**< Police */
267 SIM_ECC_AMBULANCE = 0x02, /**< Ambulance */
268 SIM_ECC_FIREBRIGADE = 0x04, /**< Fire brigade */
269 SIM_ECC_MARAINEGUARD = 0x08, /**< Marine guard */
270 SIM_ECC_MOUTAINRESCUE = 0x10, /**< Mountain rescue */
271 SIM_ECC_SPARE = 0x00 /**< Spare */
274 enum tel_sim_mailbox_type {
275 SIM_MAILBOX_VOICE = 0x01, /**< voice */
276 SIM_MAILBOX_FAX = 0x02, /**< fax*/
277 SIM_MAILBOX_DATA = 0x03, /**< data*/
278 SIM_MAILBOX_EMAIL = 0x04, /**< email*/
279 SIM_MAILBOX_OTHER = 0x05, /**< other*/
282 enum tel_sim_cphs_csp_group {
283 SIM_CPHS_CSP_GROUP_CALL_OFFERING = 0x01, /**< Group CSP offering*/
284 SIM_CPHS_CSP_GROUP_CALL_RESTRICTION = 0x02, /**< Group CSP restriction*/
285 SIM_CPHS_CSP_GROUP_OTHER_SUPP_SERVICES = 0x03, /**< Group CSP supplementary services*/
286 SIM_CPHS_CSP_GROUP_CALL_COMPLETION = 0x04, /**< Group CSP completion*/
287 SIM_CPHS_CSP_GROUP_TELESERVICES = 0x05, /**< Group CSP teleservices*/
288 SIM_CPHS_CSP_GROUP_CPHS_TELESERVICES = 0x06, /**< Group CSP CPHS teleservies*/
289 SIM_CPHS_CSP_GROUP_CPHS_FEATURES = 0x07, /**< Group CSP CPHS features*/
290 SIM_CPHS_CSP_GROUP_NUMBER_IDENTIFIERS = 0x08, /**< Group CSP number identifiers*/
291 SIM_CPHS_CSP_GROUP_PHASE_SERVICES = 0x09, /**< Group CSP phase services*/
292 SIM_CPHS_CSP_GROUP_VALUE_ADDED_SERVICES = 0xC0, /**< Group CSP value added services*/
293 SIM_CPHS_CSP_GROUP_INFORMATION_NUMBERS = 0xD5 /**< Group CSP information numbers*/
296 enum tel_sim_cphs_index_level {
297 SIM_CPHS_INDEX_LEVEL_ONE = 0x01, /**< SIM CPHS index level one */
298 SIM_CPHS_INDEX_LEVEL_TWO = 0x02, /**< SIM CPHS index level two */
299 SIM_CPHS_INDEX_LEVEL_THREE = 0x03, /**< SIM CPHS index level three */
300 SIM_CPHS_INDEX_LEVEL_RFU = 0xff /**< SIM CPHS index level RFU */
303 enum tel_sim_auth_type {
304 SIM_AUTH_TYPE_IMS = 0x00, /**< IMS Authentication */
305 SIM_AUTH_TYPE_GSM, /**< GSM Authentication */
306 SIM_AUTH_TYPE_3G, /**< 3G Authentication */
307 SIM_AUTH_TYPE_MAX /**< TBD */
310 enum tel_sim_auth_result {
311 SIM_AUTH_NO_ERROR = 0x00, /**< ISIM no error */
312 SIM_AUTH_CANNOT_PERFORM, /**< status - can't perform authentication */
313 SIM_AUTH_SKIP_RESPONSE, /**< status - skip authentication response */
314 SIM_AUTH_MAK_CODE_FAILURE, /**< status - MAK(Multiple Activation Key) code failure */
315 SIM_AUTH_SQN_FAILURE, /**< status - SQN(SeQuenceNumber) failure */
316 SIM_AUTH_SYNCH_FAILURE, /**< status - synch failure */
317 SIM_AUTH_UNSUPPORTED_CONTEXT, /**< status - unsupported context */
318 SIM_AUTH_MAX /**< TBD */
323 char bPIN1DisableFunction; /**< PIN1 disable function */
324 char bAdn; /**< abbreviated Dialing number */
325 char bFdn; /**< fixed Dialing number */
326 char bSms; /**< short message storage */
327 char bAoc; /**< advice of charge */
328 char bCcp; /**< capability configuration parameters */
329 char bPlmnSelector; /**< plmn selector */
330 char bRfu1; /**< rfu */
333 char bMsisdn; /**< msisdn */
334 char bExtension1; /**< extension1 */
335 char bExtension2; /**< extension2 */
336 char bSmsParams; /**< sms parameteres */
337 char blnd; /**< last number dialed */
338 char bCellBroadCastMsgId; /**< cell broadcast message identifier */
339 char bGroupIdLevel1; /**< group identifier level 1 */
340 char bGroupIdLevel2; /**< group identifier level 2 */
343 char bSpn; /**< service provider name */
344 char bSdn; /**< service Dialing number */
345 char bExtension3; /**< extension3 */
346 char bRfu2; /**< rfu */
347 char bVgcsGroupIdList; /**< vgcs group identifier (EF-VGCS, EF-VGCSS) */
348 char bVbsGroupIDList; /**< vbs group identifier (EF-VBS, EF-VBSS) */
349 char bEnhancedMultilevelPrecedencePreemptionService; /**< enhanced multi-level precedence and pre-emption service */
350 char bAutoAnswerForeMLPP; /**< automatic answer fro eMLPP */
353 char bSmsCbdDataDownload; /**< data download via sms-cb */
354 char bSmsPpDataDownload; /**< data download via sms-pp */
355 char bMenuSelection; /**< menu selection */
356 char bCallControl; /**< call control */
357 char bProactiveSimCommand; /**< proactive sim command */
358 char bCellBroadcastMsgIdRanges; /**< cell broadcast message identifier ranges */
359 char bBdn; /**< barred Dialing numbers */
360 char bExtension4; /**< extension 4 */
363 char bDePersonalizedControlKeys; /**< de-personalization control keys */
364 char bCoOperativeNetworkList; /**< co-operative network list */
365 char bSmsr; /**< short message status reports */
366 char bNetworkAlertIndInMS; /**< network's indication of alerting in the MS */
367 char bMoSMSControl; /**< mobile-originated short message control by sim */
368 char bGPRS; /**< gprs */
369 char bImage; /**< image */
370 char bSolsa; /**< support of local service area */
373 char bUSSDSupportedInCallControl; /**< ussd string data object supported in call control */
374 char bRunAtCommand; /**< RUN AT COMMAND command */
375 char bUserControlledPLMNSelectorAccessTech; /**< user controlled PLMN selector with Access technology */
376 char bOperatorControlledPlmnSelectorAccessTech; /**< operator controlled PLMN selector with Access technology */
377 char bHplmnSelectorAccessTech; /**< HPLMN selector with access technology */
378 char bCPBCCHInfo; /**< CPBCCH information */
379 char bInvestigationScan; /**< investigation scan */
380 char bExtenedCapaConfigParams; /**< extended capability configuration parameters */
383 char bMexe; /**< MExE */
384 char bRplmnLastUsedAccessTech; /**< RPLMN last used access technology */
385 char bPlmnNetworkName; /*PLMN Network Name*/
386 char bOperatorPlmnList; /*Operator PLMN List*/
387 char bMailboxDiallingNumber; /*Mailbox Dialling Numbers*/
388 char bMessageWaitingIndicationStatus; /*Message Waiting Indication Status*/
389 char bCallForwardingIndicationStatus; /*Call Forwarding Indication Status*/
390 char bServiceProviderDisplayInformation; /*Service Provider Display Information*/
395 char bLocalPhoneBook; /**< local phone book */
396 char bFdn; /**< fixed Dialing number */
397 char bExtension2; /**< extension 2 */
398 char bSdn; /**< service Dialing number */
399 char bExtension3; /**< extension 3 */
400 char bBdn; /**< barred Dialing numbers */
401 char bExtension4; /**< extension 4 */
402 char bOCIOCT; /**< outgoing call information */
405 char bIciIct; /**< incoming call information */
406 char bSms; /**< short message storage */
407 char bSmsr; /**< short message status reports */
408 char bSMSP; /**< short message service parameters */
409 char bAoc; /**< advice of charge */
410 char bCcp; /**< capability config parameters */
411 char bCellBroadcastMsgId; /**< cell broadcast message identifier */
412 char bCellBroadcastMsgIdRanges; /**< cell broadcast message identifier charge */
415 char bGroupIdLevel1; /**< group identifier level 1 */
416 char bGroupIdLevel2; /**< group identifier level 2 */
417 char bSpn; /**< service provide name */
418 char bUserControlledPLMNSelectorAccessTech; /**< user controlled plmn selector with access technology */
419 char bMsisdn; /**< msisdn */
420 char bImage; /**< image */
422 char bEnhancedMultilevelPrecedencePreemptionService; /**< enhanced multi-level precedence and pre-emption service */
425 char bAutoAnswerForeMLPP; /**< automatic answer fro eMLPP */
427 char bGsmAccess; /**< gsm access */
428 char bSmsPpDataDownload; /**< data download via sms-pp */
429 char bSmsCbdDataDownload; /**< data download via sms-cb */
430 char bUsimCallControl; /**< usim call control */
431 char bUsimMoSmsControl; /**< mo-sms control by usim */
432 char bRunAtCommand; /**< RUN AT COMMAND command */
435 char bShallBeSetToOne; /**< shall be set to 1 */
436 char bEnabledServiceTable; /**< enabled service table */
437 char bAcl; /**< APN control list */
438 char bDePersonalizedControlKeys; /**< de-personalization control keys */
439 char bCoOperativeNetworkList; /**< co-operative network list */
440 char bGsmSecurityContext; /**< gsm security context */
441 char bCpbcchiInformation; /**< cpbcch information */
442 char bInvestigationScan; /**< investigation scan */
445 char bMexe; /**< mexe */
446 char bOperatorControlledPlmnSelectorAccessTech; /**< Operator controlled PLMN selector with Access Technology */
447 char bHplmnSelectorAccessTech; /**< HPLMN selector with access technology */
448 char bExtension5; /**< extension 5 */
449 char bPlmnNetworkName; /**< plmn network name */
450 char bOperatorPlmnList; /**< operator plmn list */
451 char bMailBoxDiallingNumbers; /**< mailbox Dialing numbers */
452 char bMsgWaitingIndStatus; /**< message waiting indication status */
455 char bCallForwardingIndicationStatus; /**< call forwarding indication status */
456 char bRplmnLastUsedAccessTech; /**< RPLMN last used access technology */
457 char bServiceProviderDisplayInfo; /**< service provider display information */
458 char bMms; /**< multi media messaging service */
459 char bExtension8; /**< extension 8 */
460 char bUsimGpsCallControl; /**< call control on gprs by usim */
461 char bMmsUserConnectivityParameters; /**< mms user connectivity parameters */
462 char bNia; /**< Network's indication of alerting in the MS (NIA) */
465 char bVgcsIdList; /**< VGCS Group Identifier List (EFVGCS and EFVGCSS) */
466 char bVbsGroupId; /**< VBS Group Identifier List (EFVBS and EFVBSS)*/
468 char bUserCtrlPlmnSelectorForWlan;
469 char bOperatorCtrlPlmnSelectorForWlan;
470 char bUserCtrlWsidList;
471 char bOperatorCtrlWsidList;
475 struct tel_sim_service_table {
476 struct tel_sim_sst sst;
477 struct tel_sim_ust ust;
481 gboolean bFdnEnabled;
482 gboolean bBdnEnabled;
483 gboolean bAclEnabled;
486 struct tel_sim_imsi {
487 char plmn[6 + 1]; /**< SIM MCC, MNC code. MNC is 2 digit or 3digit */
488 char msin[10 + 1]; /**< Mobile Station Identification Number */
491 struct tel_sim_dialing_number {
492 int alpha_id_max_len; /**< alpha max length in SIM - READ ONLY*/
493 char alpha_id[SIM_XDN_ALPHA_ID_LEN_MAX + 1]; /**< Alpha Identifier */
494 enum tel_sim_ton ton; /**< Type Of Number */
495 enum tel_sim_npi npi; /**< Number Plan Identity */
496 char num[SIM_XDN_NUMBER_LEN_MAX + 1]; /**< Dialing Number/SSC String */
497 unsigned char cc_id; /**< Capability/Configuration Identifier */
498 unsigned char ext1_id; /**< Extensiion1 Record Identifier */
502 int GroupIdentifierLen; /**< Group identifier length */
503 char szGroupIdentifier[SIM_GROUP_IDENTIFIER_LEN_MAX]; /**< Group identifier */
506 struct tel_sim_cphs_svc_call_offering_s {
507 int bCallForwardingUnconditional; /**< CallForwarding Unconditional */
508 int bCallForwardingOnUserBusy; /**< CallForwarding On UserBusy */
509 int bCallForwardingOnNoReply; /**< CallForwarding On NoReply */
510 int bCallForwardingOnUserNotReachable; /**< CallForwarding On User Not Reachable */
511 int bCallTransfer; /**< Call Transfer */
514 struct tel_sim_cphs_svc_call_restriction_s {
515 int bBarringOfAllOutgoingCalls; /**< Barring Of All Outgoing Calls*/
516 int bBarringOfOutgoingInternationalCalls; /**< Barring Of Outgoing International Calls */
517 int bBarringOfOutgoingInternationalCallsExceptHplmn; /**< Barring Of Outgoing International Calls Except HPLMN */
518 int bBarringOfAllIncomingCallsRoamingOutsideHplmn; /**< Barring Of All Incoming Calls Roaming Outside HPLMN */
519 int bBarringOfIncomingCallsWhenRoaming; /**< Barring Of IncomingCalls When Roaming */
522 struct tel_sim_cphs_svc_other_ss_s {
523 int bMultiPartyService; /**< MultiPartyService*/
524 int bClosedUserGroup; /**< ClosedUserGroup*/
525 int bAdviceOfCharge; /**< AdviceOfCharge*/
526 int bPreferentialClosedUserGroup; /**< PreferentialClosedUserGroup*/
527 int bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess*/
530 struct tel_sim_cphs_svc_call_complete_s {
531 int bCallHold; /**< Call Hold*/
532 int bCallWaiting; /**< Call Waiting*/
533 int bCompletionOfCallToBusySubscriber; /**< Completion Of Call To Busy Subscriber*/
534 int bUserUserSignalling; /**< User User Signaling*/
537 struct tel_sim_cphs_svc_teleservices_s {
538 int bShortMessageMobileOriginated; /**< Short Message Mobile Originated*/
539 int bShortMessageMobileTerminated; /**< Short Message Mobile Terminated*/
540 int bShortMessageCellBroadcast; /**< Short Message Cell Broadcast*/
541 int bShortMessageReplyPath; /**< Short Message Reply Path*/
542 int bShortMessageDeliveryConf; /**< Short Message Delivery Conf*/
543 int bShortMessageProtocolIdentifier; /**< Short Message Protocol Identifier*/
544 int bShortMessageValidityPeriod; /**< Short Message Validity Period*/
547 struct tel_sim_cphs_svc_cphs_teleservices_s {
548 int bAlternativeLineService; /**< Alternative Line Service*/
551 struct tel_sim_cphs_svc_cphs_features_s {
552 int bStringServiceTable; /**< String Service Table*/
555 struct tel_sim_cphs_svc_number_identifier_s {
556 int bCallingLineIdentificationPresent; /**< Calling Line Identification Present*/
557 int bConnectedLineIdentificationRestrict; /**< Connected Line Identification Restrict*/
558 int bConnectedLineIdentificationPresent; /**< Connected Line Identification Present*/
559 int bMaliciousCallIdentifier; /**< Malicious Call Identifier*/
560 int bCallingLineIdentificationSend; /**< Calling Line Identification Send*/
561 int bCallingLineIdentificationBlock; /**< Calling Line Identification Block*/
564 struct tel_sim_cphs_svc_phase_services_s {
565 int bMenuForGprs; /**< Menu For group*/
566 int bMenuForHighSpeedCsd; /**< Menu For HighSpeedCsd*/
567 int bMenuForVoiceGroupCall; /**< Menu For VoiceGroupCall*/
568 int bMenuForVoiceBroadcastService; /**< Menu For VoiceBroadcastService*/
569 int bMenuForMultipleSubscriberProfile; /**< Menu For MultipleSubscriberProfile*/
570 int bMenuForMultipleBand; /**< Menu For MultipleBand*/
573 struct tel_sim_cphs_svc_value_added_services_s {
574 int bRestrictMenuForManualSelection; /**< RestrictMenu For ManualSelection*/
575 int bRestrictMenuForVoiceMail; /**< RestrictMenu For VoiceMail*/
576 int bRestrictMenuForMoSmsAndPaging; /**< RestrictMenu For MoSmsAndPaging*/
577 int bRestrictMenuForMoSmsWithEmialType; /**< RestrictMenu For MoSmsWithEmialType*/
578 int bRestrictMenuForFaxCalls; /**< RestrictMenu For FaxCalls*/
579 int bRestrictMenuForDataCalls; /**< RestrictMenu For DataCalls*/
580 int bRestrictMenuForChangeLanguage; /**< RestrictMenu For ChangeLanguage*/
583 struct tel_sim_cphs_svc_information_numbers_s {
584 int bInformationNumbers; /**< Information Numbers*/
587 struct tel_sim_cphs_csp_entry_s {
588 enum tel_sim_cphs_csp_group CustomerServiceGroup; /**< customer service group*/
590 struct tel_sim_cphs_svc_call_offering_s CallOffering; /**< call offering*/
591 struct tel_sim_cphs_svc_call_restriction_s CallRestriction; /**< call restriction*/
592 struct tel_sim_cphs_svc_other_ss_s OtherSuppServices; /**< other SS services*/
593 struct tel_sim_cphs_svc_call_complete_s CallComplete; /**< call complete*/
594 struct tel_sim_cphs_svc_teleservices_s Teleservices; /**< teleservices*/
595 struct tel_sim_cphs_svc_cphs_teleservices_s CphsTeleservices; /**< CPHS teleservices*/
596 struct tel_sim_cphs_svc_cphs_features_s CphsFeatures; /**< CPHS features*/
597 struct tel_sim_cphs_svc_number_identifier_s NumberIdentifiers; /**< number identifiers*/
598 struct tel_sim_cphs_svc_phase_services_s PhaseServices; /**< phase services*/
599 struct tel_sim_cphs_svc_value_added_services_s ValueAddedServices; /**< value added services*/
600 struct tel_sim_cphs_svc_information_numbers_s InformationNumbers; /**< information numbers*/
604 struct tel_sim_cphs_csp {
605 struct tel_sim_cphs_csp_entry_s ServiceProfileEntry[SIM_CPHS_CSP_ENTRY_CNT_MAX]; /**< service profile entry*/
608 struct tel_sim_cphs_dflag {
609 enum tel_sim_cphs_dynamic_flag_selected_line DynamicFlags; /**< Dynamic flags information */
612 struct tel_sim_cphs_dflag2 {
613 enum tel_sim_cphs_dynamic2_flag_als_status Dynamic2Flag; /**< Dynamic flags status */
616 struct tel_sim_cphs_service_tablie_s {
617 /* Byte 2 - bit1 & 2*/
618 int bCustomerServiceProfile; /**< Customer Service Profile (CSP) */
619 /* Byte 2 - bit3 & 4*/
620 int bServiceStringTable; /**< Service String Table (SST) */
621 /* Byte 2 - bit5 & 6*/
622 int bMailBoxNumbers; /**< MailBoxNumbers */
623 /* Byte 2 - bit7 & 8*/
624 int bOperatorNameShortForm; /**< Short form of operator name */
625 /* Byte 3 - bit1 & 2*/
626 int bInformationNumbers; /**< Information numbers */
629 struct tel_sim_cphs_info {
630 enum tel_sim_cphs_phase CphsPhase; /**< CPHS phase type */
631 struct tel_sim_cphs_service_tablie_s CphsServiceTable; /**< CPHS service table */
634 struct tel_sim_cphs_info_number {
635 int AlphaIdLength; /**< length of alpha identifier */
636 enum tel_sim_cphs_index_level IndexLevelIndicator; /**< SIM CPHS index level one */
637 int PremiumServiceIndicator; /**< SIM CPHS index level one */
638 int NetworkSpecificIndicator; /**< SIM CPHS index level one */
639 unsigned char Alpha_id[SIM_XDN_ALPHA_ID_LEN_MAX + 1]; /**< Alpha Identifier */
640 unsigned long DiallingnumLength; /**< Length of BCD number/SSC contents */
641 enum tel_sim_ton TypeOfNumber; /**< TON */
642 enum tel_sim_npi NumberingPlanIdentity; /**< NPI */
643 char DiallingNum[SIM_XDN_NUMBER_LEN_MAX + 1]; /**< Dialing Number/SSC String */
644 unsigned char Ext1RecordId; /**< Extensiion1 Record Identifier */
647 struct treq_sim_verify_pins {
648 enum tel_sim_pin_type pin_type;
649 unsigned int pin_length;
653 struct treq_sim_verify_puks {
654 enum tel_sim_pin_type puk_type;
655 unsigned int puk_length;
657 unsigned int pin_length;
661 struct treq_sim_change_pins {
662 enum tel_sim_pin_type type;
663 unsigned int old_pin_length;
665 unsigned int new_pin_length;
669 struct treq_sim_get_facility_status {
670 enum tel_sim_facility_type type;
673 struct treq_sim_disable_facility {
674 enum tel_sim_facility_type type;
675 unsigned int password_length;
679 struct treq_sim_enable_facility {
680 enum tel_sim_facility_type type;
681 unsigned int password_length;
685 struct treq_sim_get_lock_info {
686 enum tel_sim_facility_type type;
689 struct treq_sim_transmit_apdu {
690 unsigned int apdu_length;
691 unsigned char apdu[256];
694 struct treq_sim_set_language {
695 enum tel_sim_language_type language;
698 struct treq_sim_req_authentication {
699 enum tel_sim_auth_type auth_type; /**< Authentication type */
700 unsigned int rand_length; /**< the length of RAND */
701 unsigned int autn_length; /**< the length of AUTN. it is not used in case of GSM AUTH */
702 char rand_data[SIM_AUTH_REQ_DATA_LEN_MAX + 1]; /**< RAND data */
703 char autn_data[SIM_AUTH_REQ_DATA_LEN_MAX + 1]; /**< AUTN data. it is not used in case of GSM AUTH */
706 struct tresp_sim_verify_pins {
707 enum tel_sim_pin_operation_result result;
708 enum tel_sim_pin_type pin_type;
709 enum tel_sim_lock_status lock_status;
713 struct tresp_sim_verify_puks {
714 enum tel_sim_pin_operation_result result;
715 enum tel_sim_pin_type pin_type;
716 enum tel_sim_lock_status lock_status;
720 struct tresp_sim_change_pins {
721 enum tel_sim_pin_operation_result result;
722 enum tel_sim_pin_type pin_type;
726 struct tresp_sim_get_facility_status {
727 enum tel_sim_pin_operation_result result;
728 enum tel_sim_facility_type type;
732 struct tresp_sim_disable_facility {
733 enum tel_sim_pin_operation_result result;
734 enum tel_sim_facility_type type;
738 struct tresp_sim_enable_facility {
739 enum tel_sim_pin_operation_result result;
740 enum tel_sim_facility_type type;
744 struct tresp_sim_get_lock_info {
745 enum tel_sim_pin_operation_result result;
746 enum tel_sim_facility_type type;
747 enum tel_sim_lock_status lock_status;
751 struct tresp_sim_transmit_apdu {
752 enum tel_sim_access_result result;
753 unsigned int apdu_resp_length;
754 unsigned char apdu_resp[256 + 2];
757 struct tresp_sim_get_atr {
758 enum tel_sim_access_result result;
759 unsigned int atr_length;
760 unsigned char atr[256 + 2];
764 char ecc_num[SIM_ECC_BYTE_LEN_MAX * 2 + 1]; /**< Emergency Call Code info-ECC is coded in BCD format. null termination used*/
765 char ecc_string[SIM_ECC_STRING_LEN_MAX + 1]; /**< Alphabet identifier. null termination used*/
766 enum tel_sim_emergency_service_type ecc_category; /**< ECC emergency service information */
769 struct tel_sim_ecc_list {
771 struct tel_sim_ecc ecc[SIM_ECC_RECORD_CNT_MAX];
774 struct tel_sim_language {
776 enum tel_sim_language_type language[SIM_LANG_CNT_MAX];
779 struct tresp_sim_set_data {
780 enum tel_sim_access_result result;
783 struct tel_sim_iccid {
784 char iccid[SIM_ICCID_LEN_MAX + 1];
788 /* '00' - no mailbox dialing number associated with message waiting indication group type.
789 'xx' - record number in EFMBDN associated with message waiting indication group type.
791 int voice_index; /**< voice mailbox identifier*/
792 int fax_index; /**< FAX mailbox identifier*/
793 int email_index; /**< email mailbox identifier*/
794 int other_index; /**< other mailbox identifier*/
795 int video_index; /**< video mailbox identifier*/
798 struct tel_sim_mbi_list {
800 struct tel_sim_mbi mbi[SIM_MSP_CNT_MAX];
803 struct tel_sim_mb_number{
804 int rec_index; // SIM record index;
805 int profile_number; // Subscriber profile number(ex: line1, line2, lineX)
806 enum tel_sim_mailbox_type mb_type;
807 struct tel_sim_dialing_number number_info;
810 struct tel_sim_mailbox {
813 struct tel_sim_mb_number mb[SIM_MSP_CNT_MAX*5]; //each profile mailbox number can exist 5 numbers
816 struct treq_sim_set_mailbox {
818 struct tel_sim_mb_number mb_info;
821 struct tel_sim_cfis {
823 unsigned char msp_num; /**< MSP number*/
824 unsigned char cfu_status; /**< call forwarding unconditional indication status*/
825 enum tel_sim_ton ton; /**< TON*/
826 enum tel_sim_npi npi; /**< NPI*/
827 char cfu_num[SIM_XDN_NUMBER_LEN_MAX + 1];/**< Dialing Number/SSC String*/
828 unsigned char cc2_id; /**< Capability/Configuration2 Record Identifier */
829 unsigned char ext7_id; /**< Extension 7 Record Identifier */
832 struct tel_sim_cf_list {
834 struct tel_sim_cfis cf[SIM_MSP_CNT_MAX];
837 struct tel_sim_cphs_cf {
838 gboolean b_line1; /**< CallForwardUnconditionalLine 1 */
839 gboolean b_line2; /**< CallForwardUnconditionalLine 2 */
840 gboolean b_fax; /**< CallForwardUnconditional FAX */
841 gboolean b_data; /**<CallForwardUnconditional data*/
844 struct tel_sim_callforwarding {
846 struct tel_sim_cf_list cf_list;
847 struct tel_sim_cphs_cf cphs_cf;
850 struct treq_sim_set_callforwarding {
852 struct tel_sim_cfis cf;
853 struct tel_sim_cphs_cf cphs_cf;
858 unsigned char indicator_status; /**< Indicator status*/
859 int voice_count; /**< VoiceMail Count*/
860 int fax_count; /**< FAX Count*/
861 int email_count; /**< Email Count*/
862 int other_count; /**< Other Count*/
863 int video_count; /**< VideoMail Count*/
866 struct tel_sim_mw_list {
868 struct tel_sim_mw mw[SIM_MSP_CNT_MAX];
871 struct tel_sim_cphs_mw {
872 gboolean b_voice1; /**< VoiceMsgLine1 message waiting flag */
873 gboolean b_voice2; /**< VoiceMsgLine2 message waiting flag */
874 gboolean b_fax; /**< FAX message waiting flag */
875 gboolean b_data; /**< Data message waiting flag */
878 struct tel_sim_messagewaiting {
880 struct tel_sim_mw_list mw_list;
881 struct tel_sim_cphs_mw cphs_mw;
884 struct treq_sim_set_messagewaiting {
886 struct tel_sim_mw mw;
887 struct tel_sim_cphs_mw cphs_mw;
890 struct tel_sim_msisdn {
891 unsigned char num[SIM_XDN_NUMBER_LEN_MAX + 1];
892 enum tel_sim_ton ton;
893 unsigned char name[SIM_XDN_ALPHA_ID_LEN_MAX + 1];
896 struct tel_sim_msisdn_list {
898 struct tel_sim_msisdn msisdn[SIM_MSISDN_RECORD_CNT_MAX];
902 unsigned char display_condition; /**< display condition (1 byte) */
903 unsigned char spn[SIM_SPN_LEN_MAX + 1]; /**< SPN */
906 struct tel_sim_spdi {
909 unsigned char plmn[6+1];
910 }list[SIM_SPDI_PLMN_MAX];
914 unsigned char plmn[6+1];
915 unsigned short lac_from;
916 unsigned short lac_to;
917 unsigned char rec_identifier;
920 struct tel_sim_opl_list {
922 struct tel_sim_opl opl[SIM_OPL_PNN_RECORD_CNT_MAX];
926 unsigned char full_name[SIM_NW_FULL_NAME_LEN_MAX + 1];
927 unsigned char short_name[SIM_NW_FULL_NAME_LEN_MAX + 1];
930 struct tel_sim_pnn_list {
932 struct tel_sim_pnn pnn[SIM_OPL_PNN_RECORD_CNT_MAX];
935 struct tel_sim_cphs_netname {
936 unsigned char full_name[SIM_CPHS_OPERATOR_NAME_LEN_MAX+1];
937 unsigned char short_name[SIM_CPHS_OPERATOR_NAME_SHORT_FORM_LEN_MAX+1];
940 struct tel_sim_oplmnwact {
941 unsigned char plmn[6+1];
946 struct tel_sim_oplmnwact_list {
948 struct tel_sim_oplmnwact opwa[SIM_OPLMNWACT_LEN_MAX];
951 struct tresp_sim_read {
952 enum tel_sim_access_result result;
954 struct tel_sim_ecc_list ecc;
955 struct tel_sim_language language;
956 struct tel_sim_iccid iccid;
957 struct tel_sim_mailbox mb;
958 struct tel_sim_callforwarding cf;
959 struct tel_sim_messagewaiting mw;
960 struct tel_sim_cphs_info cphs;
961 struct tel_sim_msisdn_list msisdn_list;
962 struct tel_sim_spn spn;
963 struct tel_sim_spdi spdi;
964 struct tel_sim_opl_list opl;
965 struct tel_sim_pnn_list pnn;
966 struct tel_sim_cphs_netname cphs_net;
967 struct tel_sim_oplmnwact_list opwa;
971 struct tresp_sim_req_authentication {
972 enum tel_sim_access_result result;
973 enum tel_sim_auth_type auth_type; /**< authentication type */
974 enum tel_sim_auth_result auth_result; /**< authentication result */
975 unsigned int resp_length; /**< response length. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
976 char resp_data[SIM_AUTH_RESP_DATA_LEN_MAX + 1]; /**< response data. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
977 unsigned int authentication_key_length; /**< the length of authentication key, Kc*/
978 char authentication_key[SIM_AUTH_RESP_DATA_LEN_MAX + 1]; /**< the data of of authentication key, Kc*/
979 unsigned int cipher_length; /**< the length of cipher key length */
980 char cipher_data[SIM_AUTH_RESP_DATA_LEN_MAX + 1]; /**< cipher key */
981 unsigned int integrity_length; /**< the length of integrity key length */
982 char integrity_data[SIM_AUTH_RESP_DATA_LEN_MAX + 1]; /**< integrity key */
985 struct tnoti_sim_status {
986 enum tel_sim_status sim_status;