summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sim/card_fs_sim.c216
-rw-r--r--src/sim/card_fs_usim.c283
-rw-r--r--src/sim/gsm_int.h11
3 files changed, 335 insertions, 175 deletions
diff --git a/src/sim/card_fs_sim.c b/src/sim/card_fs_sim.c
index df6e4e63..ee8dd749 100644
--- a/src/sim/card_fs_sim.c
+++ b/src/sim/card_fs_sim.c
@@ -1,6 +1,6 @@
/* classic SIM card specific structures/routines */
/*
- * (C) 2012 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2012-2014 by Harald Welte <laforge@gnumonks.org>
*
* All Rights Reserved
*
@@ -29,7 +29,7 @@
#include "sim_int.h"
-/* TS 11.11 / Chapter 9.4 */
+/* 3GPP TS 51.011 / Chapter 9.4 */
static const struct osim_card_sw ts11_11_sw[] = {
{
0x9000, 0xffff, SW_TYPE_STR, SW_CLS_OK,
@@ -62,6 +62,9 @@ static const struct osim_card_sw ts11_11_sw[] = {
0x9404, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Referencing management - file ID not found / pattern not found",
}, {
+ 0x9408, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
+ .u.str = "Referencing management - file is inconsistent with the command",
+ }, {
0x9802, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - no CHV initialized",
}, {
@@ -241,138 +244,191 @@ int gsm_hpplmn_decode(struct osim_decoded_data *dd,
return 0;
}
-/* Chapter 10.2.x */
+/* Chapter 10.1. Contents of the EFs at the MF level */
static const struct osim_file_desc sim_ef_in_mf[] = {
- EF_TRANSP(0x2FE2, "EF.ICCID", 0,
+ EF_TRANSP(0x2FE2, SFI_NONE, "EF.ICCID", 0, 10, 10,
"ICC Identification", &iccid_decode, NULL),
- EF_TRANSP(0x2F05, "EF.ELP", F_OPTIONAL,
- "Extended language preference", &elp_decode, NULL),
+ EF_TRANSP(0x2F05, SFI_NONE, "EF.PL", F_OPTIONAL, 2, 20,
+ "Preferred language", &elp_decode, NULL),
};
-/* Chapter 10.3.x */
-static const struct osim_file_desc sim_ef_in_gsm[] = {
- EF_TRANSP(0x6F05, "EF.LP", 0,
+/* Chapter 10.3.x Contents of files at the GSM application level */
+const struct osim_file_desc sim_ef_in_gsm[] = {
+ EF_TRANSP(0x6F05, SFI_NONE, "EF.LP", 0, 1, 16,
"Language preference", &gsm_lp_decode, NULL),
- EF_TRANSP(0x6F07, "EF.IMSI", 0,
+ EF_TRANSP(0x6F07, SFI_NONE, "EF.IMSI", 0, 9, 9,
"IMSI", &gsm_imsi_decode, NULL),
- EF_TRANSP(0x6F20, "EF.Kc", 0,
+ EF_TRANSP(0x6F20, SFI_NONE, "EF.Kc", 0, 9, 9,
"Ciphering key Kc", &gsm_kc_decode, NULL),
- EF_TRANSP(0x6F30, "EF.PLMNsel", F_OPTIONAL,
+ EF_TRANSP(0x6F30, SFI_NONE, "EF.PLMNsel", F_OPTIONAL, 24, 72,
"PLMN selector", &gsm_plmnsel_decode, NULL),
- EF_TRANSP(0x6F31, "EF.HPPLMN", 0,
+ EF_TRANSP(0x6F31, SFI_NONE, "EF.HPPLMN", 0, 1, 1,
"Higher Priority PLMN search period", &gsm_hpplmn_decode, NULL),
- EF_TRANSP_N(0x6F37, "EF.ACMmax", F_OPTIONAL,
+ EF_TRANSP_N(0x6F37, SFI_NONE, "EF.ACMmax", F_OPTIONAL, 3, 3,
"ACM maximum value"),
- EF_TRANSP_N(0x6F38, "EF.SST", 0,
+ EF_TRANSP_N(0x6F38, SFI_NONE, "EF.SST", 0, 2, 16,
"SIM service table"),
- EF_CYCLIC_N(0x6F39, "EF.ACM", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F39, SFI_NONE, "EF.ACM", F_OPTIONAL, 3, 3,
"Accumulated call meter"),
- EF_TRANSP_N(0x6F3E, "EF.GID1", F_OPTIONAL,
+ EF_TRANSP_N(0x6F3E, SFI_NONE, "EF.GID1", F_OPTIONAL, 1, 8,
"Group Identifier Level 1"),
- EF_TRANSP_N(0x6F3F, "EF.GID2", F_OPTIONAL,
+ EF_TRANSP_N(0x6F3F, SFI_NONE, "EF.GID2", F_OPTIONAL, 1, 8,
"Group Identifier Level 2"),
- EF_TRANSP_N(0x6F46, "EF.SPN", F_OPTIONAL,
+ EF_TRANSP_N(0x6F46, SFI_NONE, "EF.SPN", F_OPTIONAL, 17, 17,
"Service Provider Name"),
- EF_TRANSP_N(0x6F41, "EF.PUCT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F41, SFI_NONE, "EF.PUCT", F_OPTIONAL, 5, 5,
"Price per unit and currency table"),
- EF_TRANSP_N(0x6F45, "EF.CBMI", F_OPTIONAL,
+ EF_TRANSP_N(0x6F45, SFI_NONE, "EF.CBMI", F_OPTIONAL, 2, 32,
"Cell broadcast massage identifier selection"),
- EF_TRANSP_N(0x6F74, "EF.BCCH", 0,
+ EF_TRANSP_N(0x6F74, SFI_NONE, "EF.BCCH", 0, 16, 16,
"Broadcast control channels"),
- EF_TRANSP_N(0x6F78, "EF.ACC", 0,
+ EF_TRANSP_N(0x6F78, SFI_NONE, "EF.ACC", 0, 2, 2,
"Access control class"),
- EF_TRANSP_N(0x6F7B, "EF.FPLMN", 0,
+ EF_TRANSP_N(0x6F7B, SFI_NONE, "EF.FPLMN", 0, 12, 12,
"Forbidden PLMNs"),
- EF_TRANSP_N(0x6F7E, "EF.LOCI", 0,
+ EF_TRANSP_N(0x6F7E, SFI_NONE, "EF.LOCI", 0, 11, 11,
"Location information"),
- EF_TRANSP_N(0x6FAD, "EF.AD", 0,
+ EF_TRANSP_N(0x6FAD, SFI_NONE, "EF.AD", 0, 3, 8,
"Administrative data"),
- EF_TRANSP_N(0x6FAE, "EF.Phase", 0,
+ EF_TRANSP_N(0x6FAE, SFI_NONE, "EF.Phase", 0, 1, 1,
"Phase identification"),
- EF_TRANSP_N(0x6FB1, "EF.VGCS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB1, SFI_NONE, "EF.VGCS", F_OPTIONAL, 4, 80,
"Voice Group Call Service"),
- EF_TRANSP_N(0x6FB2, "EF.VGCSS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB2, SFI_NONE, "EF.VGCSS", F_OPTIONAL, 7, 7,
"Voice Group Call Service Status"),
- EF_TRANSP_N(0x6FB3, "EF.VBS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB3, SFI_NONE, "EF.VBS", F_OPTIONAL, 4, 80,
"Voice Broadcast Service"),
- EF_TRANSP_N(0x6FB4, "EF.VBSS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB4, SFI_NONE, "EF.VBSS", F_OPTIONAL, 7, 7,
"Voice Broadcast Service Status"),
- EF_TRANSP_N(0x6FB5, "EF.eMLPP", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB5, SFI_NONE, "EF.eMLPP", F_OPTIONAL, 2, 2,
"enhanced Mult Level Pre-emption and Priority"),
- EF_TRANSP_N(0x6FB6, "EF.AAeM", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB6, SFI_NONE, "EF.AAeM", F_OPTIONAL, 1, 1,
"Automatic Answer for eMLPP Service"),
- EF_TRANSP_N(0x6F48, "EF.CBMID", F_OPTIONAL,
+ EF_TRANSP_N(0x6F48, SFI_NONE, "EF.CBMID", F_OPTIONAL, 2, 32,
"Cell Broadcast Message Identifier for Data Download"),
- EF_TRANSP_N(0x6FB7, "EF.ECC", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB7, SFI_NONE, "EF.ECC", F_OPTIONAL, 3, 15,
"Emergency Call Code"),
- EF_TRANSP_N(0x6F50, "EF.CBMIR", F_OPTIONAL,
+ EF_TRANSP_N(0x6F50, SFI_NONE, "EF.CBMIR", F_OPTIONAL, 4, 64,
"Cell broadcast message identifier range selection"),
- EF_TRANSP_N(0x6F2C, "EF.DCK", F_OPTIONAL,
+ EF_TRANSP_N(0x6F2C, SFI_NONE, "EF.DCK", F_OPTIONAL, 16, 16,
"De-personalization Control Keys"),
- EF_TRANSP_N(0x6F32, "EF.CNL", F_OPTIONAL,
+ EF_TRANSP_N(0x6F32, SFI_NONE, "EF.CNL", F_OPTIONAL, 6, 60,
"Co-operative Network List"),
- EF_LIN_FIX_N(0x6F51, "EF.NIA", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F51, SFI_NONE, "EF.NIA", F_OPTIONAL, 1, 17,
"Network's Indication of Alerting"),
- EF_TRANSP_N(0x6F52, "EF.KcGPRS", F_OPTIONAL,
+ EF_TRANSP_N(0x6F52, SFI_NONE, "EF.KcGPRS", F_OPTIONAL, 9, 9,
"GPRS Ciphering key KcGPRS"),
- EF_TRANSP_N(0x6F53, "EF.LOCIGPRS", F_OPTIONAL,
+ EF_TRANSP_N(0x6F53, SFI_NONE, "EF.LOCIGPRS", F_OPTIONAL, 14, 14,
"GPRS location information"),
- EF_TRANSP_N(0x6F54, "EF.SUME", F_OPTIONAL,
+ EF_TRANSP_N(0x6F54, SFI_NONE, "EF.SUME", F_OPTIONAL, 1, 64,
"SetUpMenu Elements"),
- EF_TRANSP_N(0x6F60, "EF.PLMNwAcT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F60, SFI_NONE, "EF.PLMNwAcT", F_OPTIONAL, 40, 80,
"User controlled PLMN Selector with Access Technology"),
- EF_TRANSP_N(0x6F61, "EF.OPLMNwAcT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F61, SFI_NONE, "EF.OPLMNwAcT", F_OPTIONAL, 40, 80,
"Operator controlled PLMN Selector with Access Technology"),
- EF_TRANSP_N(0x6F62, "EF.HPLMNwAcT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F62, SFI_NONE, "EF.HPLMNwAcT", F_OPTIONAL, 5, 20,
"HPLMN Selector with Access Technology"),
- EF_TRANSP_N(0x6F63, "EF.CPBCCH", F_OPTIONAL,
+ EF_TRANSP_N(0x6F63, SFI_NONE, "EF.CPBCCH", F_OPTIONAL, 2, 20,
"CPBCCH Information"),
- EF_TRANSP_N(0x6F64, "EF.InvScan", F_OPTIONAL,
+ EF_TRANSP_N(0x6F64, SFI_NONE, "EF.InvScan", F_OPTIONAL, 1, 1,
"Investigation Scan"),
+ EF_LIN_FIX_N(0x6FC5, SFI_NONE, "EF.PNN", F_OPTIONAL, 3, 20,
+ "PLMN Network Name"),
+ EF_LIN_FIX_N(0x6FC6, SFI_NONE, "EF.OPL", F_OPTIONAL, 8, 8,
+ "PLMN Operator PLMN List"),
+ EF_LIN_FIX_N(0x6FC7, SFI_NONE, "EF.MBDN", F_OPTIONAL, 14, 30,
+ "Mailbox Dialling Number"),
+ EF_LIN_FIX_N(0x6FC9, SFI_NONE, "EF.MBI", F_OPTIONAL, 4, 4,
+ "Maibox Identifier"),
+ EF_LIN_FIX_N(0x6FCA, SFI_NONE, "EF.MWIS", F_OPTIONAL, 5, 5,
+ "Message Waiting Indication Status"),
+ EF_LIN_FIX_N(0x6FCB, SFI_NONE, "EF.CFIS", F_OPTIONAL, 16, 16,
+ "Call Forwarding Indication Status"),
+ EF_LIN_FIX_N(0x6FC8, SFI_NONE, "EF.EXT6", F_OPTIONAL, 13, 13,
+ "Extension6 (MBDN)"),
+ EF_LIN_FIX_N(0x6FCC, SFI_NONE, "EF.EXT7", F_OPTIONAL, 13, 13,
+ "Extension7 (CFIS)"),
+ EF_TRANSP_N(0x6FCD, SFI_NONE, "EF.SPDI", F_OPTIONAL, 1, 32,
+ "Extension7 (CFIS)"),
+ EF_LIN_FIX_N(0x6FCE, SFI_NONE, "EF.MMSN", F_OPTIONAL, 4, 32,
+ "MMS Notification"),
+ EF_LIN_FIX_N(0x6FCF, SFI_NONE, "EF.EXT8", F_OPTIONAL, 2, 18,
+ "Extension8 (MMSN)"),
+ EF_TRANSP_N(0x6FD0, SFI_NONE, "EF.MMSICP", F_OPTIONAL, 1, 64,
+ "MMS Issuer Connectivity Parameters"),
+ EF_LIN_FIX_N(0x6FD1, SFI_NONE, "EF.MMSUP", F_OPTIONAL, 1, 64,
+ "MMS User Preferences"),
+ EF_TRANSP_N(0x6FD2, SFI_NONE, "EF.MMSUCP", F_OPTIONAL, 1, 64,
+ "MMS User Connectivity Parameters"),
+};
+const size_t sim_ef_in_gsm_num = ARRAY_SIZE(sim_ef_in_gsm);
+
+/* 10.4.1 Contents of the files at the SoLSA level */
+static const struct osim_file_desc sim_ef_in_solsa[] = {
+ EF_TRANSP_N(0x4F30, SFI_NONE, "EF.SAI", F_OPTIONAL, 1, 32,
+ "SoLSA Access Indicator"),
+ EF_LIN_FIX_N(0x4F31, SFI_NONE, "EF.SLL", F_OPTIONAL, 1, 32,
+ "SoLSA LSA List"),
+ /* LSA Descriptor files */
+};
+
+/* 10.4.2 Contents of files at the MExE level */
+static const struct osim_file_desc sim_ef_in_mexe[] = {
+ EF_TRANSP_N(0x4F40, SFI_NONE, "EF.MExE-ST", F_OPTIONAL, 1, 8,
+ "MExE Service table"),
+ EF_LIN_FIX_N(0x4F41, SFI_NONE, "EF.ORPK", F_OPTIONAL, 11, 32,
+ "Operator Root Public Key"),
+ EF_LIN_FIX_N(0x4F42, SFI_NONE, "EF.ARPK", F_OPTIONAL, 11, 32,
+ "Administrator Root Public Key"),
+ EF_LIN_FIX_N(0x4F43, SFI_NONE, "EF.TRPK", F_OPTIONAL, 11, 32,
+ "Third Party Root Public Key"),
};
-/* 10.5. */
-static const struct osim_file_desc sim_ef_in_telecom[] = {
- EF_LIN_FIX_N(0x6F3A, "EF.ADN", F_OPTIONAL,
+/* 10.5 Contents of files at the telecom level */
+const struct osim_file_desc sim_ef_in_telecom[] = {
+ EF_LIN_FIX_N(0x6F3A, SFI_NONE, "EF.ADN", F_OPTIONAL, 14, 30,
"Abbreviated dialling numbers"),
- EF_LIN_FIX_N(0x6F3B, "EF.FDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F3B, SFI_NONE, "EF.FDN", F_OPTIONAL, 14, 30,
"Fixed dialling numbers"),
- EF_LIN_FIX_N(0x6F3C, "EF.SMS", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F3C, SFI_NONE, "EF.SMS", F_OPTIONAL, 176, 176,
"Short messages"),
- EF_LIN_FIX_N(0x6F3D, "EF.CCP", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F3D, SFI_NONE, "EF.CCP", F_OPTIONAL, 14, 14,
"Capability configuration parameters"),
- EF_LIN_FIX_N(0x6F4F, "EF.ECCP", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4F, SFI_NONE, "EF.ECCP", F_OPTIONAL, 15, 15,
"Extended Capability configuration parameters"),
- EF_LIN_FIX_N(0x6F40, "EF.MSISDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F40, SFI_NONE, "EF.MSISDN", F_OPTIONAL, 14, 30,
"MSISDN"),
- EF_LIN_FIX_N(0x6F42, "EF.SMSP", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F42, SFI_NONE, "EF.SMSP", F_OPTIONAL, 28, 44,
"Short message service parameters"),
- EF_TRANSP_N(0x6F43, "EF.SMSS", F_OPTIONAL,
+ EF_TRANSP_N(0x6F43, SFI_NONE, "EF.SMSS", F_OPTIONAL, 2, 3,
"SMS Status"),
- EF_CYCLIC_N(0x6F44, "EF.LND", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F44, SFI_NONE, "EF.LND", F_OPTIONAL, 14, 30,
"Last number dialled"),
- EF_LIN_FIX_N(0x6F4A, "EF.EXT1", F_OPTIONAL,
- "Extension 1"),
- EF_LIN_FIX_N(0x6F4B, "EF.EXT2", F_OPTIONAL,
- "Extension 2"),
- EF_LIN_FIX_N(0x6F4C, "EF.EXT3", F_OPTIONAL,
- "Extension 3"),
- EF_LIN_FIX_N(0x6F4D, "EF.BDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F49, SFI_NONE, "EF.SDN", F_OPTIONAL, 14, 30,
+ "Service Dialling Numbers"),
+ EF_LIN_FIX_N(0x6F4A, SFI_NONE, "EF.EXT1", F_OPTIONAL, 13, 13,
+ "Extension 1 (ADN/SSC, MSISDN, LND)"),
+ EF_LIN_FIX_N(0x6F4B, SFI_NONE, "EF.EXT2", F_OPTIONAL, 13, 13,
+ "Extension 2 (FDN/SSC)"),
+ EF_LIN_FIX_N(0x6F4C, SFI_NONE, "EF.EXT3", F_OPTIONAL, 13, 13,
+ "Extension 3 (SDN)"),
+ EF_LIN_FIX_N(0x6F4D, SFI_NONE, "EF.BDN", F_OPTIONAL, 15, 31,
"Barred dialling numbers"),
- EF_LIN_FIX_N(0x6F4E, "EF.EXT4", F_OPTIONAL,
- "Extension 4"),
- EF_LIN_FIX_N(0x6F47, "EF.SMSR", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4E, SFI_NONE, "EF.EXT4", F_OPTIONAL, 13, 13,
+ "Extension 4 (BDN/SSC)"),
+ EF_LIN_FIX_N(0x6F47, SFI_NONE, "EF.SMSR", F_OPTIONAL, 30, 30,
"Short message status reports"),
- EF_LIN_FIX_N(0x6F58, "EF.CMI", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F58, SFI_NONE, "EF.CMI", F_OPTIONAL, 1, 17,
"Comparison Method Information"),
};
+const size_t sim_ef_in_telecom_num = ARRAY_SIZE(sim_ef_in_telecom);
-
-/* 10.6. */
-static const struct osim_file_desc sim_ef_in_graphics[] = {
- EF_LIN_FIX_N(0x4F20, "EF.IMG", F_OPTIONAL,
+/* 10.6.1 Contents of files at the telecom graphics level */
+const struct osim_file_desc sim_ef_in_graphics[] = {
+ EF_LIN_FIX_N(0x4F20, SFI_NONE, "EF.IMG", F_OPTIONAL, 11, 38,
"Image"),
};
+const size_t sim_ef_in_graphics_num = ARRAY_SIZE(sim_ef_in_graphics);
struct osim_card_profile *osim_cprof_sim(void *ctx)
{
@@ -387,20 +443,28 @@ struct osim_card_profile *osim_cprof_sim(void *ctx)
cprof->mf = mf;
+ /* According to Figure 8 */
add_filedesc(mf, sim_ef_in_mf, ARRAY_SIZE(sim_ef_in_mf));
gsm = add_df_with_ef(mf, 0x7F20, "DF.GSM", sim_ef_in_gsm,
ARRAY_SIZE(sim_ef_in_gsm));
+ /* Chapter 10.2: DFs at the GSM Application Level */
add_df_with_ef(gsm, 0x5F30, "DF.IRIDIUM", NULL, 0);
- add_df_with_ef(gsm, 0x5F31, "DF.GLOBST", NULL, 0);
+ add_df_with_ef(gsm, 0x5F31, "DF.GLOBALSTAR", NULL, 0);
add_df_with_ef(gsm, 0x5F32, "DF.ICO", NULL, 0);
add_df_with_ef(gsm, 0x5F33, "DF.ACeS", NULL, 0);
- add_df_with_ef(gsm, 0x5F40, "DF.ACeS", NULL, 0);
+ add_df_with_ef(gsm, 0x5F3C, "DF.MExE", sim_ef_in_mexe,
+ ARRAY_SIZE(sim_ef_in_mexe));
+ add_df_with_ef(gsm, 0x5F40, "DF.EIA/TIA-533", NULL, 0);
add_df_with_ef(gsm, 0x5F60, "DF.CTS", NULL, 0);
- add_df_with_ef(gsm, 0x5F70, "DF.SoLSA", NULL, 0);
+ add_df_with_ef(gsm, 0x5F70, "DF.SoLSA", sim_ef_in_solsa,
+ ARRAY_SIZE(sim_ef_in_solsa));
+
tc = add_df_with_ef(mf, 0x7F10, "DF.TELECOM", sim_ef_in_telecom,
ARRAY_SIZE(sim_ef_in_telecom));
add_df_with_ef(tc, 0x5F50, "DF.GRAPHICS", sim_ef_in_graphics,
ARRAY_SIZE(sim_ef_in_graphics));
+ add_df_with_ef(mf, 0x7F22, "DF.IS-41", NULL, 0);
+ add_df_with_ef(mf, 0x7F23, "DF.FP-CTS", NULL, 0); /* TS 11.19 */
return cprof;
}
diff --git a/src/sim/card_fs_usim.c b/src/sim/card_fs_usim.c
index 5a351b82..e16ad7bf 100644
--- a/src/sim/card_fs_usim.c
+++ b/src/sim/card_fs_usim.c
@@ -1,6 +1,6 @@
/* 3GPP USIM specific structures / routines */
/*
- * (C) 2012 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2012-2014 by Harald Welte <laforge@gnumonks.org>
*
* All Rights Reserved
*
@@ -31,7 +31,7 @@
#include "sim_int.h"
#include "gsm_int.h"
-/* TS 31.102 Version 7.7.0 / Chapoter 7.3 */
+/* TS 31.102 Version 7.7.0 / Chapter 7.3 */
const struct osim_card_sw ts31_102_sw[] = {
{
0x9862, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
@@ -67,200 +67,278 @@ static int default_decode(struct osim_decoded_data *dd,
/* TS 102 221 Chapter 13.1 */
static const struct osim_file_desc uicc_ef_in_mf[] = {
- EF_LIN_FIX_N(0x2f00, "EF.DIR", 0,
+ EF_LIN_FIX_N(0x2f00, SFI_NONE, "EF.DIR", 0, 1, 32,
"Application directory"),
- EF_TRANSP_N(0x2FE2, "EF.ICCID", 0,
+ EF_TRANSP_N(0x2FE2, SFI_NONE, "EF.ICCID", 0, 10, 10,
"ICC Identification"),
- EF_TRANSP_N(0x2F05, "EF.PL", 0,
+ EF_TRANSP_N(0x2F05, SFI_NONE, "EF.PL", 0, 2, 20,
"Preferred Languages"),
- EF_LIN_FIX_N(0x2F06, "EF.ARR", F_OPTIONAL,
+ EF_LIN_FIX_N(0x2F06, SFI_NONE, "EF.ARR", F_OPTIONAL, 1, 256,
"Access Rule Reference"),
};
+/* 31.102 Chapter 4.4.3 */
static const struct osim_file_desc usim_ef_in_df_gsm_access[] = {
- EF_TRANSP_N(0x4f20, "EF.Kc", 0,
+ EF_TRANSP_N(0x4f20, 0x01, "EF.Kc", 0, 9, 9,
"Ciphering Key Kc"),
- EF_TRANSP_N(0x4f52, "EF.KcGPRS", 0,
+ EF_TRANSP_N(0x4f52, 0x02, "EF.KcGPRS", F_OPTIONAL, 9, 9,
"GPRS Ciphering key KcGPRS"),
- EF_TRANSP_N(0x4f63, "EF.CPBCCH", F_OPTIONAL,
+ EF_TRANSP_N(0x4f63, SFI_NONE, "EF.CPBCCH", F_OPTIONAL, 2, 20,
"CPBCCH Information"),
- EF_TRANSP_N(0x4f64, "EF.invSCAN", F_OPTIONAL,
+ EF_TRANSP_N(0x4f64, SFI_NONE, "EF.invSCAN", F_OPTIONAL, 1, 1,
"Investigation Scan"),
};
/* 31.102 Chapter 4.2 */
static const struct osim_file_desc usim_ef_in_adf_usim[] = {
- EF_TRANSP(0x6F05, "EF.LI", 0,
+ EF_TRANSP(0x6F05, 0x02, "EF.LI", 0, 2, 16,
"Language Indication", &gsm_lp_decode, NULL),
- EF_TRANSP(0x6F07, "EF.IMSI", 0,
+ EF_TRANSP(0x6F07, 0x07, "EF.IMSI", 0, 9, 9,
"IMSI", &gsm_imsi_decode, NULL),
- EF_TRANSP_N(0x6F08, "EF.Keys", 0,
+ EF_TRANSP_N(0x6F08, 0x08, "EF.Keys", 0, 33, 33,
"Ciphering and Integrity Keys"),
- EF_TRANSP_N(0x6F09, "EF.KeysPS", 0,
+ EF_TRANSP_N(0x6F09, 0x09, "EF.KeysPS", 0, 33, 33,
"Ciphering and Integrity Keys for Packet Switched domain"),
- EF_TRANSP_N(0x6F60, "EF.PLMNwAcT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F60, 0x0A, "EF.PLMNwAcT", F_OPTIONAL, 40, 80,
"User controlled PLMN Selector with Access Technology"),
- EF_TRANSP(0x6F31, "EF.HPPLMN", 0,
+ EF_TRANSP(0x6F31, 0x12, "EF.HPPLMN", 0, 1, 1,
"Higher Priority PLMN search period", &gsm_hpplmn_decode, NULL),
- EF_TRANSP_N(0x6F37, "EF.ACMmax", F_OPTIONAL,
+ EF_TRANSP_N(0x6F37, SFI_NONE, "EF.ACMmax", F_OPTIONAL, 3, 3,
"ACM maximum value"),
- EF_TRANSP_N(0x6F38, "EF.UST", 0,
+ EF_TRANSP_N(0x6F38, 0x04, "EF.UST", 0, 1, 16,
"USIM Service Table"),
- EF_CYCLIC_N(0x6F39, "EF.ACM", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F39, SFI_NONE, "EF.ACM", F_OPTIONAL, 3, 3,
"Accumulated call meter"),
- EF_TRANSP_N(0x6F3E, "EF.GID1", F_OPTIONAL,
+ EF_TRANSP_N(0x6F3E, SFI_NONE, "EF.GID1", F_OPTIONAL, 1, 4,
"Group Identifier Level 1"),
- EF_TRANSP_N(0x6F3F, "EF.GID2", F_OPTIONAL,
+ EF_TRANSP_N(0x6F3F, SFI_NONE, "EF.GID2", F_OPTIONAL, 1, 4,
"Group Identifier Level 2"),
- EF_TRANSP_N(0x6F46, "EF.SPN", F_OPTIONAL,
+ EF_TRANSP_N(0x6F46, SFI_NONE, "EF.SPN", F_OPTIONAL, 17, 17,
"Service Provider Name"),
- EF_TRANSP_N(0x6F41, "EF.PUCT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F41, SFI_NONE, "EF.PUCT", F_OPTIONAL, 5, 5,
"Price per unit and currency table"),
- EF_TRANSP_N(0x6F45, "EF.CBMI", F_OPTIONAL,
+ EF_TRANSP_N(0x6F45, SFI_NONE, "EF.CBMI", F_OPTIONAL, 2, 32,
"Cell broadcast massage identifier selection"),
- EF_TRANSP_N(0x6F78, "EF.ACC", 0,
+ EF_TRANSP_N(0x6F78, 0x06, "EF.ACC", 0, 2, 2,
"Access control class"),
- EF_TRANSP_N(0x6F7B, "EF.FPLMN", 0,
+ EF_TRANSP_N(0x6F7B, 0x0D, "EF.FPLMN", 0, 12, 36,
"Forbidden PLMNs"),
- EF_TRANSP_N(0x6F7E, "EF.LOCI", 0,
+ EF_TRANSP_N(0x6F7E, 0x0B, "EF.LOCI", 0, 11, 11,
"Location information"),
- EF_TRANSP_N(0x6FAD, "EF.AD", 0,
+ EF_TRANSP_N(0x6FAD, 0x03, "EF.AD", 0, 5, 16,
"Administrative data"),
- EF_TRANSP_N(0x6F48, "EF.CBMID", F_OPTIONAL,
+ EF_TRANSP_N(0x6F48, 0x0E, "EF.CBMID", F_OPTIONAL, 2, 32,
"Cell Broadcast Message Identifier for Data Download"),
- EF_TRANSP_N(0x6FB7, "EF.ECC", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB7, 0x01, "EF.ECC", F_OPTIONAL, 5, 32,
"Emergency Call Code"),
- EF_TRANSP_N(0x6F50, "EF.CBMIR", F_OPTIONAL,
+ EF_TRANSP_N(0x6F50, SFI_NONE, "EF.CBMIR", F_OPTIONAL, 4, 32,
"Cell broadcast message identifier range selection"),
- EF_TRANSP_N(0x6F73, "EF.PSLOCI", 0,
+ EF_TRANSP_N(0x6F73, 0x0C, "EF.PSLOCI", 0, 14, 14,
"Pacet Switched location information"),
- EF_LIN_FIX_N(0x6F3B, "EF.FDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F3B, SFI_NONE, "EF.FDN", F_OPTIONAL, 14, 32,
"Fixed dialling numbers"),
- EF_LIN_FIX_N(0x6F3C, "EF.SMS", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F3C, SFI_NONE, "EF.SMS", F_OPTIONAL, 176, 176,
"Short messages"),
- EF_LIN_FIX_N(0x6F40, "EF.MSISDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F40, SFI_NONE, "EF.MSISDN", F_OPTIONAL, 14, 32,
"MSISDN"),
- EF_LIN_FIX_N(0x6F42, "EF.SMSP", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F42, SFI_NONE, "EF.SMSP", F_OPTIONAL, 28, 64,
"Short message service parameters"),
- EF_TRANSP_N(0x6F43, "EF.SMSS", F_OPTIONAL,
+ EF_TRANSP_N(0x6F43, SFI_NONE, "EF.SMSS", F_OPTIONAL, 2, 8,
"SMS Status"),
- EF_LIN_FIX_N(0x6F49, "EF.SDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F49, SFI_NONE, "EF.SDN", F_OPTIONAL, 14, 32,
"Service Dialling Numbers"),
- EF_LIN_FIX_N(0x6F4B, "EF.EXT2", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4B, SFI_NONE, "EF.EXT2", F_OPTIONAL, 13, 13,
"Extension 2"),
- EF_LIN_FIX_N(0x6F4C, "EF.EXT3", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4C, SFI_NONE, "EF.EXT3", F_OPTIONAL, 13, 13,
"Extension 3"),
- EF_LIN_FIX_N(0x6F47, "EF.SMSR", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F47, SFI_NONE, "EF.SMSR", F_OPTIONAL, 30, 30,
"Short message status reports"),
- EF_CYCLIC_N(0x6F80, "EF.ICI", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F80, 0x14, "EF.ICI", F_OPTIONAL, 28, 64,
"Incoming Calling Information"),
- EF_CYCLIC_N(0x6F81, "EF.OCI", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F81, 0x15, "EF.OCI", F_OPTIONAL, 27, 64,
"Outgoing Calling Information"),
- EF_CYCLIC_N(0x6F82, "EF.ICT", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F82, SFI_NONE, "EF.ICT", F_OPTIONAL, 3, 3,
"Incoming Call Timer"),
- EF_CYCLIC_N(0x6F83, "EF.OCT", F_OPTIONAL,
+ EF_CYCLIC_N(0x6F83, SFI_NONE, "EF.OCT", F_OPTIONAL, 3, 3,
"Outgoing Call Timer"),
- EF_LIN_FIX_N(0x6F4E, "EF.EXT5", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4E, SFI_NONE, "EF.EXT5", F_OPTIONAL, 13, 13,
"Extension 5"),
- EF_LIN_FIX_N(0x6F4F, "EF.CCP2", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4F, 0x16, "EF.CCP2", F_OPTIONAL, 15, 32,
"Capability Configuration Parameters 2"),
- EF_TRANSP_N(0x6FB5, "EF.eMLPP", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB5, SFI_NONE, "EF.eMLPP", F_OPTIONAL, 2, 2,
"enhanced Multi Level Precedence and Pre-emption"),
- EF_TRANSP_N(0x6FB6, "EF.AAeM", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB6, SFI_NONE, "EF.AAeM", F_OPTIONAL, 1, 1,
"Automatic Answer for eMLPP Service"),
- EF_TRANSP_N(0x6FC3, "EF.Hiddenkey", F_OPTIONAL,
+ EF_TRANSP_N(0x6FC3, SFI_NONE, "EF.Hiddenkey", F_OPTIONAL, 4, 4,
"Key for hidden phone book entries"),
- EF_LIN_FIX_N(0x6F4D, "EF.BDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4D, SFI_NONE, "EF.BDN", F_OPTIONAL, 15, 32,
"Barred Dialling Numbers"),
- EF_LIN_FIX_N(0x6F4E, "EF.EXT4", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F4E, SFI_NONE, "EF.EXT4", F_OPTIONAL, 13, 13,
"Extension 4"),
- EF_LIN_FIX_N(0x6F58, "EF.CMI", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6F58, SFI_NONE, "EF.CMI", F_OPTIONAL, 2, 16,
"Comparison Method Information"),
- EF_TRANSP_N(0x6F56, "EF.EST", F_OPTIONAL,
+ EF_TRANSP_N(0x6F56, 0x05, "EF.EST", F_OPTIONAL, 1, 8,
"Enhanced Services Table"),
- EF_TRANSP_N(0x6F57, "EF.ACL", F_OPTIONAL,
+ EF_TRANSP_N(0x6F57, SFI_NONE, "EF.ACL", F_OPTIONAL, 2, 256,
"Access Point Name Control List"),
- EF_TRANSP_N(0x6F2C, "EF.DCK", F_OPTIONAL,
+ EF_TRANSP_N(0x6F2C, SFI_NONE, "EF.DCK", F_OPTIONAL, 16, 16,
"Depersonalisation Control Keys"),
- EF_TRANSP_N(0x6F32, "EF.CNL", F_OPTIONAL,
+ EF_TRANSP_N(0x6F32, SFI_NONE, "EF.CNL", F_OPTIONAL, 6, 46,
"Co-operative Network List"),
- EF_TRANSP_N(0x6F5B, "EF.START-HFN", 0,
+ EF_TRANSP_N(0x6F5B, 0x0F, "EF.START-HFN", 0, 6, 6,
"Initialisation values for Hyperframe number"),
- EF_TRANSP_N(0x6F5C, "EF.THRESHOLD", 0,
+ EF_TRANSP_N(0x6F5C, 0x10, "EF.THRESHOLD", 0, 3, 3,
"Maximum value of START"),
- EF_TRANSP_N(0x6F61, "EF.OPLMNwAcT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F61, 0x11, "EF.OPLMNwAcT", F_OPTIONAL, 40, 80,
"Operator controlled PLMN Selector with Access Technology"),
- EF_TRANSP_N(0x6F62, "EF.HPLMNwAcT", F_OPTIONAL,
+ EF_TRANSP_N(0x6F62, 0x13, "EF.HPLMNwAcT", F_OPTIONAL, 5, 30,
"HPLMN Selector with Access Technology"),
- EF_LIN_FIX_N(0x6F06, "EF.ARR", 0,
+ EF_LIN_FIX_N(0x6F06, 0x17, "EF.ARR", 0, 1, 256,
"Access Rule Reference"),
- EF_TRANSP_N(0x6FC4, "EF.NETPAR", 0,
+ EF_TRANSP_N(0x6FC4, SFI_NONE, "EF.NETPAR", 0, 46, 256,
"Network Parameters"),
- EF_LIN_FIX_N(0x6FC5, "EF.PNN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FC5, 0x19, "EF.PNN", F_OPTIONAL, 3, 128,
"PLMN Network Name"),
- EF_LIN_FIX_N(0x6FC6, "EF.OPL", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FC6, 0x1A, "EF.OPL", F_OPTIONAL, 8, 32,
"Operator PLMN List"),
- EF_LIN_FIX_N(0x6FC7, "EF.MBDN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FC7, SFI_NONE, "EF.MBDN", F_OPTIONAL, 14, 32,
"Mailbox Dialling Numbers"),
- EF_LIN_FIX_N(0x6FC8, "EF.EXT6", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FC8, SFI_NONE, "EF.EXT6", F_OPTIONAL, 13, 13,
"Extension 6"),
- EF_LIN_FIX_N(0x6FC9, "EF.MBI", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FC9, SFI_NONE, "EF.MBI", F_OPTIONAL, 4, 5,
"Mailbox Identifier"),
- EF_LIN_FIX_N(0x6FCA, "EF.MWIS", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FCA, SFI_NONE, "EF.MWIS", F_OPTIONAL, 5, 6,
"Message Waiting Indication Status"),
- EF_LIN_FIX_N(0x6FCB, "EF.CFIS", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FCB, SFI_NONE, "EF.CFIS", F_OPTIONAL, 16, 16,
"Call Forwarding Indication Status"),
- EF_LIN_FIX_N(0x6FCC, "EF.EXT7", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FCC, SFI_NONE, "EF.EXT7", F_OPTIONAL, 13, 13,
"Extension 7"),
- EF_TRANSP_N(0x6FCD, "EF.SPDI", F_OPTIONAL,
+ EF_TRANSP_N(0x6FCD, 0x1B, "EF.SPDI", F_OPTIONAL, 1, 64,
"Service Provider Display Information"),
- EF_LIN_FIX_N(0x6FCE, "EF.MMSN", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FCE, SFI_NONE, "EF.MMSN", F_OPTIONAL, 4, 32,
"MMS Notification"),
- EF_LIN_FIX_N(0x6FCF, "EF.EXT8", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FCF, SFI_NONE, "EF.EXT8", F_OPTIONAL, 3, 16,
"Extension 8"),
- EF_TRANSP_N(0x6FD0, "EF.MMSICP", F_OPTIONAL,
+ EF_TRANSP_N(0x6FD0, SFI_NONE, "EF.MMSICP", F_OPTIONAL, 3, 256,
"MMS Issuer Connectivity Parameters"),
- EF_LIN_FIX_N(0x6FD1, "EF.MMSUP", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FD1, SFI_NONE, "EF.MMSUP", F_OPTIONAL, 1, 64,
"MMS User Preferences"),
- EF_TRANSP_N(0x6FD2, "EF.MMSUCP", F_OPTIONAL,
+ EF_TRANSP_N(0x6FD2, SFI_NONE, "EF.MMSUCP", F_OPTIONAL, 1, 64,
"MMS User Connectivity Parameters"),
- EF_LIN_FIX_N(0x6FD3, "EF.NIA", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FD3, SFI_NONE, "EF.NIA", F_OPTIONAL, 2, 64,
"Network's Indication of Alerting"),
- EF_TRANSP_N(0x6FB1, "EF.VGCS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB1, SFI_NONE, "EF.VGCS", F_OPTIONAL, 4, 80,
"Voice Group Call Service"),
- EF_TRANSP_N(0x6FB2, "EF.VGCSS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB2, SFI_NONE, "EF.VGCSS", F_OPTIONAL, 7, 7,
"Voice Group Call Service Status"),
- EF_TRANSP_N(0x6FB3, "EF.VBS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB3, SFI_NONE, "EF.VBS", F_OPTIONAL, 4, 80,
"Voice Broadcast Service"),
- EF_TRANSP_N(0x6FB4, "EF.VBSS", F_OPTIONAL,
+ EF_TRANSP_N(0x6FB4, SFI_NONE, "EF.VBSS", F_OPTIONAL, 7, 7,
"Voice Broadcast Service Status"),
- EF_TRANSP_N(0x6FD4, "EF.VGCSCA", F_OPTIONAL,
+ EF_TRANSP_N(0x6FD4, SFI_NONE, "EF.VGCSCA", F_OPTIONAL, 2, 40,
"Voice Group Call Service Ciphering Algorithm"),
- EF_TRANSP_N(0x6FD5, "EF.VBSCA", F_OPTIONAL,
+ EF_TRANSP_N(0x6FD5, SFI_NONE, "EF.VBSCA", F_OPTIONAL, 2, 40,
"Voice Broadcast Service Ciphering Algorithm"),
- EF_TRANSP_N(0x6FD6, "EF.GBABP", F_OPTIONAL,
+ EF_TRANSP_N(0x6FD6, SFI_NONE, "EF.GBABP", F_OPTIONAL, 4, 128,
"GBA Bootstrapping parameters"),
- EF_LIN_FIX_N(0x6FD7, "EF.MSK", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FD7, SFI_NONE, "EF.MSK", F_OPTIONAL, 20, 84,
"MBMS Serviec Key List"),
- EF_LIN_FIX_N(0x6FD8, "EF.MUK", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FD8, SFI_NONE, "EF.MUK", F_OPTIONAL, 1, 128,
"MBMS User Key"),
- EF_LIN_FIX_N(0x6FDA, "EF.GBANL", F_OPTIONAL,
+ EF_LIN_FIX_N(0x6FDA, SFI_NONE, "EF.GBANL", F_OPTIONAL, 1, 128,
"GBA NAF List"),
- EF_TRANSP_N(0x6FD9, "EF.EHPLMN", F_OPTIONAL,
+ EF_TRANSP_N(0x6FD9, 0x1D, "EF.EHPLMN", F_OPTIONAL, 3, 30,
"Equivalent HPLMN"),
+ EF_TRANSP_N(0x6FDB, SFI_NONE, "EF.EHPLMNPI", F_OPTIONAL, 1, 1,
+ "Equivalent HPLMN Presentation Indication"),
+ EF_TRANSP_N(0x6FDC, SFI_NONE, "EF.LRPLMNSI", F_OPTIONAL, 1, 1,
+ "Last RPLMN Selection Indication"),
+ EF_LIN_FIX_N(0x6FDD, SFI_NONE, "EF.NAFKCA", F_OPTIONAL, 1, 128,
+ "NAF Key Centre Address"),
+ EF_TRANSP_N(0x6FDE, SFI_NONE, "EF.SPNI", F_OPTIONAL, 1, 128,
+ "Service Provider Name Icon"),
+ EF_LIN_FIX_N(0x6FDF, SFI_NONE, "EF.PNNI", F_OPTIONAL, 1, 128,
+ "PLMN Network Name Icon"),
+ EF_LIN_FIX_N(0x6FE2, SFI_NONE, "EF.NCP-IP", F_OPTIONAL, 2, 256,
+ "Network Connectivity Parameters for USIM IP Connections"),
+ EF_TRANSP_N(0x6FE3, 0x1E, "EF.EPSLOCI", F_OPTIONAL, 18, 18,
+ "EPS location information"),
+ EF_LIN_FIX_N(0x6FE4, 0x18, "EF.EPSNSC", F_OPTIONAL, 54, 128,
+ "EPS NAS Security Context"),
+ EF_TRANSP_N(0x6FE6, SFI_NONE, "EF.UFC", F_OPTIONAL, 1, 8,
+ "USAT Facility Control"),
+ EF_TRANSP_N(0x6FE8, SFI_NONE, "EF.NASCONFIG", F_OPTIONAL, 1, 128,
+ "Non Access Stratum Configuration"),
+ EF_LIN_FIX_N(0x6FE7, SFI_NONE, "EF.UICCIARI", F_OPTIONAL, 1, 32,
+ "UICC IARI"),
+ EF_TRANSP_N(0x6FEC, SFI_NONE, "EF.PWS", F_OPTIONAL, 1, 32,
+ "Public Warning System"),
};
/* 31.102 Chapter 4.4.1 */
static const struct osim_file_desc usim_ef_in_solsa[] = {
- EF_TRANSP_N(0x4F30, "EF.SAI", F_OPTIONAL,
+ EF_TRANSP_N(0x4F30, SFI_NONE, "EF.SAI", F_OPTIONAL, 2, 32,
"SoLSA Access Indicator"),
- EF_LIN_FIX_N(0x4F31, "EF.SLL", F_OPTIONAL,
+ EF_LIN_FIX_N(0x4F31, SFI_NONE, "EF.SLL", F_OPTIONAL, 11, 32,
"SoLSA LSA List"),
/* LSA descriptor files 4Fxx, hard to represent here */
};
+/* 31.102 Chapter 4.4.4 */
+static const struct osim_file_desc usim_ef_in_df_mexe[] = {
+ EF_TRANSP_N(0x4F40, SFI_NONE, "EF.MexE-ST", F_OPTIONAL, 1, 4,
+ "MexE Service table"),
+ EF_LIN_FIX_N(0x4F41, SFI_NONE, "EF.ORPK", F_OPTIONAL, 10, 16,
+ "Operator Root Public Key"),
+ EF_LIN_FIX_N(0x4F42, SFI_NONE, "EF.ARPK", F_OPTIONAL, 10, 16,
+ "Administrator Root Public Key"),
+ EF_LIN_FIX_N(0x4F43, SFI_NONE, "EF.TPRPK", F_OPTIONAL, 10, 16,
+ "Third Party Root Public Key"),
+ /* TKCDF files 4Fxx, hard to represent here */
+};
+
+/* 31.102 Chapter 4.4.5 */
+static const struct osim_file_desc usim_ef_in_df_wlan[] = {
+ EF_TRANSP_N(0x4F41, 0x01, "EF.Pseudo", F_OPTIONAL, 2, 16,
+ "Pseudonym"),
+ EF_TRANSP_N(0x4F42, 0x02, "EF.UPLMNWLAN", F_OPTIONAL, 30, 60,
+ "User controlled PLMN selector for I-WLAN Access"),
+ EF_TRANSP_N(0x4F43, 0x03, "EF.OPLMNWLAN", F_OPTIONAL, 30, 60,
+ "Operator controlled PLMN selector for I-WLAN Access"),
+ EF_LIN_FIX_N(0x4F44, 0x04, "EF.UWSIDL", F_OPTIONAL, 1, 16,
+ "User controlled WLAN Specific Identifier List"),
+ EF_LIN_FIX_N(0x4F45, 0x05, "EF.OWSIDL", F_OPTIONAL, 1, 16,
+ "Operator controlled WLAN Specific Identifier List"),
+ EF_TRANSP_N(0x4F46, 0x06, "EF.WRI", F_OPTIONAL, 1, 64,
+ "WLAN Reauthentication Identity"),
+ EF_LIN_FIX_N(0x4F47, 0x07, "EF.HWSIDL", F_OPTIONAL, 1, 16,
+ "Home I-WLAN Specific Identifier List"),
+ EF_TRANSP_N(0x4F48, 0x08, "EF.WEPLMNPI", F_OPTIONAL, 1, 1,
+ "I-WLAN Equivalent HPLMN Presentation Indication"),
+ EF_TRANSP_N(0x4F49, 0x09, "EF.WHPI", F_OPTIONAL, 1, 1,
+ "I-WLAN HPLMN Priority Indiation"),
+ EF_TRANSP_N(0x4F4A, 0x0a, "EF.WLRPLMN", F_OPTIONAL, 3, 3,
+ "I-WLAN Last Registered PLMN"),
+};
+
+/* 31.102 Chapter 4.4.6 */
+static const struct osim_file_desc usim_ef_in_df_hnb[] = {
+ EF_LIN_FIX_N(0x4F81, 0x01, "EF.ACSGL", F_OPTIONAL, 1, 128,
+ "Allowed CSG Lists"),
+ EF_LIN_FIX_N(0x4F82, 0x02, "EF.CSGT", F_OPTIONAL, 1, 64,
+ "CSG Type"),
+ EF_LIN_FIX_N(0x4F83, 0x03, "EF.HNBN", F_OPTIONAL, 1, 64,
+ "Home NodeB Name"),
+ EF_LIN_FIX_N(0x4F84, 0x04, "EF.OCSGL", F_OPTIONAL, 1, 64,
+ "Operator CSG List"),
+ EF_LIN_FIX_N(0x4F85, 0x05, "EF.OCSGT", F_OPTIONAL, 1, 64,
+ "Operator CSG Type"),
+ EF_LIN_FIX_N(0x4F86, 0x06, "EF.OHNBN", F_OPTIONAL, 1, 64,
+ "Oprator Home NodeB Name"),
+};
+
/* Annex E - TS 101 220 */
static const uint8_t adf_usim_aid[] = { 0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x02 };
@@ -289,22 +367,29 @@ struct osim_card_profile *osim_cprof_usim(void *ctx)
add_df_with_ef(uadf, 0x5F3A, "DF.PHONEBOOK", NULL, 0);
add_df_with_ef(uadf, 0x5F3B, "DF.GSM-ACCESS", usim_ef_in_df_gsm_access,
ARRAY_SIZE(usim_ef_in_df_gsm_access));
- add_df_with_ef(uadf, 0x5F3C, "DF.MExE", NULL, 0);
- add_df_with_ef(uadf, 0x5F40, "DF.WLAN", NULL, 0);
- add_df_with_ef(uadf, 0x5F70, "DF.SoLSA", usim_ef_in_solsa, ARRAY_SIZE(usim_ef_in_solsa));
+ add_df_with_ef(uadf, 0x5F3C, "DF.MexE", usim_ef_in_df_mexe,
+ ARRAY_SIZE(usim_ef_in_df_mexe));
+ add_df_with_ef(uadf, 0x5F40, "DF.WLAN", usim_ef_in_df_wlan,
+ ARRAY_SIZE(usim_ef_in_df_wlan));
+ /* Home-NodeB (femtocell) */
+ add_df_with_ef(uadf, 0x5F50, "DF.HNB", usim_ef_in_df_hnb,
+ ARRAY_SIZE(usim_ef_in_df_hnb));
+ /* Support of Localised Service Areas */
+ add_df_with_ef(uadf, 0x5F70, "DF.SoLSA", usim_ef_in_solsa,
+ ARRAY_SIZE(usim_ef_in_solsa));
+ /* OMA BCAST Smart Card Profile */
+ add_df_with_ef(uadf, 0x5F80, "DF.BCAST", NULL, 0);
-#if 0
/* DF.TELECOM as sub-directory of MF */
tc = add_df_with_ef(mf, 0x7F10, "DF.TELECOM", sim_ef_in_telecom,
- ARRAY_SIZE(sim_ef_in_telecom));
+ sim_ef_in_telecom_num);
add_df_with_ef(tc, 0x5F50, "DF.GRAPHICS", sim_ef_in_graphics,
- ARRAY_SIZE(sim_ef_in_graphics));
+ sim_ef_in_graphics_num);
/* DF.GSM for backwards compatibility */
gsm = add_df_with_ef(mf, 0x7F20, "DF.GSM", sim_ef_in_gsm,
- ARRAY_SIZE(sim_ef_in_gsm));
+ sim_ef_in_gsm_num);
/* FIXME: DF's below DF.GSM (51.011) */
-#endif
return cprof;
}
diff --git a/src/sim/gsm_int.h b/src/sim/gsm_int.h
index 3abb3e6f..c79a0be2 100644
--- a/src/sim/gsm_int.h
+++ b/src/sim/gsm_int.h
@@ -1,3 +1,14 @@
+#include <sys/types.h>
+#include <osmocom/sim/sim.h>
+
+const struct osim_file_desc *sim_ef_in_gsm;
+const size_t sim_ef_in_gsm_num;
+
+const struct osim_file_desc *sim_ef_in_graphics;
+const size_t sim_ef_in_graphics_num;
+
+const struct osim_file_desc *sim_ef_in_telecom;
+const size_t sim_ef_in_telecom_num;
int gsm_hpplmn_decode(struct osim_decoded_data *dd,
const struct osim_file_desc *desc,