Beispiel #1
0
 void print(IntPtr sdkContext, BS2SystemConfigExt config)
 {
     Console.WriteLine(">>>> SystemExt configuration ");
     Console.WriteLine("     |--primarySecureKey : {0}", BitConverter.ToString(config.primarySecureKey));
     Console.WriteLine("     |--secondarySecureKey : {0}", BitConverter.ToString(config.secondarySecureKey));
     Console.WriteLine("<<<< ");
 }
Beispiel #2
0
        public void setSystemExtConfig(IntPtr sdkContext, UInt32 deviceID, bool isMasterDevice)
        {
            BS2SystemConfigExt config = Util.AllocateStructure <BS2SystemConfigExt>();

            config.primarySecureKey[0] = 0x01;
            config.primarySecureKey[1] = 0xFE;

            config.secondarySecureKey[0] = 0x01;
            config.secondarySecureKey[1] = 0x1E;

            Console.WriteLine("Trying to set SystemExt configuration.");
            BS2ErrorCode result = (BS2ErrorCode)API.BS2_SetSystemExtConfig(sdkContext, deviceID, ref config);

            if (result != BS2ErrorCode.BS_SDK_SUCCESS)
            {
                Console.WriteLine("Got error({0}).", result);
            }
        }