Issue
How to configure the terminal to record photos when authentications are attempted.


Sample code


You should set the BS2EventCodeEnum (IDENTIFY_FAIL_FACE)  Type like below.(AUTH FAILED below is like a sample for you)

UInt16 imageLogEventCode = (UInt16)BS2EventCodeEnum.AUTH_FAILED;
BS2EventConfig eventConfig = Util.AllocateStructure<BS2EventConfig>();
eventConfig.numImageEventFilter = 1;
 
eventConfig.imageEventFilter[0].mainEventCode = (byte)(imageLogEventCode >> 8); //0x19;

eventConfig.imageEventFilter[0].scheduleID = (UInt32)BS2ScheduleIDEnum.ALWAYS; //1;

Console.WriteLine("Trying to get the device[{0}] information.", deviceID);
result = (BS2ErrorCode)API.BS2_GetDeviceInfo(context, deviceId, out deviceInfo);
if (result != BS2ErrorCode.BS_SDK_SUCCESS)
{
      Console.WriteLine("Can't get device information(errorCode : {0}).", result);
       return;
}

      Console.WriteLine("Trying to activate image log.");
      result = (BS2ErrorCode)API.BS2_SetEventConfig(context, deviceId, ref eventConfig);
if (result != BS2ErrorCode.BS_SDK_SUCCESS)
{
      Console.WriteLine("Got error({0}).", result);
      return;
}

Console.WriteLine("Trying to clear log for quick test.");
result = (BS2ErrorCode)API.BS2_ClearLog(context, deviceId);
if (result != BS2ErrorCode.BS_SDK_SUCCESS)
{
      Console.WriteLine("Got error({0}).", result);
      return;
}



And what you should know is not that the picture is taken after the SET EVENT CONFIG, but that you set it up on your device. And when the device is face failed, the picture will remain in the log with your device.