Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

App crash when I called SetNextBoot function

bao_t_
Beginner
486 Views

Hi All,

I have tried to execute the SecureErase command by using the example in HLAPI but my app is always crash. I am sure that my target client is supported SecureErase. Here is my example code:

 public void SetSecureEraseBootNext(IAMTInstance amt)
 {           
      BootCapabilities bootCapabilities = amt.BootControl.BootCapabilities;
      BootOptionsFlags flags = BootOptionsFlags.NONE;
           
      if (bootCapabilities.SecureErase)
      {           
          flags = BootOptionsFlags.SecureErase;
      }
      try
      {
          if (bootCapabilities.SecureErase)
          {
               // Here is the code crash 
               amt.BootControl.SetNextBoot(flags);                    
          }
      }
      catch (ManageabilityException ex)
      {               
      }         
}

Could you please help?

0 Kudos
3 Replies
Joseph_O_Intel1
Employee
486 Views

Hey Bao

I don't see any code confirming that Secure Erase is allowable for the device.

You should look at Class AMT_BootCapabilities.SecureErase and validate for true, prior to initiating the action

What AMT version are we dealing with? It should be AMT 11+

Take a look at the blog" Remote Secure Erase with Intel® AMT", it should be of some assistance on this as well.

Joe

0 Kudos
bao_t_
Beginner
486 Views

Thanks Joe.

I got it. But I got the error as following when I tried to implement the RSE command.

Could you please hlep?

Here is the code:

        public void SetNextBoot(BootOptionsFlags options, FirmwareVerbosityEnum FWVerbosity)
        {
            try
            {               

                IManagedReference bootSettingDataRef =
                   Connection.NewReference(
                       "SELECT * FROM AMT_BootSettingData WHERE InstanceID='Intel(r) AMT:BootSettingData 0'");
                IManagedInstance bootSettingDataInstance = bootSettingDataRef.Get();

                bootSettingDataInstance.SetProperty("BIOSPause", false);
                bootSettingDataInstance.SetProperty("BIOSSetup", false);
                bootSettingDataInstance.SetProperty("ConfigurationDataReset", false);
                bootSettingDataInstance.SetProperty("ForcedProgressEvents", false);
                bootSettingDataInstance.SetProperty("LockKeyboard", false);
                bootSettingDataInstance.SetProperty("LockPowerButton", false);
                bootSettingDataInstance.SetProperty("LockResetButton", false);
                bootSettingDataInstance.SetProperty("LockSleepButton", false);
                bootSettingDataInstance.SetProperty("ReflashBIOS", false);
                bootSettingDataInstance.SetProperty("UserPasswordBypass", false);
                bootSettingDataInstance.SetProperty("UseSafeMode", false);
                bootSettingDataInstance.SetProperty("UseSOL", false);
                bootSettingDataInstance.SetProperty("LockSleepButton",  false);
                bootSettingDataInstance.SetProperty("FirmwareVerbosity", 0);


                //The Enforce Secure Boot option is enabled in AMT version 8.1 and above.
                if (Utils.Utils.CompareVersions(version, "8.0") > 0)
                    bootSettingDataInstance.SetProperty("EnforceSecureBoot",  false);

                //The Remote Secure Erase option is enabled in AMT version 11.0 and above.
                if (Utils.Utils.CompareVersions(version, "11.0") >= 0)
                {
                    if (BootOptionsFlags.SecureErase == options)
                    {
                        bootSettingDataInstance.SetProperty("SecureErase", true);
                        bootSettingDataInstance.SetProperty("RSEPassword", "intel");                
                    }
                } 

                bootSettingDataRef.Put(bootSettingDataInstance);
            }
            catch (ManageabilityException ex)
            {
            }
        }
    

Here is the error:

RSE_crash_2.png

RSE_Crash_1.png

 

Bao

0 Kudos
Joseph_O_Intel1
Employee
486 Views

Hey Bao

The error message is suggesting a SOAP error, which we deprecated in Intel AMT 9.

What version of the Intel.WSMan.Scripting library are you using?

What version of the HLAPI.dll are you using?

Can you please provide a System Discovery XML for my review, please attach in a PM

Joe

0 Kudos
Reply