|
@@ -238,6 +238,8 @@ namespace MOKA_Factory_Tools
|
|
SetspecificText(m_checkFVP, LResource.Skip, Color.Yellow);
|
|
SetspecificText(m_checkFVP, LResource.Skip, Color.Yellow);
|
|
if (!cfg_writecheck.DAKCheckcheck)
|
|
if (!cfg_writecheck.DAKCheckcheck)
|
|
SetspecificText(m_checkDAK, LResource.Skip, Color.Yellow);
|
|
SetspecificText(m_checkDAK, LResource.Skip, Color.Yellow);
|
|
|
|
+ if (!cfg_writecheck.KFPCheckcheck)
|
|
|
|
+ SetspecificText(m_checkKFP, LResource.Skip, Color.Yellow);
|
|
#endregion
|
|
#endregion
|
|
#region 设置ReadCheck复选框默认状态
|
|
#region 设置ReadCheck复选框默认状态
|
|
/////////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////////
|
|
@@ -297,6 +299,8 @@ namespace MOKA_Factory_Tools
|
|
SetspecificText(m_readFVP, LResource.SkipChecking, Color.Yellow);
|
|
SetspecificText(m_readFVP, LResource.SkipChecking, Color.Yellow);
|
|
if (!cfg_readcheck.DAKReadcheck)
|
|
if (!cfg_readcheck.DAKReadcheck)
|
|
SetspecificText(m_readDAK, LResource.SkipChecking, Color.Yellow);
|
|
SetspecificText(m_readDAK, LResource.SkipChecking, Color.Yellow);
|
|
|
|
+ if (!cfg_readcheck.KFPReadcheck)
|
|
|
|
+ SetspecificText(m_readKFP, LResource.SkipChecking, Color.Yellow);
|
|
#endregion
|
|
#endregion
|
|
#region 设置WriteDone复选框默认状态
|
|
#region 设置WriteDone复选框默认状态
|
|
/////////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////////
|
|
@@ -354,6 +358,8 @@ namespace MOKA_Factory_Tools
|
|
SetspecificText(m_writeFVP, LResource.Skip, Color.Yellow);
|
|
SetspecificText(m_writeFVP, LResource.Skip, Color.Yellow);
|
|
if (!cfg_writedone.DAKWrite_YesNo)
|
|
if (!cfg_writedone.DAKWrite_YesNo)
|
|
SetspecificText(m_writeDAK, LResource.Skip, Color.Yellow);
|
|
SetspecificText(m_writeDAK, LResource.Skip, Color.Yellow);
|
|
|
|
+ if (!cfg_writedone.KFPWrite_YesNo)
|
|
|
|
+ SetspecificText(m_writeKFP, LResource.Skip, Color.Yellow);
|
|
if (FunctionSettingNow.WriteChannel)
|
|
if (FunctionSettingNow.WriteChannel)
|
|
ChannelText.Text = FunctionSettingNow.ChannelList;
|
|
ChannelText.Text = FunctionSettingNow.ChannelList;
|
|
else
|
|
else
|
|
@@ -911,6 +917,7 @@ namespace MOKA_Factory_Tools
|
|
//keyInfo.ACASKey_Tool.data = GetJsonValue(jObject["acaskey_tool"]);
|
|
//keyInfo.ACASKey_Tool.data = GetJsonValue(jObject["acaskey_tool"]);
|
|
keyInfo.DAK.data = GetJsonValue(jObject["dak"]);
|
|
keyInfo.DAK.data = GetJsonValue(jObject["dak"]);
|
|
keyInfo.FVP.data = GetJsonValue(jObject["FVP"]);
|
|
keyInfo.FVP.data = GetJsonValue(jObject["FVP"]);
|
|
|
|
+ keyInfo.KFP.data = GetJsonValue(jObject["kfp"]);
|
|
|
|
|
|
WriteDID.Checked = (keyInfo.DID.Length > 0 && m_writedid.Text != LResource.Skip);
|
|
WriteDID.Checked = (keyInfo.DID.Length > 0 && m_writedid.Text != LResource.Skip);
|
|
if (WriteDID.Checked)
|
|
if (WriteDID.Checked)
|
|
@@ -972,9 +979,11 @@ namespace MOKA_Factory_Tools
|
|
WriteDAK.Checked = (keyInfo.DAK.Length > 0 && m_writeDAK.Text != LResource.Skip);
|
|
WriteDAK.Checked = (keyInfo.DAK.Length > 0 && m_writeDAK.Text != LResource.Skip);
|
|
if (WriteDAK.Checked)
|
|
if (WriteDAK.Checked)
|
|
Log.WriteGetKeyLog("\r\nLocal DB DAK=" + keyInfo.DAK.data);
|
|
Log.WriteGetKeyLog("\r\nLocal DB DAK=" + keyInfo.DAK.data);
|
|
|
|
+ WriteKFP.Checked = (keyInfo.KFP.Length > 0 && m_writeKFP.Text != LResource.Skip);
|
|
|
|
+ if ( WriteKFP.Checked)
|
|
|
|
+ Log.WriteGetKeyLog("\r\nLocal DB KFP=" + keyInfo.KFP.data);
|
|
WriteFVP.Checked = m_writeFVP.Text != LResource.Skip;
|
|
WriteFVP.Checked = m_writeFVP.Text != LResource.Skip;
|
|
WriteDSN.Checked = (keyInfo.DSN.Length > 0 && m_writeDSN.Text != LResource.Skip);
|
|
WriteDSN.Checked = (keyInfo.DSN.Length > 0 && m_writeDSN.Text != LResource.Skip);
|
|
- //WriteDolby.Checked = (keyInfo.Dolby.Length > 0 && m_writeDolby.Text != LResource.Skip);
|
|
|
|
WritePSN.Checked = FunctionSettingNow.BarcodeWrite;
|
|
WritePSN.Checked = FunctionSettingNow.BarcodeWrite;
|
|
|
|
|
|
timer1.Start();
|
|
timer1.Start();
|
|
@@ -1306,6 +1315,11 @@ namespace MOKA_Factory_Tools
|
|
m_writeEDIDName.Text = "Null";
|
|
m_writeEDIDName.Text = "Null";
|
|
m_writeEDIDName.BackColor = Color.Transparent;
|
|
m_writeEDIDName.BackColor = Color.Transparent;
|
|
}
|
|
}
|
|
|
|
+ if (m_writeKFP.Text != LResource.Skip)
|
|
|
|
+ {
|
|
|
|
+ m_writeKFP.Text = "Null";
|
|
|
|
+ m_writeKFP.BackColor = Color.Transparent;
|
|
|
|
+ }
|
|
#endregion
|
|
#endregion
|
|
/////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////
|
|
#region Write Check;
|
|
#region Write Check;
|
|
@@ -1414,6 +1428,11 @@ namespace MOKA_Factory_Tools
|
|
m_checkACASKey.Text = "Null";
|
|
m_checkACASKey.Text = "Null";
|
|
m_checkACASKey.BackColor = Color.Transparent;
|
|
m_checkACASKey.BackColor = Color.Transparent;
|
|
}
|
|
}
|
|
|
|
+ if (m_checkKFP.Text != LResource.Skip)
|
|
|
|
+ {
|
|
|
|
+ m_checkKFP.Text = "Null";
|
|
|
|
+ m_checkKFP.BackColor = Color.Transparent;
|
|
|
|
+ }
|
|
#endregion
|
|
#endregion
|
|
/////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////
|
|
#region Read Check;
|
|
#region Read Check;
|
|
@@ -1542,6 +1561,11 @@ namespace MOKA_Factory_Tools
|
|
m_readACASKey.Text = "Null";
|
|
m_readACASKey.Text = "Null";
|
|
m_readACASKey.BackColor = Color.Transparent;
|
|
m_readACASKey.BackColor = Color.Transparent;
|
|
}
|
|
}
|
|
|
|
+ if (m_readKFP.Text != LResource.Skip)
|
|
|
|
+ {
|
|
|
|
+ m_readKFP.Text = "Null";
|
|
|
|
+ m_readKFP.BackColor = Color.Transparent;
|
|
|
|
+ }
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
ResultStatus.Text = "Wait";
|
|
ResultStatus.Text = "Wait";
|
|
@@ -1642,8 +1666,8 @@ namespace MOKA_Factory_Tools
|
|
if (WriteEDIDName.Checked)
|
|
if (WriteEDIDName.Checked)
|
|
reportdata += "EDIDModeName=" + keyInfo.EDIDModelName.data + "&";
|
|
reportdata += "EDIDModeName=" + keyInfo.EDIDModelName.data + "&";
|
|
|
|
|
|
- //if (WriteACASKey.Checked)
|
|
|
|
- // reportdata += "acas_tool=" + keyInfo.ACASKey_Tool.data + "&";
|
|
|
|
|
|
+ if (WriteKFP.Checked)
|
|
|
|
+ reportdata += "KFP_KEY=" + keyInfo.KFP.data + "&";
|
|
|
|
|
|
if (WriteACASKey.Checked)
|
|
if (WriteACASKey.Checked)
|
|
reportdata += "acas_data=" + keyInfo.ACASKey_Data.data + "&";
|
|
reportdata += "acas_data=" + keyInfo.ACASKey_Data.data + "&";
|
|
@@ -3514,6 +3538,75 @@ namespace MOKA_Factory_Tools
|
|
keyInfo.Playready.result = true;
|
|
keyInfo.Playready.result = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // KFP抄写;
|
|
|
|
+ if (WriteKFP.Checked)
|
|
|
|
+ {
|
|
|
|
+ if (!CommonMethod.IsNumberAndWord(keyInfo.KFP.data))
|
|
|
|
+ {
|
|
|
|
+ ErrMsg = string.Format("KFP format error!\r\n{0}", keyInfo.KFP.data);
|
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+ byte[] KFPData = SerialInit.HexToByte(keyInfo.KFP.data);
|
|
|
|
+ Log.WriteInfoLog("Write KFP...");
|
|
|
|
+ if (SerialCMD.SetKFPKey(TVPort, KFPData, out result, out data, out error, SerailDelay))
|
|
|
|
+ {
|
|
|
|
+ SetsuccessStatus(m_writeKFP);
|
|
|
|
+ Log.WriteInfoLog("Check KFP...");
|
|
|
|
+ if (cfg_writecheck.KFPCheckcheck ? SerialCMD.CheckKFPKey(TVPort, out result, out data, out error, SerailDelay) : true)
|
|
|
|
+ {
|
|
|
|
+ SetsuccessStatus(m_checkKFP);
|
|
|
|
+ Log.WriteInfoLog("Read KFP...");
|
|
|
|
+ if (cfg_readcheck.KFPReadcheck ? SerialCMD.ReadKFPKey(TVPort, out result, out data, out error, SerailDelay) : true)
|
|
|
|
+ {
|
|
|
|
+ if (cfg_readcheck.KFPReadcheck)
|
|
|
|
+ {
|
|
|
|
+ if (CommonMethod.CompareMD5(KFPData, data))
|
|
|
|
+ {
|
|
|
|
+ SetsuccessStatus(m_readKFP);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (SerialInit.BytesCompare_Base64(data, KFPData))
|
|
|
|
+ {
|
|
|
|
+ SetsuccessStatus(m_readKFP);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ SetfailStatus(m_readKFP);
|
|
|
|
+ ErrMsg = string.Format("{0} contrast KFP fail!", SN);
|
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ SetfailStatus(m_readKFP);
|
|
|
|
+ ErrMsg = string.Format("{0} read KFP fail!", SN);
|
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ SetfailStatus(m_checkKFP);
|
|
|
|
+ ErrMsg = string.Format("{0} check KFP fail!", SN);
|
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ SetfailStatus(m_writeKFP);
|
|
|
|
+ ErrMsg = string.Format("{0} Write KFP fail!", SN);
|
|
|
|
+ Log.WriteErrorLog(ErrMsg);
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ keyInfo.KFP.result = true;
|
|
|
|
+ }
|
|
|
|
|
|
#region FVP激活-放在Hash key抄写之后,应用于所有FireTV项目-已通过郁沛确认;
|
|
#region FVP激活-放在Hash key抄写之后,应用于所有FireTV项目-已通过郁沛确认;
|
|
if (WriteFVP.Checked)
|
|
if (WriteFVP.Checked)
|