⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 heesim.ho

📁 这是用Labwindows开发的一个RF test程序。 用于日本机种的组装后ANT 测试。
💻 HO
字号:
/******************************************************************************/
/* SCCS: %Z% Name: %M% Date US: %G% %U% Ver.: %I% */
/******************************************************************************/
/*F(*************************************************************************** 
 * File name : %M%
 * Project : ROAD RUNNER
 * Module :
 * Date : (US) %G% %U%
 * Version : %I%
 * Compiler name and release(s) :
 *----------------------------------------------------------------------------* 
 *----------------------------------------------------------------------------* 
 *                                    DESCRIPTION
 *
 * THIS FILE DESCRIBES THE SIM-LOCKED SECTION OF E2PROM
 *
 *----------------------------------------------------------------------------* 
 *                                    EVOLUTION
 *----------------------------------------------------------------------------* 
 *   date   | Author    | Arnb   | Description
 *----------------------------------------------------------------------------* 
 * 21.03.97 | J DRAPP |        | creation
 ***************************************************************************)F*/
/* #*/
 

#ifndef HEESIM_HO
#define HEESIM_HO

MC_HEE_SECTION_LOADED_IN_RAM_IMAGE

#define HEE_SIM_SECTION_NAME            "SIMLOCK"

#define HEE_EEPROM_SIM_VERSION		0x07 
 

#define HEE_EEPROM_SIM_SIZE            sizeof(t_hee_SimLocked)		 

/* s_NckCode.v_Status - s_NsckCode.v_Status - s_SpckCode.v_Status - s_CckCode.v_Status - s_PckCode.v_Status
   0x00 : DISABLE The corresponding secret code is not required
   else, the corresponding secret code must be enter by the user */
#define HEE_STATUS_DISABLE		0x00


/* Number of bytes of GID1 and GID2 bytes - 1 is the default value */
#define HEE_NB_GID1_BYTES		3
#define HEE_NB_GID2_BYTES		1


/* v_AutoLock : specified which SIM file must be copied to Eeprom (GID1 and / or GID2),
   specified also if the ACC file must be different of group 15. MCC and MNC are stored anyway. */
/* HEE_AUTOLOCK_GID1_REQUIRED - HEE_AUTOLOCK_GID2_REQUIRED - HEE_AUTOLOCK_ACC_GROUP_REQUIRED
   can be set in the same time. */
#define HEE_AUTOLOCK_NOT_ACTIVE		0x00
/* Set this field if you want a normal autolock features
   without GID1, GID2, ACC and CNL files */
#define HEE_AUTOLOCK_ACTIVE		( 1 << 0 )
/* Set if the GID1 must be in the SIM card for the ME-SIM autolocked.
   This option shall not be used with HEE_AUTOLOCK_CNL_CONFIG */
#define HEE_AUTOLOCK_GID1_REQUIRED	( 1 << 1 )
/* Set if the GID2 must be in the SIM card for the ME-SIM autolocked.
   This option shall not be used with HEE_AUTOLOCK_CNL_CONFIG */
#define HEE_AUTOLOCK_GID2_REQUIRED	( 1 << 2 )
/* Set if the operator prefer to used the CNF file in the SIM card. */
#define HEE_AUTOLOCK_CNL_CONFIG		( 1 << 3 )
/* Set if the first value of the ACC file means group 15. */
#define HEE_AUTOLOCK_ACC_GROUP_REQUIRED	( 1 << 4 )
/* Set if the CPHS file ONS is necessary. */
#define HEE_AUTOLOCK_ONSFILE_REQUIRED   ( 1 << 5 )

/* Set if the IMSI must be checked in a range (all bytes)
   Reset if the IMSI must be checked byte after byte (default case) */
#define HEE_FULL_IMSI_RANGE		( 1 << 6 )


/* Number of IMSI -MCC+MNC+GID1+GID2- */
/* 1 is the MINIMUM value. */
#define HEE_NB_IMSI_LOCK		10

/*******************************************************************************************/

#if defined (__unix)
#pragma pack(1)
#endif

/*******************************************************************************************/

