Commit e0571989 authored by Lionel Gauthier's avatar Lionel Gauthier

usim files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7170 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0de9514e
......@@ -51,6 +51,23 @@ Description Defines a list of PLMN network operators
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
/****************************************************************************/
/*
* PLMN network operator record index
*/
#define TEST1 0
#define SFR1 1
#define SFR2 2
#define SFR3 3
#define TM1 4
#define FCT1 5
#define VDF1 6
#define VDF2 7
#define VDF3 8
#define VDF4 9
#define VDF5 10
#define SELECTED_PLMN SFR1
#define TEST_PLMN {0,0,0x0f,1,1,0} // 00101
#define SFR_PLMN_1 {0,2,0x0f,8,0,1} // 20810
......@@ -68,23 +85,6 @@ Description Defines a list of PLMN network operators
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
/*
* PLMN network operator record index
*/
enum {
TEST1=0,
SFR1,
SFR2,
SFR3,
TM1,
FCT1,
VDF1,
VDF2,
VDF3,
VDF4,
VDF5,
};
/*
* PLMN network operator record
*/
......
......@@ -48,13 +48,12 @@ Description Implements the utility used to generate data stored in the
#include "memory.h"
#include "emmData.h"
#include "network.h"
#include <stdio.h> // perror, printf, fprintf, snprintf
#include <stdlib.h> // exit, free
#include <string.h> // memset, strncpy
#define SELECTED_PLMN TEST1
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/
......@@ -292,8 +291,7 @@ static void _gen_user_data(user_nvdata_t* data)
*/
static void _gen_emm_data(emm_nvdata_t* data)
{
//#if (SELECTED_PLMN == FCT1)
#if 0
#if (SELECTED_PLMN == FCT1)
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 310 (USA) + 028 (UNKNOWN) + 90832150
......@@ -325,19 +323,20 @@ static void _gen_emm_data(emm_nvdata_t* data)
data->rplmn.MNCdigit1 = 0;
data->rplmn.MNCdigit2 = 2;
data->rplmn.MNCdigit3 = 8;
#else
#endif
#if (SELECTED_PLMN == SFR1)
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 208 (France) + 10 (SFR) + 00001234
*/
/* data->imsi.length = 8;
data->imsi.length = 8;
data->imsi.u.num.parity = 0x0; // 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 = 1; // MNC digit 1
data->imsi.u.num.digit5 = 0; // MNC digit 2
data->imsi.u.num.digit6 = 0xF; // MNC digit 3
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;
......@@ -346,7 +345,16 @@ static void _gen_emm_data(emm_nvdata_t* data)
data->imsi.u.num.digit12 = 2;
data->imsi.u.num.digit13 = 3;
data->imsi.u.num.digit14 = 4;
data->imsi.u.num.digit15 = 0xF;*/
data->imsi.u.num.digit15 = 0xF;
data->rplmn.MCCdigit1 = 2;
data->rplmn.MCCdigit2 = 0;
data->rplmn.MCCdigit3 = 8;
data->rplmn.MNCdigit1 = 1;
data->rplmn.MNCdigit2 = 0;
data->rplmn.MNCdigit3 = 0xf;
#endif
#if (SELECTED_PLMN == TEST1)
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 001 + 01 + 00001234
......
......@@ -48,12 +48,12 @@ Description Implements the utility used to generate data stored in the
#include "usim_api.h"
#include "memory.h"
#include "network.h"
#include <stdio.h> // perror, printf
#include <stdlib.h> // exit
#include <string.h> // memset, memcpy, strncpy
#define SELECTED_PLMN TEST1
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
......@@ -134,8 +134,7 @@ int main (int argc, const char* argv[])
*/
memset(&usim_data, 0, sizeof(usim_data_t));
//#if (SELECTED_PLMN == FCT1)
#if 0
#if (SELECTED_PLMN == FCT1)
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 310 (USA) + 028 (UNKNOWN) + 90832150
......@@ -158,20 +157,22 @@ int main (int argc, const char* argv[])
usim_data.imsi.u.num.digit13 = 5;
usim_data.imsi.u.num.digit14 = 0;
usim_data.imsi.u.num.digit15 = 0b1111;
#else
#endif
#if (SELECTED_PLMN == SFR1)
#warning "IMSI 208.10.00001234"
/*
* International Mobile Subscriber Identity
* IMSI = MCC + MNC + MSIN = 208 (France) + 10 (SFR) + 00001234
*/
//#warning "IMSI 208.10.00001234"
/* usim_data.imsi.length = 8;
#warning "IMSI 208.10.00001234"
usim_data.imsi.length = 8;
usim_data.imsi.u.num.parity = EVEN_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 = 1; // MNC digit 1
usim_data.imsi.u.num.digit5 = 0; // MNC digit 2
usim_data.imsi.u.num.digit6 = 0b1111; // MNC digit 3
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;
......@@ -180,7 +181,10 @@ int main (int argc, const char* argv[])
usim_data.imsi.u.num.digit12 = 2;
usim_data.imsi.u.num.digit13 = 3;
usim_data.imsi.u.num.digit14 = 4;
usim_data.imsi.u.num.digit15 = 0b1111;*/
usim_data.imsi.u.num.digit15 = 0b1111;
#endif
#if (SELECTED_PLMN == TEST1)
#warning "IMSI 001.01.000001234"
usim_data.imsi.length = 8;
usim_data.imsi.u.num.parity = 0x0; // Type of identity = IMSI, even
usim_data.imsi.u.num.digit1 = 0; // MCC digit 1
......
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