1.esim卡的iccid

This commit is contained in:
payton 2023-10-24 17:10:13 +08:00
parent 7ce822975c
commit e82393a5d6
6 changed files with 47 additions and 3 deletions

View File

@ -576,6 +576,8 @@ typedef struct _UIMenuUIMenuStoreInfo {
UINT32 FileKey; UINT32 FileKey;
CHAR BluSsid[14]; CHAR BluSsid[14];
CHAR BluSwitch;/*OFF/ON*/ CHAR BluSwitch;/*OFF/ON*/
CHAR SimIccidV[21];
CHAR SimIccidA[21];
UINT32 x1; UINT32 x1;
UINT32 x2; UINT32 x2;
UINT32 x3; UINT32 x3;

View File

@ -73,7 +73,7 @@ void sf_set_wifi_cmd(UINT8 cmd);
UINT8 sf_get_wifi_cmd(void); UINT8 sf_get_wifi_cmd(void);
void sf_network_select(UINT8* profileId); void sf_network_select(UINT8* profileId);
void sf_4g_operator_scan(UINT8 mode); void sf_4g_operator_scan(UINT8 mode);
SINT32 sf_lpa_get_esim_iccid(SF_CHAR iccid[][22]);

View File

@ -3470,6 +3470,38 @@ void sf_network_switch(void)
pthread_create(&tNetWorkSeclectTask,NULL,sf_network_switch_thread,NULL); pthread_create(&tNetWorkSeclectTask,NULL,sf_network_switch_thread,NULL);
} }
SINT32 sf_lpa_get_esim_iccid(SF_CHAR iccid[][22])
{
UINT8 iccidStr[2 * LPA_PROFILE_ICCID_BUFFER_MAX_SIZE + 1] = {0};
UINT8 indexProfile = 0;
if(iccid == NULL)
{
return SF_FAILURE;
}
for (indexProfile = 0; indexProfile < getProfilesInfo.countProfileInfo; indexProfile++)
{
if(strstr(ProfileData[indexProfile].profileName, "ATT"))
{
SampleLPA_GetIccidStr(iccidStr, ProfileData[indexProfile].iccid, ProfileData[indexProfile].iccidSize);
SF_STRCPY(iccid[1], iccidStr);
SLOGI("ATT-Iccid:%s\n", iccid[1]);
}
else if(strstr(ProfileData[indexProfile].profileName, "Verizon"))
{
SampleLPA_GetIccidStr(iccidStr, ProfileData[indexProfile].iccid, ProfileData[indexProfile].iccidSize);
SF_STRCPY(iccid[0], iccidStr);
SLOGI("Version-Iccid:%s\n", iccid[0]);
}
}
return SF_SUCCESS;
}
#endif #endif

View File

@ -1334,6 +1334,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
{ {
SINT32 s32ret = 0; SINT32 s32ret = 0;
SF_CHAR simICCID[24] = { 0 }; SF_CHAR simICCID[24] = { 0 };
SF_CHAR simIccidTmp[2][22] = {{0}};
SF_CHAR eid[40] = {0}; SF_CHAR eid[40] = {0};
SF_CHAR sim4gApn[40] = {0}; SF_CHAR sim4gApn[40] = {0};
UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get(); UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();
@ -1426,6 +1427,10 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
} }
#endif #endif
sf_lpa_get_esim_iccid(simIccidTmp);
snprintf((char *)pCustomerParam->SimIccidV, sizeof(pCustomerParam->SimIccidV), (char *)simIccidTmp[0]);
snprintf((char *)pCustomerParam->SimIccidA, sizeof(pCustomerParam->SimIccidA), (char *)simIccidTmp[1]);
s32ret = sf_4G_register_net_manual(pfnParam); s32ret = sf_4G_register_net_manual(pfnParam);
//sf_share_mem_customer_down(1); //sf_share_mem_customer_down(1);
SF_APPCOMM_CHECK_RETURN(s32ret, s32ret); SF_APPCOMM_CHECK_RETURN(s32ret, s32ret);
@ -1682,6 +1687,9 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
#endif #endif
sf_lpa_get_esim_iccid(simIccidTmp);
snprintf((char *)pCustomerParam->SimIccidV, sizeof(pCustomerParam->SimIccidV), (char *)simIccidTmp[0]);
snprintf((char *)pCustomerParam->SimIccidA, sizeof(pCustomerParam->SimIccidA), (char *)simIccidTmp[1]);
s32ret = sf_4G_register_net_manual(pfnParam); s32ret = sf_4G_register_net_manual(pfnParam);

View File

@ -2511,7 +2511,7 @@ void sf_save_camera_info(void)
sf_get_wifi_ssid(wifissid); sf_get_wifi_ssid(wifissid);
SF_SPRINTF(temp, "IMEI:%s\r\nSoftwareVER:%s\r\nModuleVER:%s\r\nMcuVER:%s\r\nICCID:%s\r\nICCID-A:%s\r\nICCID-V:%s\r\nSSID:%s\r\nBLE:%s\r\n", SF_SPRINTF(temp, "IMEI:%s\r\nSoftwareVER:%s\r\nModuleVER:%s\r\nMcuVER:%s\r\nICCID:%s\r\nICCID-A:%s\r\nICCID-V:%s\r\nSSID:%s\r\nBLE:%s\r\n",
puiPara->ModuleImei, localver, puiPara->ModuleSubver, mcuver, puiPara->SimIccid, puiPara->SimIccid, puiPara->SimIccid, wifissid,puiPara->BluSsid); puiPara->ModuleImei, localver, puiPara->ModuleSubver, mcuver, puiPara->SimIccid, puiPara->SimIccidA, puiPara->SimIccidV, wifissid,puiPara->BluSsid);
if(access((char*)SF_CAMERA_INFO_FILENAME, F_OK) == 0) if(access((char*)SF_CAMERA_INFO_FILENAME, F_OK) == 0)
{ {

View File

@ -576,6 +576,8 @@ typedef struct _UIMenuUIMenuStoreInfo {
UINT32 FileKey; UINT32 FileKey;
CHAR BluSsid[14]; CHAR BluSsid[14];
CHAR BluSwitch;/*OFF/ON*/ CHAR BluSwitch;/*OFF/ON*/
CHAR SimIccidV[21];
CHAR SimIccidA[21];
UINT32 x1; UINT32 x1;
UINT32 x2; UINT32 x2;
UINT32 x3; UINT32 x3;