|
@@ -509,7 +509,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool SetNetflixESN(SerialPort Comport, byte[] param, out byte[] result, out byte[] data, out string error,int waitTime)
|
|
|
{
|
|
|
- return SendcmdEx(Comport, new byte[] { 0xAA}, new byte[] { 0x99,0x00 }, param, false, false, out result, out data, out error, waitTime);
|
|
|
+ return SendcmdEx(Comport, param.Length > 255 ? new byte[] { 0xAA,0xFE } : new byte[] { 0xAA }, new byte[] { 0x99,0x00 }, param, false, false, out result, out data, out error, waitTime);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1878,7 +1878,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckFireTVPlayready(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01,0x00 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x00 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x00 && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -1904,7 +1904,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool ReadFireTVPlayready(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x00 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x00 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x00)
|
|
|
{
|
|
@@ -1949,7 +1949,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckFireTVLEK(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x02 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x02 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x02 && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -1975,7 +1975,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool ReadFireTVLEK(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x02 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x02 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x02)
|
|
|
{
|
|
@@ -2020,7 +2020,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckFireTVPEK(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x01 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x01 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x01 && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -2046,7 +2046,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool ReadFireTVPEK(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x01 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x01 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x01)
|
|
|
{
|
|
@@ -2091,7 +2091,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckFireTVDAK(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x0E }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x0E }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x0E && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -2132,7 +2132,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckMiFireTVFVP(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x0F }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x0F }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x0F && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -2173,7 +2173,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckFireTVHashkey(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x03 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x03 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x03 && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -2199,7 +2199,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool ReadFireTVHashkey(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x03 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x03 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x03)
|
|
|
{
|
|
@@ -2274,7 +2274,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool CheckFireTVYoutube(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x06 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x06 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x06 && data[2] == 0x01)
|
|
|
return true;
|
|
@@ -2300,7 +2300,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool ReadFireTVYoutube(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x06 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x06 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x06)
|
|
|
{
|
|
@@ -2362,7 +2362,7 @@ namespace MOKA_Factory_Tools
|
|
|
// 计算函数耗时;
|
|
|
Stopwatch watch = new Stopwatch();
|
|
|
watch.Start();
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x05 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x05 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x05)
|
|
|
{
|
|
@@ -2418,7 +2418,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns></returns>
|
|
|
public static bool ReadEDIDPid(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x09 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x09 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x09)
|
|
|
{
|
|
@@ -2502,7 +2502,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns>注意返回值为:md5xxxxx</returns>
|
|
|
public static bool ReadACASKeyData(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x08 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x08 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x08)
|
|
|
{
|
|
@@ -2520,7 +2520,7 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
public static bool CheckACASKeyData(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x08 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x08 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x08 && data[2] == 0x01)
|
|
|
{
|
|
@@ -2561,7 +2561,7 @@ namespace MOKA_Factory_Tools
|
|
|
/// <returns>注意返回值为:md5xxxxx</returns>
|
|
|
public static bool ReadACASKeyTool(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x0A }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x0A }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x0A)
|
|
|
{
|
|
@@ -2579,7 +2579,7 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
public static bool CheckACASKeyTool(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x0A }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x0A }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x0A && data[2] == 0x01)
|
|
|
{
|
|
@@ -2642,7 +2642,7 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
public static bool CheckDolbyKey(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x13 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x13 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x13 && data[2] == 0x01)
|
|
|
{
|
|
@@ -2659,7 +2659,7 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
public static bool ReadDolbyKey(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x13 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x13 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x13)
|
|
|
{
|
|
@@ -2692,7 +2692,7 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
public static bool CheckKFPKey(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x01, 0x15 }, true, false, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x01, 0x15 }, new byte[] { }, true, false, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data.Length == 3 && data[0] == 0x02 && data[1] == 0x15 && data[2] == 0x01)
|
|
|
{
|
|
@@ -2709,7 +2709,7 @@ namespace MOKA_Factory_Tools
|
|
|
|
|
|
public static bool ReadKFPKey(SerialPort Comport, out byte[] result, out byte[] data, out string error, int waitTime)
|
|
|
{
|
|
|
- if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC }, new byte[] { 0x03, 0x15 }, true, true, out result, out data, out error, waitTime))
|
|
|
+ if (SendcmdEx(Comport, new byte[] { 0xAA }, new byte[] { 0xFC, 0x03, 0x15 }, new byte[] { }, true, true, out result, out data, out error, waitTime))
|
|
|
{
|
|
|
if (data[0] == 0x04 && data[1] == 0x15)
|
|
|
{
|