static int create_md_verinfo(char *info, int *len) {
char ccci_path[MAX_MODEM_INDEX][32];
memset(ccci_path, 0, sizeof(char) * MAX_MODEM_INDEX * 32);
char temp_ccci_path [MAX_MODEM_INDEX][32];
memset(temp_ccci_path, 0, sizeof(char) * MAX_MODEM_INDEX * 32);
char imei[4][128];
memset(imei, 0, sizeof(char) * 4 * 128);
char meid[128];
memset(meid, 0, sizeof(char) * 128);
char md_ver[2][128];
memset(md_ver, 0, sizeof(char) * 2 * 128);
char barcode[2][128];
memset(barcode, 0, sizeof(char) * 2 * 128);
Connection modem[5];
int md_num = get_md_count();
int lte_md_num = get_lte_md_count();
int sim_num = ftm_get_sim_num();
/*SUN:jicong.wang add start {@*/
int num=0;
connet:
/*SUN:jicong.wang add end @}*/
int i = 0, j = 0;
for(i = 0; i < MAX_MODEM_INDEX; i++)
{
if(1 == get_ccci_path(i,temp_ccci_path[i]))
{
strncpy(ccci_path[j],temp_ccci_path[i], strlen(temp_ccci_path[i]));
j++ ;
}
}
for (int i = 0; i < md_num; i++)
{
if (strlen(ccci_path[i]) > 0) {
if(0 == modem[i].Conn_Init(ccci_path[i],i,g_SIGNAL_Callback[i])) {
LOGD(TAG "modem %d open fail",(i));
} else {
LOGD(TAG "modem %d open OK",(i));
}
}
}
if (1 == isC2kSupport())
{
if(g_Flag_VPUP != 1)
{
if(ER_OK!= modem[md_num-1].QueryModemStatus())
{
g_Flag_VPUP = 0;
wait_URC(ID_VPUP);
}
else
{
g_Flag_VPUP = 1 ;
}
}
LOGD("modem c2k open successfully");
getMEID(modem[md_num-1], meid);
}
for (int i = 0; i < lte_md_num; i++)
{
if(g_Flag_EIND != 1)
{
if(ER_OK!= modem[i].QueryModemStatus())
{
g_Flag_EIND = 0 ;
wait_URC(ID_EIND);
}
else
{
g_Flag_EIND = 1 ;
}
}
}
getIMEI(1, modem[0], imei[0]);
getModemVersion(modem[0], md_ver[0]);
getBarcode(modem[0], barcode[0]);
/*SUN:jicong.wang add start {@*/
if(strlen(imei[0])==0 || strlen(md_ver[0])==0 || strlen(barcode[0])==0 ){
if(num<3){
num++;
LOGD(TAG "goto connect");
goto connet;
}
}
/*SUN:jicong.wang add end @}*/
....
android mtk p修改关机测试,快速进入版本信息后,modem imei barcode 为unknown的问题
最新推荐文章于 2023-05-06 11:13:18 发布