Commit cc9a7397 authored by Gabriel's avatar Gabriel

[OAI-UE] changes for comm4innov tests: plmn/imsi/k key

parent 9bea08ab
Pipeline #3234 skipped with stage
......@@ -59,15 +59,16 @@ Description Defines a list of PLMN network operators
#define VDF3 9
#define VDF4 10
#define VDF5 11
//#define COM4INNOV 12
#define SELECTED_PLMN OAI_LTEBOX //SFR1
#define SELECTED_PLMN OAI_LTEBOX //COM4INNOV //SFR1
#define TEST_PLMN {0,0,0x0f,1,1,0} // 00101
#define SFR_PLMN_1 {0,2,0x0f,8,0,1} // 20810
#define SFR_PLMN_2 {0,2,0x0f,8,1,1} // 20811
#define SFR_PLMN_3 {0,2,0x0f,8,3,1} // 20813
#define OAI_LTEBOX_PLMN {0,2,0x0f,8,3,9} //20893
//#define OAI_LTEBOX_PLMN {0,2,0x0f,8,3,9} //20893
#define OAI_LTEBOX_PLMN {0,2,0x0f,8,2,9} // 20892 0000000313
#define TM_PLMN_1 {1,3,0,0,8,2} // 310280
#define FCT_PLMN_1 {1,3,8,0,2,0} // 310028
#define VDF_PLMN_1 {2,2,0x0f,2,0,1} // 22210
......@@ -75,6 +76,7 @@ Description Defines a list of PLMN network operators
#define VDF_PLMN_3 {1,2,0x0f,4,0x0f,6} // 2146
#define VDF_PLMN_4 {6,2,0x0f,2,0x0f,2} // 2622
#define VDF_PLMN_5 {6,2,0x0f,2,0x0f,4} // 2624
//#define COM4INNOV_PLMN {0,2,0x0f,8,3,9} // 20892 0000000313
/****************************************************************************/
......@@ -102,18 +104,19 @@ typedef struct {
* The list of PLMN network operator records
*/
network_record_t network_records[] = {
{00101, TEST_PLMN, "Test network", "OAI4G", 0x0001, 0xfffd},
{20810, SFR_PLMN_1, "SFR France", "SFR", 0x0001, 0xfffd},
{20811, SFR_PLMN_2, "SFR France", "SFR", 0x0001, 0xfffd},
{20813, SFR_PLMN_3, "SFR France", "SFR", 0x0001, 0xfffd},
{20893, OAI_LTEBOX_PLMN, "OAI LTEBOX", "OAIALU", 0x0001, 0xfffd},
{310280,TM_PLMN_1, "T-Mobile USA", "T-Mobile", 0x0001, 0xfffd},
{310028,FCT_PLMN_1, "FICTITIOUS USA", "FICTITIO", 0x0001, 0xfffd},
{22210, VDF_PLMN_1, "Vodafone Italia", "VODAFONE", 0x0001, 0xfffd},
{2141, VDF_PLMN_2, "Vodafone Spain", "VODAFONE", 0x0001, 0xfffd},
{2146, VDF_PLMN_3, "Vodafone Spain", "VODAFONE", 0x0001, 0xfffd},
{2622, VDF_PLMN_4, "Vodafone Germ", "VODAFONE", 0x0001, 0xfffd},
{2624, VDF_PLMN_5, "Vodafone Germ", "VODAFONE", 0x0001, 0xfffd},
{00101, TEST_PLMN, "Test network", "OAI4G", 0x0001, 0xfffd},
{20810, SFR_PLMN_1, "SFR France", "SFR", 0x0001, 0xfffd},
{20811, SFR_PLMN_2, "SFR France", "SFR", 0x0001, 0xfffd},
{20813, SFR_PLMN_3, "SFR France", "SFR", 0x0001, 0xfffd},
{20893, OAI_LTEBOX_PLMN, "OAI LTEBOX", "OAIALU", 0x0001, 0xfffd},
{310280,TM_PLMN_1, "T-Mobile USA", "T-Mobile", 0x0001, 0xfffd},
{310028,FCT_PLMN_1, "FICTITIOUS USA", "FICTITIO", 0x0001, 0xfffd},
{22210, VDF_PLMN_1, "Vodafone Italia", "VODAFONE", 0x0001, 0xfffd},
{2141, VDF_PLMN_2, "Vodafone Spain", "VODAFONE", 0x0001, 0xfffd},
{2146, VDF_PLMN_3, "Vodafone Spain", "VODAFONE", 0x0001, 0xfffd},
{2622, VDF_PLMN_4, "Vodafone Germ", "VODAFONE", 0x0001, 0xfffd},
{2624, VDF_PLMN_5, "Vodafone Germ", "VODAFONE", 0x0001, 0xfffd}
//{20892, COM4INNOV_PLMN, "Comm4Innov France","Comm4Innov", 0x0001, 0xfffd}
};
/****************************************************************************/
......
......@@ -348,6 +348,7 @@ static void _gen_emm_data(emm_nvdata_t* data)
data->rplmn.MNCdigit3 = 0xf;
#endif
#if (SELECTED_PLMN == OAI_LTEBOX)
#if 0
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 208 (France) + 93 (OAI) + 00001110
......@@ -376,6 +377,36 @@ static void _gen_emm_data(emm_nvdata_t* data)
data->rplmn.MNCdigit1 = 9;
data->rplmn.MNCdigit2 = 3;
data->rplmn.MNCdigit3 = 0xf;
#endif
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 208 (France) + 92 (Comm4Innov) + 0000000313
*/
data->imsi.length = 8;
data->imsi.u.num.parity = ODD_PARITY; // Type of identity = IMSI, even
data->imsi.u.num.digit1 = 2; // MCC digit 1
data->imsi.u.num.digit2 = 0; // MCC digit 2
data->imsi.u.num.digit3 = 8; // MCC digit 3
data->imsi.u.num.digit4 = 9; // MNC digit 1
data->imsi.u.num.digit5 = 2; // MNC digit 2
data->imsi.u.num.digit6 = 0;//0xF; // MNC digit 3
data->imsi.u.num.digit7 = 0;
data->imsi.u.num.digit8 = 0;
data->imsi.u.num.digit9 = 0;
data->imsi.u.num.digit10 = 0;
data->imsi.u.num.digit11 = 0;
data->imsi.u.num.digit12 = 0;
data->imsi.u.num.digit13 = 3;
data->imsi.u.num.digit14 = 1;
data->imsi.u.num.digit15 = 3;
data->rplmn.MCCdigit1 = 2;
data->rplmn.MCCdigit2 = 0;
data->rplmn.MCCdigit3 = 8;
data->rplmn.MNCdigit1 = 9;
data->rplmn.MNCdigit2 = 2;
data->rplmn.MNCdigit3 = 0xf;
#endif
#if (SELECTED_PLMN == TEST1)
/*
......@@ -410,6 +441,7 @@ static void _gen_emm_data(emm_nvdata_t* data)
data->rplmn.MNCdigit2 = 1;
data->rplmn.MNCdigit3 = 0xf;
#endif
/*
* List of Equivalent PLMNs
*/
......
......@@ -178,6 +178,7 @@ int main (int argc, const char* argv[])
usim_data.imsi.u.num.digit15 = 0b1111;
#endif
#if (SELECTED_PLMN == OAI_LTEBOX)
#if 0
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 208 (France) + 10 (SFR) + 00001234
......@@ -201,6 +202,31 @@ int main (int argc, const char* argv[])
usim_data.imsi.u.num.digit14 = 1;
usim_data.imsi.u.num.digit15 = 1;
#endif
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 208 (France) + 10 (SFR) + 00001234
*/
#warning "208.92.0000000313"
usim_data.imsi.length = 8;
usim_data.imsi.u.num.parity = ODD_PARITY; // Parity: even
usim_data.imsi.u.num.digit1 = 2; // MCC digit 1
usim_data.imsi.u.num.digit2 = 0; // MCC digit 2
usim_data.imsi.u.num.digit3 = 8; // MCC digit 3
usim_data.imsi.u.num.digit4 = 9; // MNC digit 1
usim_data.imsi.u.num.digit5 = 2; // MNC digit 2
usim_data.imsi.u.num.digit6 = 0;//0b1111; // MNC digit 3
usim_data.imsi.u.num.digit7 = 0;
usim_data.imsi.u.num.digit8 = 0;
usim_data.imsi.u.num.digit9 = 0;
usim_data.imsi.u.num.digit10 = 0;
usim_data.imsi.u.num.digit11 = 0;
usim_data.imsi.u.num.digit12 = 0;
usim_data.imsi.u.num.digit13 = 3;
usim_data.imsi.u.num.digit14 = 1;
usim_data.imsi.u.num.digit15 = 3;
#endif
#if (SELECTED_PLMN == TEST1)
#warning "IMSI 001.01.000001234"
usim_data.imsi.length = 8;
......
......@@ -48,10 +48,13 @@
//1006020f0a478bf6b699f15c062e42b3
/*u8 OP[16] = {0xb3, 0x42, 0x2e, 0x06, 0x5c, 0xf1, 0x99, 0xb6,
0xf6, 0x8b, 0x47, 0x0a, 0x0f, 0x02, 0x06, 0x10
};*/
};
u8 OP[16] = {0x10, 0x06, 0x02, 0x0f, 0x0a, 0x47, 0x8b, 0xf6,
0xb6, 0x99, 0xf1, 0x5c, 0x06, 0x2e, 0x42, 0xb3
};
};*/
u8 OP[16] = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
};
#else
u8 OP[16] = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
......
......@@ -71,7 +71,8 @@ Description Implements the API used by the NAS layer to read/write
*/
#define USIM_API_K_SIZE 16
//#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
#define USIM_API_K_VALUE "8BAF473F2F8FD09487CCCBD7097C6862"
//#define USIM_API_K_VALUE "8BAF473F2F8FD09487CCCBD7097C6862"
#define USIM_API_K_VALUE "8baf473f2f8fd094ad7abca335992b4b" // Comm4Innov K value
#define TEST_USIM_API_K_VALUE "000102030405060708090a0b0c0d0e0f" // CMW500 K key
static uint8_t _usim_api_k[USIM_API_K_SIZE];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment