参考文档:
80-n5576-96_y_modem_software_configuration_user_guide.pdf
80_N5576_96SC_P_MODEM_SOFTWARE_CONFIGURATION_OVERV.pdf
kba-170928165228_4_sdm845_如何修改mcfg_sel_db.xml.pdf
kba-190725202550_2_0xaa_of_version_id_in_trl_file_is_different_with_master_file_on_sdx55.pdf
6.6.2
Enable GID-based MBN autoselection
1. Create an MBN for a carrier, which is selected based on the GID of the SIM card. Use any existing
MBN as a base to create a new MBN.
2. Add or update the NV and EFS settings in the newly created carrier MBN.
3. Assign unique carrier ID (carrierIndex) for the new carrier MBN. The carrier ID should not match
the existing carrier MBNs that QTI delivers.
Update the carrierIndex and version fields (TLV #1) in the MBN Trailer Record.
4. Add or update the required rules in mcfg_sel_db.xml. See the subsequent section to add or
update rules in mcfg_sel_db.xml for GID-based MBN selection.
5. Configure the GID values (GroupID1 and GroupID2 files) in the SIM card.
13.3 Create an MBN with autogeneration function
1. Add an entry of a new MBN in the whitelist at the following locations:
□
Software MBN: modem_proc\mcfg\bsp\mcfg_sw_img\build\mcfg_sw_variants.txt
□
Hardware MBN: modem_proc\mcfg\bsp\mcfg_hw_img\build\mcfg_hw_variants.txt
2. Create an MCFG Trailer Record and drop it in an appropriate location under modem_proc\mcfg
\mcfg_gen\groups\mcfg_trl.
3. Select RoW MBN (or any sample MBN) as a base to make changes.
a. If a group with the required settings does not exist, create a group.
b. Update mcfg_<tech_modules>_gen.scons to include the new group to variant mapping.
4. Run the build commands again to generate the MBNs.
5. Autogenerated XML files are located in same place as the previous static XML files, but in a new
folder.
□
For example, when the autogeneration feature is enabled by setting the value to True in
modem_proc/build/ms/tcfg_<build id>.gen.prodq.py, the autogenerated XML files are at: mcfg
\mcfg_gen\generic\common\Default\<build_variant>
□
When the autogeneration feature is disabled by setting the value to False, the XML files are
at: mcfg\mcfg_gen\generic\common\Default
综上,基于GID选择MBN,新增一个运营商MBN如下:
1. Add an entry of a new MBN in the whitelist at the following locations:
□
Software MBN: modem_proc\mcfg\bsp\mcfg_sw_img\build\mcfg_sw_variants.txt
generic/China/CU : VoLTE-Commercial
generic/China/CU_GID1 : VoLTE-Commercial
generic/EU/Bouygues : France-Commercial
2. Create an MCFG Trailer Record and drop it in an appropriate location under modem_proc\mcfg
\mcfg_gen\groups\mcfg_trl.
MPSS.HI.4.3.1\modem_proc\mcfg\mcfg_gen\groups\mcfg_trl\China\CU_GID1\mcfg_sw_gen_VoLTE-Commercial.xml
<NvTrlRecord name="MCFG TRL record" description="Configuration Framework Data" comment="" category="MCFG" mcfgAttributes="0x00">
<Member name="MCFG_trl_struct_version_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">0 </Member> <Member name="MCFG_trl_struct_version_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">2 </Member>
<Member name="MCFG_trl_struct_version" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint16">256 </Member>
<Member name="MCFG_version_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">1 </Member>
<Member name="MCFG_version_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="MCFG_version" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint32">134308608 </Member>
<Member name="MCC_MNC_Info_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">2 </Member>
<Member name="MCC_MNC_Info_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="MCC" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">460 </Member>
<Member name="MNC" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">1 </Member>
<Member name="Configuration_Name_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">3 </Member>
<Member name="Configuration_Name_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">8 </Member>
<Member name="Configuration_Name" description="Value for Trailer Record TLV" comment="" sizeOf="13" type="string">VoLTE-CU_GID1</Member>
<Member name="IIN_List_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">4 </Member>
<Member name="IIN_List_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">14 </Member>
<Member name="IIN_Flag" description="Value for Trailer Record TLV" comment="IIN_Flag = 0: IINs compared to SIM during autoselection / IIN_Flag = 1: Configuration used as fallback during autoselection" sizeOf="1" type="uint8">0 </Member>
<Member name="IIN_List_Count" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint8">3 </Member>
<Member name="IIN_List" description="Value for Trailer Record TLV" comment="" sizeOf="3" type="uint32">898601 898606 898609 </Member>
<Member name="QC_version_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">5 </Member>
<Member name="QC_version_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="QC_version" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint32">134308608 </Member>
<Member name="MCC_MNC_List_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">6 </Member>
<Member name="MCC_MNC_List_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">14 </Member>
<Member name="MCC_MNC_Flag" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint8">0 </Member>
<Member name="MCC_MNC_List_Count" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint8">3 </Member>
<Member name="MCC_MNC_List" description="Value for Trailer Record TLV" comment="" sizeOf="6" type="uint16">460 1 460 6 460 9 </Member>
<Member name="MCFG_capability_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">7 </Member>
<Member name="MCFG_capability_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="MCFG_capability" description="Value for Trailer Record TLV" comment="(BitX=LO/HI): bit0(Applicable to HW mbn only)=SS/DS bit1=OpenMarket/Subsidized bit2=NonVoLTE/VoLTE bit3: commerical/lab bits4-31=reserved" sizeOf="1" type="uint32">4 </Member>
</NvTrlRecord>
版本编号指南 (MCFG_version)
每种运营商配置都具备专属 4 字节十六进制 MCFG 版本,其格式为:0xAABBCCDD。例
如,DI.4.0 基准中 Verizon hVoLTE 的 MCFG 版本为:0x0201016A。
下文以 0xAABBCCDD 为例,分别对 MCFG 版本中的字节加以介绍。
字节 1 0xAA:此字节为兼容性编号。如果 MBN 没有合适的兼容性版本,目标不会对
其进行处理。下表列出了适用的兼容性编号:
0x02:DI/DPM
0x04:BO
0x05:JO
0x06:Thor
0x08:AT
字节 2 BB:未在内部使用。OEM 可能将此字节用于其版本控制过程。
字节 3 CC:此字节表示运营商版本:主要。例如,所有 Verizon 配置(SVLTE、
1xSRLTE 和 hVoLTE 等)共享此字节。
字节 4 DD:此字节表示运营商版本:次要。此字节为版本编号,每次修改 MCFG 版
本时,该值都将递增。
对于 carrierIndex:
MCFG 版本中“字节 3 0xCC:主要运营商版本”的十进制值。
示例:MCFG 版本:0x08002A00,则 carrierIndex = 42
对于 NvConfigurationData 中的类型:
类型 = 1 代表软件配置
MCFG_version:134308608,0x08016300,carrierIndex = 99
注意:真增加MBN时carrierIndex从254开始,253,252……
3. Select RoW MBN (or any sample MBN) as a base to make changes.
修改如下:
MPSS.HI.4.3.1\modem_proc\mcfg\mcfg_gen\groups\mcfg\China\CU_GID1\mcfg_sw_gen_VoLTE-Commercial.xml
<?xml version="1.0" encoding="utf-8"?>
<NvData McfgXmlVersion="2.0">
<NvConfigurationData carrierIndex="0" version="mcfg.0.0" type="1"/>
<NvItemData name="Banner" id="71" description="" comment="" category="Display" subscription_mask="0x07" mcfgAttributes="0x19" mcfgVariant="1">
<Member name="letters" description="" comment="" sizeOf="13" type="string">CU_GID1</Member>
</NvItemData>
</NvData>
MPSS.HI.4.3.1\modem_proc\mcfg\build\mcfg\mcfg_mcfg_gen.scons
'modem_proc/mcfg/mcfg_gen/groups/mcfg/China/CU/mcfg_sw_gen_VoLTE-Commercial.xml':[ 'CU : VoLTE-Commercial',
],
'modem_proc/mcfg/mcfg_gen/groups/mcfg/China/CU_GID1/mcfg_sw_gen_VoLTE-Commercial.xml':[
'CU_GID1 : VoLTE-Commercial',
],
'modem_proc/mcfg/mcfg_gen/groups/mcfg/EU/Bouygues/mcfg_sw_gen_France-Commercial.xml':[
'Bouygues : France-Commercial',
],
MPSS.HI.4.3.1\modem_proc\dataims\Configuration\MasterMBNConfiguration\China\CU_GID1\ims_master.xml:具体修改参加CU
MPSS.HI.4.3.1\modem_proc\dataims\Configuration\build\mcfg_dataims_gen.scons
'modem_proc/dataims/Configuration/MasterMBNConfiguration/China/CU/ims_master.xml':[
'CU : VoLTE-Commercial',
],
'modem_proc/dataims/Configuration/MasterMBNConfiguration/China/CU_GID1/ims_master.xml':[
'CU_GID1 : VoLTE-Commercial',
],
'modem_proc/dataims/Configuration/MasterMBNConfiguration/EU/Bouygues/ims_master.xml':[
'Bouygues : France-Commercial',
],
MPSS.HI.4.3.1\modem_proc\datamodem\datacfg\xml\China\CU_GID1\mcfg_sw_gen_VoLTE-Commercial.xml:具体修改参加CU
MPSS.HI.4.3.1\modem_proc\datamodem\datacfg\build\mcfg_datamodem_gen.scons
'modem_proc/datamodem/datacfg/xml/China/CU_GID1/mcfg_sw_gen_VoLTE-Commercial.xml':[
'CU_GID1 : VoLTE-Commercial',
],
'modem_proc/datamodem/datacfg/xml/EU/Bouygues/mcfg_sw_gen_France-Commercial.xml':[
'Bouygues : France-Commercial',
],
.scons没改的使用ROW,编译时自动生成到:
MPSS.HI.4.3.1\modem_proc\mcfg\mcfg_gen\mannar.gen.prod\generic\China\CU_GID1\mcfg_sw_gen_VoLTE-Commercial.xml
<?xml version="1.0" encoding="utf-8"?>
<NvData McfgXmlVersion="2.0">
<NvConfigurationData carrierIndex="99" version="0x0A016300" type="1"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/mcfg/mcfg_gen/groups/mcfg/China/CU_GID1/mcfg_sw_gen_VoLTE-Commercial.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/dataims/Configuration/MasterMBNConfiguration/China/CU_GID1/ims_master.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/datamodem/datacfg/xml/China/CU_GID1/mcfg_sw_gen_VoLTE-Commercial.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/gps/gnss_tools/config/common/ROW/mcfg_sw_gen_Gen_3GPP.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/lte/configs/configs_xml/Common/ROW/mcfg_sw_gen_Commercial.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/mmcp/config/common/ROW/mcfg_sw_gen_Gen_3GPP.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/uim/config/groups/common/ROW/mcfg_sw_gen_Gen_3GPP.xml"/>
<GroupFile name="mcfg_sw_gen_group.xml" description="" comment="" category="" version="" mcfgAttributes="0x09" buildPath="modem_proc/wcdma/configs/groups/common/ROW/mcfg_sw_gen_Gen_3GPP.xml"/>
<NvTrlRecord name="MCFG TRL record" description="Configuration Framework Data" comment="" category="MCFG" mcfgAttributes="0x00">
<Member name="MCFG_trl_struct_version_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">0 </Member>
<Member name="MCFG_trl_struct_version_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">2 </Member>
<Member name="MCFG_trl_struct_version" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint16">256 </Member>
<Member name="MCFG_version_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">1 </Member>
<Member name="MCFG_version_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="MCFG_version" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint32">167863040 </Member>
<Member name="MCC_MNC_Info_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">2 </Member>
<Member name="MCC_MNC_Info_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="MCC" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">460 </Member>
<Member name="MNC" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">1 </Member>
<Member name="Configuration_Name_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">3 </Member>
<Member name="Configuration_Name_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">8 </Member>
<Member name="Configuration_Name" description="Value for Trailer Record TLV" comment="" sizeOf="13" type="string">VoLTE-CU_GID1</Member>
<Member name="IIN_List_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">4 </Member>
<Member name="IIN_List_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">14 </Member>
<Member name="IIN_Flag" description="Value for Trailer Record TLV" comment="IIN_Flag = 0: IINs compared to SIM during autoselection / IIN_Flag = 1: Configuration used as fallback during autoselection" sizeOf="1" type="uint8">0 </Member>
<Member name="IIN_List_Count" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint8">3 </Member>
<Member name="IIN_List" description="Value for Trailer Record TLV" comment="" sizeOf="3" type="uint32">898601 898606 898609 </Member>
<Member name="QC_version_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">5 </Member>
<Member name="QC_version_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="QC_version" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint32">167863040 </Member>
<Member name="MCC_MNC_List_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">6 </Member>
<Member name="MCC_MNC_List_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">14 </Member>
<Member name="MCC_MNC_Flag" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint8">0 </Member>
<Member name="MCC_MNC_List_Count" description="Value for Trailer Record TLV" comment="" sizeOf="1" type="uint8">3 </Member>
<Member name="MCC_MNC_List" description="Value for Trailer Record TLV" comment="" sizeOf="6" type="uint16">460 1 460 6 460 9 </Member>
<Member name="MCFG_capability_type" description="Type ID for Trailer Record TLV" comment="" sizeOf="1" type="uint8">7 </Member>
<Member name="MCFG_capability_len" description="Length for Trailer Record TLV" comment="" sizeOf="1" type="uint16">4 </Member>
<Member name="MCFG_capability" description="Value for Trailer Record TLV" comment="(BitX=LO/HI): bit0(Applicable to HW mbn only)=SS/DS bit1=OpenMarket/Subsidized bit2=NonVoLTE/VoLTE bit3: commerical/lab bits4-31=reserved" sizeOf="1" type="uint32">4 </Member>
</NvTrlRecord>
</NvData>
version="0x0A016300"的0A是怎么来的见:kba-190725202550_2_0xaa_of_version_id_in_trl_file_is_different_with_master_file_on_sdx55.pdf
![](/qrcode.jpg)
4.修改MPSS.HI.4.3.1\modem_proc\mcfg\configs\mcfg_sw\LA\oem_sw.txt
mcfg_sw/generic/China/CU/Lab/Test/mcfg_sw.mbn
mcfg_sw/generic/China/CU_GID1/Commercial/VoLTE/mcfg_sw.mbn
mcfg_sw/generic/common/ROW/Commercial/mcfg_sw.mbn
QUESTION 11
What is the difference between mcfg_sw_variants.txt and oem_sw.txt files?
ANSWER
Sample build command based on SM8150 is as follows:
The mcfg_sw_variants.txt file lists the MBNs that you compile into the non
HLOS.bin of the UE image. The MBNs are stored in the application processor. If
the MBNs are not available in the application processor, then those MBNs are not
included in the Modem EFS later. The files are loaded at build/compile time.
The oem_sw.txt file lists the MBNs that are available in the non-HLOS.bin
(application processor). To pull the MBNs into the Modem EFS, add the MBNs in oem_sw.txt file. The files are loaded to Modem EFS at runtime.
5.修改MPSS.HI.4.3.1\modem_proc\mcfg\mcfg_gen\scripts\mcfg_sel_db.xml
<if>
<all_of>
<tristate_reset_all return="true" />
<imsi_3gpp_plmn_in not_present="false" store_in="3gpp_imsi">460-09 460-01 460-06</imsi_3gpp_plmn_in>
<gid_in not_present="false" store_in="gid1">01</gid_in>
</all_of>
<then>
<SelRecord carrier_name="CU_GID1" country_code="156" imsi_3gpp="3gpp_imsi" gid1="gid1" mcfg_carrier_index="99" volte="true" vowifi="false" />
</then>
</if>
<if>
<any_of evaluate_all="true">
<tristate_reset_all return="false" />
<iin_in not_present="false" store_in="iin">898601 898606 898609</iin_in>
<imsi_3gpp_plmn_in not_present="false" store_in="3gpp_imsi">460-09 460-01 460-06</imsi_3gpp_plmn_in>
</any_of>
<then>
<SelRecord carrier_name="CU" country_code="156" iin="iin" imsi_3gpp="3gpp_imsi" mcfg_carrier_index="21" volte="true" vowifi="false" />
</then>
</if>
如此修改后,联通卡且gid1=01时会选择新建的MBN : mcfg_carrier_index="99"
为了测试该修改,进一步修改如下代码进行验证:
mmgsdicache.c
/*xxx.xxx test begin 2022.4.24*/
static boolean GID1_flag = FALSE;
/*xxx.xxx test end 2022.4.24*/
==========================================================================*/
mmgsdi_return_enum_type mmgsdi_cache_write_item(
mmgsdi_file_enum_type mmgsdi_file,
mmgsdi_session_id_type session_id,
mmgsdi_len_type data_len,
mmgsdi_len_type data_offset,
const uint8 * data_ptr,
mmgsdi_data_from_enum_type data_fr_card,
mmgsdi_rec_num_type rec_num
)
{
……
/* Copy contents to be written into cache */
mmgsdi_memscpy((cache_table_ptr[file_index].file_cache.cache_data.data_ptr) + data_offset,
cache_table_ptr[file_index].file_cache.cache_data.data_len - data_offset,
data_ptr,
data_len);
/*xxx.xxx test begin 2022.4.24*/
if(mmgsdi_file == MMGSDI_USIM_GID1)
{
if(GID1_flag == TRUE)
{
GID1_flag = FALSE;
uint8 gid1_data = 0x1;
mmgsdi_memscpy((cache_table_ptr[file_index].file_cache.cache_data.data_ptr) + data_offset,
cache_table_ptr[file_index].file_cache.cache_data.data_len - data_offset,
&gid1_data,
1);
UIM_MSG_HIGH_3("xxx.xxx mmgsdi_cache_write_item file 0x%x, session_id 0x%x, gid1 = %d",
mmgsdi_file, session_id,gid1_data);
}
else
GID1_flag = TRUE;
}
/*xxx.xxx test end 2022.4.24*/
cache_table_ptr[file_index].init = MMGSDI_CACHE_INIT;
基于SPN选择MBN
在基于GID选择MBN修改的基础上修改如下:
1、修改选择MBN的规则:MPSS.HI.4.3.1\modem_proc\mcfg\mcfg_gen\scripts\mcfg_sel_db.xml
<if>
<all_of>
<tristate_reset_all return="true" />
<imsi_3gpp_plmn_in not_present="false" store_in="3gpp_imsi">460-09 460-01 460-06</imsi_3gpp_plmn_in>
<spn_in not_present="false" store_in="spn">TRACFONE.VZWENTP</spn_in>
</all_of>
<then>
<SelRecord carrier_name="CU_GID1" country_code="156" imsi_3gpp="3gpp_imsi" spn="spn" mcfg_carrier_index="99" volte="true" vowifi="false" />
</then>
</if>
<if>
<any_of evaluate_all="true">
<tristate_reset_all return="false" />
<iin_in not_present="false" store_in="iin">898601 898606 898609</iin_in>
<imsi_3gpp_plmn_in not_present="false" store_in="3gpp_imsi">460-09 460-01 460-06</imsi_3gpp_plmn_in>
</any_of>
<then>
<SelRecord carrier_name="CU" country_code="156" iin="iin" imsi_3gpp="3gpp_imsi" mcfg_carrier_index="21" volte="true" vowifi="false" />
</then>
</if>
2、修改如下代码进行验证:
mmgsdicache.c
/*xxx.xxx test begin 2022.4.24*/
static boolean GID1_flag = FALSE;
static boolean SPN_flag = FALSE;
/*xxx.xxx test end 2022.4.24*/
==========================================================================*/
mmgsdi_return_enum_type mmgsdi_cache_write_item(
mmgsdi_file_enum_type mmgsdi_file,
mmgsdi_session_id_type session_id,
mmgsdi_len_type data_len,
mmgsdi_len_type data_offset,
const uint8 * data_ptr,
mmgsdi_data_from_enum_type data_fr_card,
mmgsdi_rec_num_type rec_num
)
{
……
/* Copy contents to be written into cache */
mmgsdi_memscpy((cache_table_ptr[file_index].file_cache.cache_data.data_ptr) + data_offset,
cache_table_ptr[file_index].file_cache.cache_data.data_len - data_offset,
data_ptr,
data_len);
/*xxx.xxx test begin 2022.4.24*/ if(mmgsdi_file == MMGSDI_USIM_GID1)
{
if(GID1_flag == TRUE)
{
GID1_flag = FALSE;
uint8 gid1_data = 0x1;
mmgsdi_memscpy((cache_table_ptr[file_index].file_cache.cache_data.data_ptr) + data_offset,
cache_table_ptr[file_index].file_cache.cache_data.data_len - data_offset,
&gid1_data,
1);
UIM_MSG_HIGH_3("xxx.xxx mmgsdi_cache_write_item file 0x%x, session_id 0x%x, gid1 = %d",
mmgsdi_file, session_id,gid1_data);
}
else
GID1_flag = TRUE;
GID1_flag = TRUE;
}
else if(mmgsdi_file == MMGSDI_USIM_SPN)
{
if(SPN_flag == TRUE)
{
SPN_flag = FALSE;
uint8 spn_data[] = {0x02,0x54,0x52,0x41,0x43,0x46,0x4F,0x4E,0x45,0x2E,0x56,0x5A,0x57,0x45,0x4E,0x54,0x50};
mmgsdi_memscpy((cache_table_ptr[file_index].file_cache.cache_data.data_ptr) + data_offset,
cache_table_ptr[file_index].file_cache.cache_data.data_len - data_offset,
spn_data,
sizeof(spn_data));
for(int i=0;i<sizeof(spn_data);i++)
{
UIM_MSG_HIGH_5("xxx.xxx mmgsdi_cache_write_item file 0x%x, session_id 0x%x, SPN[%d] 0x%c 0x%x",
mmgsdi_file, session_id, i, spn_data[i], spn_data[i]);
}
}
else
SPN_flag = TRUE;
}
/*xxx.xxx test end 2022.4.24*/
cache_table_ptr[file_index].init = MMGSDI_CACHE_INIT;