Commit 072e6f01fbcde07188d2f62ca38311a363efda57

Authored by xiemeng
1 parent 183a3caf

update some buglist

... ... @@ -225,7 +225,22 @@ void SNBase::PopupMsgBox(const char* strTilte, UINT uType, const char* strMsg, .
225 225
226 226 bool SNBase::NeedScanData()
227 227 {
228   - return true;
  228 + if (g_sMetaComm.sWriteOption.bWriteBarcode ||
  229 + g_sMetaComm.sWriteOption.bWriteIMEI ||
  230 + g_sMetaComm.sWriteOption.bWriteBT ||
  231 + g_sMetaComm.sWriteOption.bWriteWifi ||
  232 + g_sMetaComm.sWriteOption.bWriteEthernetMac ||
  233 + g_sMetaComm.sWriteOption.bWriteDrmkeyMCID ||
  234 + g_sMetaComm.sWriteOption.bWriteMeid ||
  235 + g_sMetaComm.sWriteOption.bWriteEsn ||
  236 + g_sMetaComm.sWriteOption.bWriteSerialNo)
  237 + {
  238 + return true;
  239 + }
  240 + else
  241 + {
  242 + return false;
  243 + }
229 244 }
230 245
231 246 CheckCalFlag_Status_e SNBase::CheckCalibrationStatus(const char* strBarcode)
... ... @@ -332,19 +347,19 @@ META_RESULT SNBase::ConductBarcodeData(char *pOutData, unsigned short RID_para,
332 347
333 348 strncpy(pOutData, pInDatabuf, BARCODE_MAX_LENGTH);
334 349
335   - if (flag_wire != '\0' && flag_cal[0] != '\0' && flag_cal[1] != '\0' && flag_nsft != '\0')
336   - {
337   - int barcode_len;
338   - barcode_len = strlen(pOutData);
339   - if (barcode_len < 59)
340   - memset(pOutData + barcode_len, 0x20, 59 - barcode_len);
341   -
342   - pOutData[59] = flag_wire;
343   - pOutData[60] = flag_cal[0];
344   - pOutData[61] = flag_cal[1];
345   - pOutData[62] = flag_nsft;
346   - pOutData[63] = '\0';
347   - }
  350 +// if (flag_wire != '\0' && flag_cal[0] != '\0' && flag_cal[1] != '\0' && flag_nsft != '\0')
  351 +// {
  352 +// int barcode_len;
  353 +// barcode_len = strlen(pOutData);
  354 +// if (barcode_len < 59)
  355 +// memset(pOutData + barcode_len, 0x20, 59 - barcode_len);
  356 +//
  357 +// pOutData[59] = flag_wire;
  358 +// pOutData[60] = flag_cal[0];
  359 +// pOutData[61] = flag_cal[1];
  360 +// pOutData[62] = flag_nsft;
  361 +// pOutData[63] = '\0';
  362 +// }
348 363
349 364 // Sync to AP Prod_Info
350 365 strncpy(m_sScanData.strBarcode, pOutData, BARCODE_MAX_LENGTH);
... ...
... ... @@ -168,7 +168,7 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
168 168 iRet = APSwithToModemMeta_Ex();
169 169 if (iRet == META_SUCCESS)
170 170 {
171   - spNextStage = SP_BARCODE_MD_STAGE;
  171 + spNextStage = SP_CHECK_CAL_FT_FLAG_STAGE;
172 172 }
173 173 else
174 174 {
... ... @@ -180,27 +180,66 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
180 180 case SP_CHECK_CAL_FT_FLAG_STAGE:
181 181 {
182 182 char tmpBuf[2048] = {0};
183   - iRet = REQ_ReadModem_NVRAM_Start(WRITE_BARCODE, m_sScanData.strBarcode, 1);
  183 + iRet = REQ_ReadModem_NVRAM_Start(WRITE_BARCODE, tmpBuf, 1);
184 184 if (iRet == META_SUCCESS)
185 185 {
186   - g_pMainDlg->mybarcode = CString(m_sScanData.strBarcode);
187   - g_pMainDlg->GetDlgItem(IDC_STATIC_BARCODE)->SetWindowText(m_sScanData.strBarcode);
188   - spNextStage = SP_BARCODE_MD_STAGE;
  186 + bool bCheckPass = true;
  187 + bCheckPass = CheckCalFinalTestStatus(tmpBuf);
  188 + if (bCheckPass == true)
  189 + {
  190 + spNextStage = SP_BARCODE_MD_STAGE;
  191 + }
  192 + else
  193 + {
  194 + iRet = META_FAILED;
  195 + spNextStage = SP_END_STAGE;
  196 + }
189 197 }
190 198 else
191 199 {
  200 + UpdateUIMsg("ERROR!! Read Barcode: MetaResult = %s", ResultToString(iRet));
192 201 spNextStage = SP_END_STAGE;
193 202 }
194 203 }
195 204 break;
196 205
197   -
198 206 case SP_BARCODE_MD_STAGE:
199 207 if (g_sMetaComm.sWriteOption.bWriteIMEI)
200   - multiIMEIOption = DUAL_MD_DUAL_IMEI;
  208 + {
  209 + if (mdNums == 1 && g_sMetaComm.sIMEIOption.iImeiNums == 1)
  210 + {
  211 + multiIMEIOption = SINGLE_MD_SINGLE_IMEI;
  212 + }
  213 + else if (mdNums == 1 && g_sMetaComm.sIMEIOption.iImeiNums >= 2)
  214 + {
  215 + multiIMEIOption = SINGLE_MD_MULTI_IMEI;
  216 + }
  217 + else if (mdNums == 2)
  218 + {
  219 + if (m_iC2kProject != 0 && g_sMetaComm.sIMEIOption.iImeiNums == 1)
  220 + {
  221 + multiIMEIOption = SINGLE_MD_SINGLE_IMEI;
  222 + }
  223 + if (m_iC2kProject != 0 && g_sMetaComm.sIMEIOption.iImeiNums >= 2 )
  224 + {
  225 + multiIMEIOption = SINGLE_MD_MULTI_IMEI;
  226 + }
  227 + if (g_sMetaComm.eTargetType == SMART_PHONE_DUALMODEM && g_sMetaComm.sIMEIOption.iImeiNums == 2)
  228 + {
  229 + multiIMEIOption = DUAL_MD_DUAL_IMEI;
  230 + }
  231 + }
  232 + else
  233 + {
  234 + multiIMEIOption = MULTIIMEI_RESERVE;
  235 + }
  236 + }
201 237 spNextStage = SP_IMEI_MD_STAGE;
  238 +
202 239 break;
  240 +
203 241 case SP_IMEI_MD_STAGE:
  242 +
204 243 bWriteModemFail = false;
205 244 for (MDIndex = 0; MDIndex < mdNums && bWriteModemFail == false; MDIndex++)
206 245 {
... ... @@ -233,39 +272,7 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
233 272 {
234 273 fBeginProcess += fStep;
235 274 MTRACE(g_hEBOOT_DEBUG, "Barcode[%d] = \"%s\"", MDIndex, m_sScanData.strBarcode);
236   - switch (g_pMainDlg->myintcft)
237   - {
238   - case 0:
239   - m_sScanData.strBarcode[60] = ' ';
240   - m_sScanData.strBarcode[61] = ' ';
241   - m_sScanData.strBarcode[62] = ' ';
242   - break;
243   - case 1:
244   - m_sScanData.strBarcode[60] = '1';
245   - m_sScanData.strBarcode[61] = '0';
246   - m_sScanData.strBarcode[62] = 'P';
247   - break;
248   - case 2:
249   - m_sScanData.strBarcode[60] = '0';
250   - m_sScanData.strBarcode[61] = '1';
251   - m_sScanData.strBarcode[62] = 'F';
252   - break;
253   - }
254   -
255   - switch (g_pMainDlg->myintsmt)
256   - {
257   - case 0:
258   - m_sScanData.strBarcode[55] = ' ';
259   - break;
260   - case 1:
261   - m_sScanData.strBarcode[55] = '1';
262   - break;
263   - case 2:
264   - m_sScanData.strBarcode[55] = '3';
265   - break;
266   - }
267   -
268   - iRet = REQ_WriteModem_NVRAM_Start(WRITE_BARCODE, m_sScanData.strBarcode, 1);
  275 + iRet = REQ_WriteModem_NVRAM_Start(WRITE_BARCODE, m_sScanData.strBarcode, 1);
269 276 if (iRet != META_SUCCESS)
270 277 {
271 278 UpdateUIMsg("ERROR!! Barcode[%d] : MetaResult = %s", MDIndex, ResultToString(iRet));
... ... @@ -359,27 +366,17 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
359 366 }
360 367 }
361 368
  369 + if (bWriteModemFail == true)
  370 + {
362 371 spNextStage = SP_END_STAGE;
363   -
364   - break;
365   -
366   -
367   - case SP_PRODINFO_STAGE:
368   - {
369   - if (m_bWriteProdInfo && g_sMetaComm.bSkipWriteProdInfo == false)
  372 + }
  373 + else
370 374 {
371   - MTRACE(g_hEBOOT_DEBUG, "Prod_Info = \"...\"");
372   - fBeginProcess += fStep;
373   - iRet = REQ_WriteAP_PRODINFO_Start();
374   - if (iRet != META_SUCCESS)
375   - {
376   - UpdateUIMsg("ERROR!! Prod_Info : MetaResult = %s", ResultToString_SP(iRet));
377   - }
  375 + spNextStage = SP_END_STAGE;
378 376 }
379   - spNextStage = SP_END_STAGE;
380 377
381 378 break;
382   - }
  379 +
383 380 }
384 381
385 382 spStage = spNextStage;
... ... @@ -1278,47 +1275,6 @@ SPMETA_DLL::META_RESULT SmartPhoneSN::REQ_WriteAP_PRODINFO_Start()
1278 1275 SPMETA_DLL::FT_NVRAM_READ_REQ sNVRAM_ReadReq;
1279 1276 SPMETA_DLL::FT_NVRAM_READ_CNF sNVRAM_ReadCnf;
1280 1277
1281   - // Check
1282   - if (g_sMetaComm.sWriteOption.bWriteBarcode)
1283   - {
1284   - if (m_sScanData.strBarcode == NULL || strlen(m_sScanData.strBarcode) == 0)
1285   - {
1286   - return SPMETA_DLL::META_INVALID_ARGUMENTS;
1287   - }
1288   - }
1289   - if (g_sMetaComm.sWriteOption.bWriteIMEI)
1290   - {
1291   - for (int i = 0; i < g_sMetaComm.sIMEIOption.iImeiNums; i++)
1292   - {
1293   - if (m_sScanData.strIMEI[i] == NULL || strlen(m_sScanData.strIMEI[i]) == 0)
1294   - {
1295   - MTRACE(g_hEBOOT_DEBUG, "i = %d", i);
1296   - return SPMETA_DLL::META_INVALID_ARGUMENTS;
1297   - }
1298   - }
1299   - }
1300   - if (g_sMetaComm.sWriteOption.bWriteBT)
1301   - {
1302   - if (m_sScanData.strBTAddr == NULL || strlen(m_sScanData.strBTAddr) == 0)
1303   - {
1304   - return SPMETA_DLL::META_INVALID_ARGUMENTS;
1305   - }
1306   - }
1307   - if (g_sMetaComm.sWriteOption.bWriteWifi)
1308   - {
1309   - if (m_sScanData.strWifiAddr == NULL || strlen(m_sScanData.strWifiAddr) == 0)
1310   - {
1311   - return SPMETA_DLL::META_INVALID_ARGUMENTS;
1312   - }
1313   - }
1314   - if (g_sMetaComm.sWriteOption.bWriteSerialNo)
1315   - {
1316   - if (m_sScanData.strSerialNo == NULL || strlen(m_sScanData.strSerialNo) == 0)
1317   - {
1318   - return SPMETA_DLL::META_INVALID_ARGUMENTS;
1319   - }
1320   - }
1321   -
1322 1278 memset(&sNVRAM_WriteReq, 0, sizeof(SPMETA_DLL::FT_NVRAM_WRITE_REQ));
1323 1279 memset(&sNVRAM_ReadReq, 0, sizeof(SPMETA_DLL::FT_NVRAM_READ_REQ));
1324 1280 memset(&sNVRAM_ReadCnf, 0, sizeof(SPMETA_DLL::FT_NVRAM_READ_CNF));
... ... @@ -1372,6 +1328,7 @@ SPMETA_DLL::META_RESULT SmartPhoneSN::REQ_WriteAP_PRODINFO_Start()
1372 1328 else
1373 1329 {
1374 1330 memcpy(pWriteData, sNVRAM_ReadCnf.buf, iWriteBufSize);
  1331 + pWriteData[g_sMetaComm.QCFlag_index] = g_pMainDlg->myintqc;
1375 1332 MTRACE(g_hEBOOT_DEBUG, "SmartPhoneSN::ConductProdInfoData(): Conduct Prod_Info nvram data successfully!!");
1376 1333 }
1377 1334
... ... @@ -1445,122 +1402,6 @@ Err:
1445 1402 return meta_result;
1446 1403 }
1447 1404
1448   -
1449   -
1450   -SPMETA_DLL::META_RESULT SmartPhoneSN::REQ_WriteAP_PRODINFO_QC()
1451   -{
1452   - SPMETA_DLL::META_RESULT meta_result = SPMETA_DLL::META_SUCCESS;
1453   - m_bWriteNvram = true;
1454   - MTRACE(g_hEBOOT_DEBUG, "SmartPhoneSN::REQ_WriteAP_PRODINFO_Start(): Write Barcode/Imei/Bt/Wifi/Serial.No to prod_info start...");
1455   -
1456   - int iIMEINums = g_sMetaComm.sIMEIOption.iImeiNums;
1457   - int iMetaTimeout = 5000;
1458   - int iWriteBufSize = 0;
1459   - char *pLID = "AP_CFG_REEB_PRODUCT_INFO_LID";
1460   - char *pFuncName = NULL;
1461   - unsigned char *pWriteData = NULL;
1462   -
1463   - SPMETA_DLL::FT_NVRAM_WRITE_REQ sNVRAM_WriteReq;
1464   - SPMETA_DLL::FT_NVRAM_READ_REQ sNVRAM_ReadReq;
1465   - SPMETA_DLL::FT_NVRAM_READ_CNF sNVRAM_ReadCnf;
1466   - memset(&sNVRAM_WriteReq, 0, sizeof(SPMETA_DLL::FT_NVRAM_WRITE_REQ));
1467   - memset(&sNVRAM_ReadReq, 0, sizeof(SPMETA_DLL::FT_NVRAM_READ_REQ));
1468   - memset(&sNVRAM_ReadCnf, 0, sizeof(SPMETA_DLL::FT_NVRAM_READ_CNF));
1469   - meta_result = SPMETA_DLL::SP_META_NVRAM_GetRecLen(pLID, &iWriteBufSize);
1470   - if ( SPMETA_DLL::META_SUCCESS != meta_result)
1471   - return meta_result;
1472   - if ( NULL != sNVRAM_ReadCnf.buf )
1473   - {
1474   - free(sNVRAM_ReadCnf.buf);
1475   - sNVRAM_ReadCnf.buf = NULL;
1476   - }
1477   -
1478   - if (NULL != pWriteData)
1479   - {
1480   - free(pWriteData);
1481   - pWriteData = NULL;
1482   - }
1483   -
1484   - sNVRAM_ReadReq.LID = pLID;
1485   - sNVRAM_ReadReq.RID = 1;
1486   - sNVRAM_ReadCnf.len = iWriteBufSize;
1487   - sNVRAM_ReadCnf.buf = (unsigned char*) malloc(iWriteBufSize * sizeof(unsigned char));
1488   - pWriteData = (unsigned char*) malloc(iWriteBufSize * sizeof(unsigned char));
1489   - if (NULL == sNVRAM_ReadCnf.buf || NULL == pWriteData)
1490   - return SPMETA_DLL::META_FAILED;
1491   - meta_result = REQ_ReadFromAPNVRAM (&sNVRAM_ReadReq, &sNVRAM_ReadCnf);
1492   - if (meta_result != SPMETA_DLL::META_SUCCESS )
1493   - {
1494   - pFuncName = "SmartPhoneSN::REQ_ReadFromAPNVRAM()";
1495   - goto Err;
1496   - }
1497   -
1498   -
1499   - meta_result = ConductProdInfoData(sNVRAM_ReadCnf.buf, iWriteBufSize);
1500   - if (meta_result != SPMETA_DLL::META_SUCCESS)
1501   - {
1502   - pFuncName = "SmartPhoneSN::ConductProdInfoData()";
1503   - goto Err;
1504   - }
1505   - else
1506   - {
1507   - memcpy(pWriteData, sNVRAM_ReadCnf.buf, iWriteBufSize);
1508   - sNVRAM_ReadCnf.buf[g_sMetaComm.QCFlag_index] = g_pMainDlg->myintqc + 0x30;
1509   - }
1510   -
1511   - sNVRAM_WriteReq.LID = pLID;
1512   - sNVRAM_WriteReq.RID = 1;
1513   - sNVRAM_WriteReq.len = iWriteBufSize;
1514   - sNVRAM_WriteReq.buf = pWriteData;
1515   - m_sNVRAM_OPID = 1;
1516   - meta_result = REQ_WriteToAPNVRAM(sNVRAM_WriteReq);
1517   - if (meta_result != SPMETA_DLL::META_SUCCESS )
1518   - {
1519   - pFuncName = "SmartPhoneSN::REQ_WriteToAPNVRAM()";
1520   - goto Err;
1521   - }
1522   - memset(sNVRAM_ReadCnf.buf, 0 , sNVRAM_ReadCnf.len);
1523   - meta_result = REQ_ReadFromAPNVRAM (&sNVRAM_ReadReq, &sNVRAM_ReadCnf);
1524   - if (meta_result != SPMETA_DLL::META_SUCCESS )
1525   - {
1526   - pFuncName = "SmartPhoneSN::REQ_ReadFromAPNVRAM()";
1527   - goto Err;
1528   - }
1529   - else
1530   - {
1531   - if (memcmp(sNVRAM_ReadCnf.buf, pWriteData, sNVRAM_ReadCnf.len) != 0)
1532   - {
1533   - meta_result = SPMETA_DLL::META_FAILED;
1534   - }
1535   - }
1536   - if (sNVRAM_ReadCnf.buf != NULL)
1537   - {
1538   - free (sNVRAM_ReadCnf.buf);
1539   - sNVRAM_ReadCnf.buf = NULL;
1540   - }
1541   - if (pWriteData != NULL)
1542   - {
1543   - free (pWriteData);
1544   - pWriteData = NULL;
1545   - }
1546   - return meta_result;
1547   -
1548   -Err:
1549   - if (sNVRAM_ReadCnf.buf != NULL)
1550   - {
1551   - free (sNVRAM_ReadCnf.buf);
1552   - sNVRAM_ReadCnf.buf = NULL;
1553   - }
1554   - if (pWriteData != NULL)
1555   - {
1556   - free (pWriteData);
1557   - pWriteData = NULL;
1558   - }
1559   - return meta_result;
1560   -}
1561   -
1562   -
1563   -
1564 1405 int SmartPhoneSN::LoadHDCPBinFile(const char *strHdcpBinPath)
1565 1406 {
1566 1407 int iRet = 0;
... ... @@ -2285,101 +2126,6 @@ SPMETA_DLL::META_RESULT SmartPhoneSN::REQ_ReadAP_NVRAM_Start(WriteData_Type_e da
2285 2126 return MetaResult;
2286 2127 }
2287 2128
2288   -
2289   -
2290   -#if 1//def __TOPWELL_QCTEST__
2291   -byte SmartPhoneSN::REQ_ReadAP_NVRAM_QC(void)
2292   -{
2293   - MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::REQ_ReadAP_NVRAM_QC()...");
2294   -
2295   - SPMETA_DLL::META_RESULT MetaResult = SPMETA_DLL::META_SUCCESS;
2296   - int iBufLen = 0;
2297   - char *pLID = NULL;
2298   - CString mytest,mytesttemp;
2299   - pLID = "AP_CFG_REEB_PRODUCT_INFO_LID";
2300   -
2301   - // pLID = "AP_CFG_REEB_PRODUCT_INFO_LID";
2302   - SPMETA_DLL::FT_NVRAM_READ_REQ sNVRAM_ReadReq;
2303   - SPMETA_DLL::FT_NVRAM_READ_CNF sNVRAM_ReadCnf;
2304   - SPMETA_DLL::META_RESULT meta_result;
2305   - int iWriteBufSize = 0;
2306   - memset(&sNVRAM_ReadReq, 0, sizeof(SPMETA_DLL::FT_NVRAM_READ_REQ));
2307   - memset(&sNVRAM_ReadCnf, 0, sizeof(SPMETA_DLL::FT_NVRAM_READ_CNF));
2308   -
2309   - MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::SP_META_NVRAM_GetRecLen(): Start to get nvram struct size via LID = \"%s\"...", pLID);
2310   - meta_result = SPMETA_DLL::SP_META_NVRAM_GetRecLen(pLID, &iWriteBufSize);
2311   - if ( SPMETA_DLL::META_SUCCESS != meta_result)
2312   - {
2313   - MTRACE_ERR (g_hEBOOT_DEBUG, "SmartPhoneSN::SP_META_NVRAM_GetRecLen(): Get nvram struct size fail, MetaResult = %s", ResultToString_SP(meta_result));
2314   - return 0;
2315   - }
2316   - else
2317   - {
2318   - MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::SP_META_NVRAM_GetRecLen(): Get nvram struct size = %d successfully!", iWriteBufSize);
2319   - if ( NULL != sNVRAM_ReadCnf.buf )
2320   - {
2321   - free ( sNVRAM_ReadCnf.buf );
2322   - sNVRAM_ReadCnf.buf = NULL;
2323   - }
2324   -
2325   - sNVRAM_ReadReq.LID = pLID;
2326   - sNVRAM_ReadReq.RID = 1;
2327   - sNVRAM_ReadCnf.len = iWriteBufSize;
2328   - sNVRAM_ReadCnf.buf = (unsigned char*) malloc (iWriteBufSize*sizeof(unsigned char));
2329   - if (NULL == sNVRAM_ReadCnf.buf)
2330   - {
2331   - MTRACE_ERR (g_hEBOOT_DEBUG, "Malloc heap memory cause fail!");
2332   - return 0;
2333   - }
2334   - }
2335   -
2336   - MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::REQ_ReadFromAPNVRAM(): Start to read nvram data...");
2337   - meta_result = REQ_ReadFromAPNVRAM (&sNVRAM_ReadReq, &sNVRAM_ReadCnf);
2338   -
2339   -
2340   - if (meta_result != SPMETA_DLL::META_SUCCESS )
2341   - {
2342   -
2343   -
2344   -
2345   - MTRACE_ERR (g_hEBOOT_DEBUG, "REQ_ReadFromAPNVRAM: fail! MetaResult = %s", ResultToString_SP(meta_result));
2346   - return 0;
2347   - }
2348   -
2349   - {
2350   - int loop = 0;
2351   - for (;loop<iWriteBufSize;loop++)
2352   - {
2353   - if(loop%50 == 0)
2354   - mytesttemp.Format(" %d_%x\n",loop,sNVRAM_ReadCnf.buf[loop]);
2355   - else
2356   - mytesttemp.Format(" %d_%x",loop,sNVRAM_ReadCnf.buf[loop]);
2357   - mytest += mytesttemp;
2358   - }
2359   - }
2360   -
2361   - if(sNVRAM_ReadCnf.buf[1006] == 0)
2362   - {
2363   - // ::AfxMessageBox("QC test fail");
2364   - return 0;
2365   - }
2366   - else if(sNVRAM_ReadCnf.buf[1006] == 1)
2367   - {
2368   - // ::AfxMessageBox("QC test pass");
2369   - return 1;
2370   - }
2371   - else
2372   - {
2373   - return 3;
2374   - }
2375   -
2376   -
2377   -}
2378   -
2379   -
2380   -
2381   -#endif
2382   -
2383 2129 SPMETA_DLL::META_RESULT SmartPhoneSN::REQ_WriteAP_NVRAM_Start(WriteData_Type_e dataType, char *pInData, unsigned short iRID)
2384 2130 {
2385 2131 if (!pInData)
... ... @@ -2981,7 +2727,7 @@ META_RESULT SmartPhoneSN::REQ_WriteModem_NVRAM_Start(WriteData_Type_e dataType,
2981 2727 MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::REQ_ReadFromModemNVRAM(): Read nvram data successfully!");
2982 2728
2983 2729
2984   - meta_result = (this->*pDataFunc)((char*)sNVRAM_ReadCnf.buf, iRID, pInData, iBufLen);
  2730 + //meta_result = (this->*pDataFunc)((char*)sNVRAM_ReadCnf.buf, iRID, pInData, iBufLen);
2985 2731 if (meta_result != META_SUCCESS)
2986 2732 {
2987 2733 goto Err;
... ... @@ -4009,8 +3755,10 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4009 3755 }
4010 3756 else
4011 3757 {
4012   - if (g_sMetaComm.sWriteOption.bWriteBarcode || g_sMetaComm.sWriteOption.bWriteIMEI)
  3758 + if (g_sMetaComm.sWriteOption.bWriteBarcode ||g_sMetaComm.sWriteOption.bWriteIMEI)
  3759 + {
4013 3760 bNeedLoadAPDB = true;
  3761 + }
4014 3762 }
4015 3763
4016 3764 bool bAnyOperationFail = false;
... ... @@ -4054,25 +3802,6 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4054 3802 MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::MetaHandle_Init() end...");
4055 3803
4056 3804 CScanData scanDlg;
4057   - g_sMetaComm.sWriteOption.bWriteBarcode = true;
4058   -
4059   - if(g_pMainDlg->mystrimei1 == "" ||g_pMainDlg->mystrimei2 == "")
4060   - g_sMetaComm.sWriteOption.bWriteIMEI = false;
4061   - else
4062   - {
4063   - strncpy(g_sMetaComm.sScanData.strIMEI[0], (LPCTSTR)g_pMainDlg->mystrimei1, strlen(g_pMainDlg->mystrimei1) + 1);
4064   - strncpy(g_sMetaComm.sScanData.strIMEI[1], (LPCTSTR)g_pMainDlg->mystrimei2, strlen(g_pMainDlg->mystrimei2) + 1);
4065   - g_sMetaComm.sWriteOption.bWriteIMEI = true;
4066   - }
4067   -
4068   - g_sMetaComm.sWriteOption.bWriteWifi = false;
4069   - g_sMetaComm.sWriteOption.bWriteHdcp = false;
4070   - g_sMetaComm.sWriteOption.bWriteDrm = false;
4071   - g_sMetaComm.sWriteOption.bInstallHdcpData = false;
4072   - g_sMetaComm.sWriteOption.bWriteEthernetMac = false;
4073   - g_sMetaComm.sWriteOption.bWriteDrmkeyMCID = false;
4074   - g_sMetaComm.sWriteOption.bWriteMeid = false;
4075   - g_sMetaComm.sWriteOption.bWriteEsn = false;
4076 3805
4077 3806
4078 3807 if (*m_pMetaStopFlag == BOOT_STOP)
... ... @@ -4082,8 +3811,8 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4082 3811 if (iTestCount >= g_sMetaComm.iStressTest)
4083 3812 return;
4084 3813 }
4085   - else if (!bSkipScanData)
4086   - return;
  3814 +
  3815 +
4087 3816 iTestCount++;
4088 3817
4089 3818 DebugOnOff(true);
... ... @@ -4102,7 +3831,54 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4102 3831 SPInit();
4103 3832
4104 3833 SetupMetaModeParameters();
  3834 +
4105 3835
  3836 + strncpy(m_sScanData.strBarcode, "032501_110225 1 10P", 64);
  3837 + switch (g_pMainDlg->myintcft)
  3838 + {
  3839 + case 0:
  3840 + m_sScanData.strBarcode[60] = ' ';
  3841 + m_sScanData.strBarcode[61] = ' ';
  3842 + m_sScanData.strBarcode[62] = ' ';
  3843 + break;
  3844 + case 1:
  3845 + m_sScanData.strBarcode[60] = '1';
  3846 + m_sScanData.strBarcode[61] = '0';
  3847 + m_sScanData.strBarcode[62] = 'P';
  3848 + break;
  3849 + case 2:
  3850 + m_sScanData.strBarcode[60] = '0';
  3851 + m_sScanData.strBarcode[61] = '1';
  3852 + m_sScanData.strBarcode[62] = 'F';
  3853 + break;
  3854 + }
  3855 +
  3856 + switch (g_pMainDlg->myintsmt)
  3857 + {
  3858 + case 0:
  3859 + m_sScanData.strBarcode[55] = ' ';
  3860 + break;
  3861 + case 1:
  3862 + m_sScanData.strBarcode[55] = '1';
  3863 + break;
  3864 + case 2:
  3865 + m_sScanData.strBarcode[55] = '3';
  3866 + break;
  3867 + }
  3868 + if (g_pMainDlg->mystrimei1 == "" || g_pMainDlg->mystrimei2 == "")
  3869 + {
  3870 + g_sMetaComm.sWriteOption.bWriteIMEI = false;
  3871 + }
  3872 + else
  3873 + {
  3874 + strncpy(m_sScanData.strIMEI[0], (LPCTSTR)g_pMainDlg->mystrimei1, strlen(g_pMainDlg->mystrimei1)+1);
  3875 + strncpy(m_sScanData.strIMEI[1], (LPCTSTR)g_pMainDlg->mystrimei2, strlen(g_pMainDlg->mystrimei2)+1);
  3876 + g_sMetaComm.sIMEIOption.iImeiNums = DUAL_MD_DUAL_IMEI;
  3877 + g_sMetaComm.sWriteOption.bWriteIMEI = true;
  3878 + }
  3879 +
  3880 +
  3881 +
4106 3882 UpdateUIMsg("Start load and init AP database...");
4107 3883
4108 3884
... ... @@ -4192,9 +3968,7 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4192 3968 goto End;
4193 3969 }
4194 3970 MTRACE (g_hEBOOT_DEBUG, "SmartPhoneSN::GetSPModemInfo_Ex(): Query modem information end.");
4195   -
4196   - REQ_WriteAP_PRODINFO_QC();
4197   -
  3971 + REQ_WriteAP_PRODINFO_Start();
4198 3972 }
4199 3973
4200 3974 //Special case: m_bWriteModemNvram = true && m_sMdInfo.number_of_md = 0
... ... @@ -4284,12 +4058,12 @@ End:
4284 4058 UpdateUIMsg("All Operate successfully!!");
4285 4059 MTRACE(g_hEBOOT_DEBUG, "SmartPhoneSN::All Operate successfully!!");
4286 4060
4287   - #ifdef _AUTO_GEN_FEATURE_
  4061 +#ifdef _AUTO_GEN_FEATURE_
4288 4062 if (g_AutoGenData.bEnableAutoGen)
4289 4063 {
4290 4064 UpdateAutoGenParaToSetupFile();
4291 4065 }
4292   - #endif
  4066 +#endif
4293 4067 UpdateUICountResult(PASS);
4294 4068 }
4295 4069
... ... @@ -4305,7 +4079,6 @@ End:
4305 4079 Sleep(bSkipScanData ? 3000 : 1000);
4306 4080
4307 4081
4308   -
4309 4082 if (g_sMetaComm.bCheckFastbootLock)
4310 4083 {
4311 4084 Adb_Manager_Deinit();
... ...
... ... @@ -73,10 +73,6 @@ protected:
73 73 virtual SPMETA_DLL::META_RESULT LoadAPDatabase();
74 74
75 75 virtual SPMETA_DLL::META_RESULT REQ_ReadAP_NVRAM_Start(WriteData_Type_e dataType, char *pOutData, unsigned short iRID);
76   - #if 1//def __TOPWELL_QCTEST__
77   - virtual byte REQ_ReadAP_NVRAM_QC();
78   - virtual SPMETA_DLL::META_RESULT REQ_WriteAP_PRODINFO_QC();
79   - #endif
80 76 virtual SPMETA_DLL::META_RESULT REQ_WriteAP_NVRAM_Start(WriteData_Type_e dataType, char *pInData, unsigned short iRID);
81 77 virtual META_RESULT REQ_ReadModem_NVRAM_Start(WriteData_Type_e dataType, char *pOutData, unsigned short iRID);
82 78 virtual META_RESULT REQ_WriteModem_NVRAM_Start(WriteData_Type_e dataType, char *pInData, unsigned short iRID);
... ...
1   -; NOTE: this file should be edited when SN_Writer tool was closed
2   -
3 1 [System Setup]
4 2 Stress Test = 0
5   -
6   -; mobile/tablet/... had in meta mode
7 3 Already in Meta = False
8   -
9   -; keep in meta mode when finish write
10 4 Keep in Meta = False
11   -
12 5 Clear Meta Boot Flag = False
13 6 Operator Mode = 0
14 7 Preloader Connect Timeout = 20000
15 8 Kernel Connect Timeout = 120000
16 9 Target type = 1
17   -
18   -; com port scan filter, white list, use space/tab/comma/semicolon to split multi-filters
19 10 Brom Port Filter = VID_0E8D&PID_0003
20 11 Preloader Port Filter = VID_0E8D&PID_2000 VID_0525&PID_A4A7 VID_1004&PID_6000
21 12 Kernel Port Filter = VID_0E8D&PID_2007 VID_0E8D&PID_2006&MI_02 VID_0E8D&PID_2040&MI_02 VID_0BB4&PID_0005&MI_02 VID_1004&PID_6000
22   -
23   -; enable adb port
24 13 Composite Device Enable = False
25   -
26 14 Usb Enable = True
27 15 USBSwitchTool Enable = False
28 16 DualTalk Enable = False
... ... @@ -33,21 +21,25 @@ Check BackupNv to PC Enable = False
33 21 Check Fastboot OEM Lock Enable = False
34 22 Check Calibration flag Enable = False
35 23 Check FinalTest flag Enable = False
36   -Write Meid = True
  24 +Check QCTest flag Enable = False
  25 +QCTest_flag_index = 1006
  26 +Check_SW_VER =
  27 +Write Meid = False
37 28 Write Esn = False
38 29 Write Barcode = True
39 30 Write IMEI = True
40 31 Write Serial No. = False
41 32 Write BT = True
42   -Write Wifi = True
  33 +Write Wifi = False
43 34 Write Hdcp = False
44 35 Write DRMKey = False
45 36 Install Hdcp Data = False
46 37 Write Ethernet Mac Address = False
47 38 Write DRMkey MCID = False
48   -IMEI Nums = 1
  39 +IMEI Nums = 2
49 40 IMEI CheckSum = True
50 41 IMEI Lock = False
  42 +Lock OTP = False
51 43 DualIMEI same = False
52 44 IMEI_1 Check header = False
53 45 IMEI_2 Check header = False
... ... @@ -76,9 +68,9 @@ Ethernet header string =
76 68 DRMKey MCID header string =
77 69 AP DB from DUT = False
78 70 MD DB from DUT = False
79   -Modem_1 database path =
  71 +Modem_1 database path = D:\work\db\BPLGUInfoCustomAppSrcP_MT6735_S00_MOLY_LR9_W1444_MD_LWTG_MP_V110_5_P5_1_lwg_n
80 72 Modem_2 database path =
81   -AP database path =
  73 +AP database path = D:\work\db\APDB_MT6735_S01_alps-mp-n0.mp1_W17.31
82 74 FP Auth path =
83 75 SP Auth path =
84 76 Hdcp Bin path =
... ... @@ -87,11 +79,10 @@ Hdcp data path =
87 79 Hdcp cek path =
88 80 Enable Write Temperature = True
89 81 The Current Temperature = 20.3
90   -Lock OTP = False
91 82 Log Dir = C:\SNWriter_LOG\
92 83 ModemLog = False
93 84 Enable Serial No = False
94   -Enable Lock OTP = False
95 85 Ignore Database Inconsistent = False
96 86 Serial Num From IMEI = False
97 87 IMEI Lock Hidden = True
  88 +Enable Lock OTP = False
... ...
Please register or login to post a comment