MC_HEE_BEGIN_PACKED_TYPE( t_hee_CodeStruct )

  MC_PCC_ARRAY( u8 , a_Value , 8 )		/* Number of maximum digit = 16
						   The code is store in BCD format.
						   i.e : "1235678" --> 21 53 76 F8.
						   If v_Location is set, this code is unused. */

  MC_HEE_NORMAL_FIELD( u8 , v_Status )		/* The status is defined in 1 bytes
						   for security reasons. It is disable
						   if it is set to HEE_STATUS_DISABLE. */

  MC_HEE_NORMAL_FIELD( u8 , v_Location )	/* Must be set as default to the current code identifier, i.e :
						   0 : NCK - 1 : NSCK - 2 : SPCK - 3 : CCK - 4 : NCK2 - 5 : PCK or ###### 0xff ######
			  			   If an other ME-SIM codes is used, it must be indicated here.
			   			   If the SPCK must used the NCK code (one code for both), there are two solutions:
			   			   1 - v_Location( SPCK ) = 0 and v_Location( NCK ) = 0 or 0xff
			   			   2 - v_Location( SPCK ) = 2 or 0xff and v_Location( NCK ) = 2.
			   			   It is not allowed to use multiple link, i.e: SPCK -> CCK -> NCK,
			   			   but the following solution is possible: SPCK -> NCK and CCK -> NCK.
			   			   If one code is used for several pin identifier, the status must be set to ENABLE,
			   			   and the counter to 0 by default. In the previous exemple:
			  			   v_Status( SPCK ) = v_Status ( CCK ) = (u8) ~HEE_STATUS_DISABLE and 
						   v_Counter( SPCK ) = v_Counter( CCK ) = 0. */

  MC_HEE_NORMAL_FIELD( u8 , v_Counter )		/* The counter must be set to the maximum
						   value by the configuration center. It is not
						   necessary to do it if the auto-lock procedure is supported. */

  MC_HEE_NORMAL_FIELD( u8 , v_MaxCounter)	/* Maximum value of the previous counter. */

MC_HEE_END_PACKED_TYPE( t_hee_CodeStruct )

/*******************************************************************************************/
/* Many field contains one
   minimum and one maximum value. */
MC_HEE_BEGIN_PACKED_TYPE( t_hee_MinMax )

   MC_HEE_NORMAL_FIELD( u8 , v_MinValue )
   MC_HEE_NORMAL_FIELD( u8 , v_MaxValue )
   MC_HEE_GAP( v_GAP2 , 2 )

MC_HEE_END_PACKED_TYPE( t_hee_MinMax )

/*******************************************************************************************/

/* The mobile can be ME-SIM locked
   on several IMSI.
   This structure contains all
   variables field. */

MC_HEE_BEGIN_PACKED_TYPE( t_hee_MultiImsi )

   MC_HEE_NORMAL_FIELD( u16 , v_Mcc )	  /* Mobile Country Code coded in BCD. ex: 0x02F8 for France*/

   MC_HEE_NORMAL_FIELD( u16 , v_Mnc )	  /* Mobile Network Code coded in BCD. ex: 0x0010 for Itineris */ 
						  /* 2 bytes -> compatibility with PCS recommandations. */

   MC_HEE_NORMAL_FIELD( t_hee_MinMax , s_Ns1Ns2 )  /* Byte number 4 of the IMSI (after the MNC), i.e. digit 6 (MSB) - digit 7 (LSB) */

   MC_PCC_ARRAY( t_hee_MinMax , a_ImsiD6toD15 , 4 )
   MC_PCC_ARRAY( t_hee_MinMax , a_Gid1 , HEE_NB_GID1_BYTES )
   MC_PCC_ARRAY( t_hee_MinMax , a_Gid2 , HEE_NB_GID2_BYTES )

MC_HEE_END_PACKED_TYPE( t_hee_MultiImsi )

/*******************************************************************************************/

MC_HEE_SECTION_TYPE_BEGIN( t_hee_SimLocked ) 

  MC_HEE_NORMAL_FIELD( t_hee_SectionHeader , s_hee_SimSectionHeader )
  MC_PCC_ARRAY( u8 , a_UnbckImsi , 8 )
  MC_HEE_NORMAL_FIELD( t_hee_CodeStruct , s_NckCode ) 
  MC_HEE_NORMAL_FIELD( t_hee_CodeStruct , s_NsckCode )	 
  MC_HEE_NORMAL_FIELD( t_hee_CodeStruct , s_SpckCode ) 
  MC_HEE_NORMAL_FIELD( t_hee_CodeStruct , s_CckCode ) 
  MC_HEE_NORMAL_FIELD( t_hee_CodeStruct , s_PckCode ) 
  MC_HEE_NORMAL_FIELD( u8 , v_UnbckAttempt )
  MC_HEE_NORMAL_FIELD( u8 , v_Gid1Presence )	
  MC_HEE_NORMAL_FIELD( u8 , v_Gid2Presence )
  MC_HEE_NORMAL_FIELD( u8 , v_AutoLock )
     
  MC_HEE_NORMAL_FIELD( u8 , v_OperatorFile )
  MC_HEE_GAP( v_GAP1 , 3 )
  MC_PCC_ARRAY( t_hee_MultiImsi , a_MultiImsi , HEE_NB_IMSI_LOCK )

MC_HEE_SECTION_TYPE_END( t_hee_SimLocked )

/*******************************************************************************************/

#if defined (__unix)
#pragma pack()
#endif

/*******************************************************************************************/

#if !defined( HEE1SIM_C )
#define GLOBAL extern
#else
#define GLOBAL
#endif

/*******************************************************************************************/

#if defined (__unix)
#pragma align 4 (s_hee_SimLocked, s_hee_DefaultSimLocked)
#endif

/*******************************************************************************************/

GLOBAL MC_HEE_SECTION_VAR( t_hee_SimLocked , s_hee_SimLocked , HEE_SIMLOCK_SECTION );

/*******************************************************************************************/
/******************************************************************/
/*   Normally the simlock section has not of default parameters   */
/*   But Look has need default parameters for to do test          */
/******************************************************************/

#if defined(DEBUG_GSM_STRING)
GLOBAL const MC_HEE_SECTION_CONST( t_hee_SimLocked , s_hee_DefaultSimLocked )
#if !defined(HEE1SIM_C)
;
#else
={
  /* s_hee_SimSectionHeader */
  {    
    /* v_hee_CheckSum */
    HEE_EEPROM_CHECKSUM,
    
    /* v_hee_Version */
    HEE_EEPROM_SIM_VERSION,
    
    /* v_hee_SectionSize */
    HEE_EEPROM_SIM_SIZE ,
    
    /* v_hee_Signature */
    HEE_EEPROM_SIGNATURE
  },
  
  /* u8                a_UnbckImsi[8]; */
  {0x29, 0x80, 0x10, 0x00, 0x00, 0xFF, 0xFF, 0xFF},
  /* t_hee_CodeStruct  s_NckCode; */
  {{0x21, 0x43, 0x65, 0x87, 0xFF, 0xFF, 0xFF, 0xFF},
   0x00, 0x00, 0x05, 0x05},
  /* t_hee_CodeStruct  s_NsckCode; */
  {{0x21, 0x43, 0x65, 0x87, 0xFF, 0xFF, 0xFF, 0xFF},
   0x00, 0x01, 0x05, 0x05},
  /* t_hee_CodeStruct  s_SpckCode; */
  {{0x21, 0x43, 0x65, 0x87, 0xFF, 0xFF, 0xFF, 0xFF},
   0x00, 0x02, 0x05, 0x05},
  /* t_hee_CodeStruct  s_CckCode; */
  {{0x21, 0x43, 0x65, 0x87, 0xFF, 0xFF, 0xFF, 0xFF},
   0x00, 0x03, 0x05, 0x05},
  /* t_hee_CodeStruct  s_PckCode; */
  {{0x21, 0x43, 0x65, 0x87, 0xFF, 0xFF, 0xFF, 0xFF},
   0x00, 0x04, 0x05, 0x05},
  /* u8             v_UnbckAttempt; */
  0x05,
  /* u8		  v_Gid1Presence; */
  0x00,
  /* u8		  v_Gid2Presence; */
  0x00,
  /* u8             v_AutoLock; */
  0x00,
  /* u8             v_OperatorFile; */
  0x00,	              
  /* GAP */
  {0x00, 0x00, 0x00},
  /* t_hee_MultiImsi   a_MultiImsi[0]; */
  {{0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[1]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[2]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[3]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[4]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[5]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},

  /* t_hee_MultiImsi   a_MultiImsi[6]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[7]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[8]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}},
   
  /* t_hee_MultiImsi   a_MultiImsi[9]; */
   {0x02F8, 0x0010,
    {0x00, 0xFF, 0x00, 0x00},
    {{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00},{0x0F, 0x0F, 0x00, 0x00}},
    {{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00},{0x00, 0xFE, 0x00, 0x00}},
    {0x00, 0xFE, 0x00, 0x00}}
  } 
};
#endif /* !(HEE1SIM_C) */

#endif /* defined(DEBUG_GSM_STRING) */     

/*******************************************************************************************/

#undef GLOBAL

/*******************************************************************************************/

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -