Skip to content

RFID Chip Processing

General

  • Use the parameter to set the time limit (in seconds) for the RFID chip reading. After this duration, the reading process stops, regardless of the result. The countdown starts from the moment the RFID reading is started. Note that this is applicable only to Android.
DocumentReader.Instance().functionality().edit().setRfidTimeout(5).apply()
DocumentReader.Instance().functionality().edit().setRfidTimeout(5).apply();
DocumentReader.instance.functionality.rfidTimeout = 5;
DocumentReader.setFunctionality({ "rfidTimeout": 5 }, _ => { }, _ => { });
DocumentReader.setFunctionality({ "rfidTimeout": 5 });
DocumentReader.setFunctionality({ "rfidTimeout": 5 }, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Functionality().Edit().SetRfidTimeout(5).Apply();
  • The SDK can automatically change the scenario settings depending on the type and results obtained during the scanning of the last document. The default value is true:
DocReader.shared.rfidScenario.autoSettings = true
[RGLDocReader shared].rfidScenario.autoSettings = YES;
DocumentReader.Instance().rfidScenario().isAutoSettings = true
DocumentReader.Instance().rfidScenario().setAutoSettings(true);
DocumentReader.instance.rfidScenario.autoSettings = true;
DocumentReader.setRfidScenario({
    autoSettings: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    autoSettings: true
});
DocumentReader.setRfidScenario({
    autoSettings: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().AutoSettings = true;

// iOS
RGLDocReader.Shared.RfidScenario.AutoSettings = true;
  • Set an authentication procedure type, which should be conducted if all the objective conditions are met:
DocReader.shared.rfidScenario.authProcType = RFIDAuthenticationProcedureType.advanced
[RGLDocReader shared].rfidScenario.authProcType = RGLRFIDSdkProfilerTypeDoc9303Edition2006;
DocumentReader.Instance().rfidScenario().setAuthProcType(eRFID_AuthenticationProcedureType.aptAdvanced)
DocumentReader.Instance().rfidScenario().setAuthProcType(eRFID_AuthenticationProcedureType.aptAdvanced);
DocumentReader.instance.rfidScenario.authProcType = RFIDAuthenticationProcedureType.ADVANCED;
DocumentReader.setRfidScenario({
    authProcType: eRFID_AuthenticationProcedureType.aptAdvanced
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    authProcType: Enum.eRFID_AuthenticationProcedureType.aptAdvanced
});
DocumentReader.setRfidScenario({
    authProcType: DocumentReader.Enum.eRFID_AuthenticationProcedureType.aptAdvanced
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().AuthProcType = ERFID_AuthenticationProcedureType.AptAdvanced;

// iOS
RGLDocReader.Shared.RfidScenario.AuthProcType = RGLRFIDAuthenticationProcedureType.Advanced;
  • Set a type of priority mechanism for organizing an SM-channel (Security Messaging is a mechanism of protected data exchanging):
DocReader.shared.rfidScenario.baseSMProcedure = RFIDAccessControlProcedureType.bac
[RGLDocReader shared].rfidScenario.baseSMProcedure = RGLRFIDAccessControlProcedureTypeBac;
DocumentReader.Instance().rfidScenario().setBaseSMProcedure(eRFID_AccessControl_ProcedureType.ACPT_BAC)
DocumentReader.Instance().rfidScenario().setBaseSMProcedure(eRFID_AccessControl_ProcedureType.ACPT_BAC);
DocumentReader.instance.rfidScenario.baseSMProcedure = RFIDAccessControlProcedureType.BAC;
DocumentReader.setRfidScenario({
    baseSMProcedure: eRFID_AccessControl_ProcedureType.ACPT_BAC
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    baseSMProcedure: Enum.eRFID_AccessControl_ProcedureType.ACPT_BAC
});
DocumentReader.setRfidScenario({
    baseSMProcedure: DocumentReader.Enum.eRFID_AccessControl_ProcedureType.ACPT_BAC
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().BaseSMProcedure = ERFID_AccessControl_ProcedureType.AcptBac;

// iOS
RGLDocReader.Shared.RfidScenario.BaseSMProcedure = RGLRFIDAccessControlProcedureType.Bac;
  • Set a data access type for the PACE procedure:
DocReader.shared.rfidScenario.pacePasswordType = RFIDPasswordType.mrz
[RGLDocReader shared].rfidScenario.pacePasswordType = RGLRFIDPasswordTypeMrz;
DocumentReader.Instance().rfidScenario().setPacePasswordType(eRFID_Password_Type.PPT_MRZ)
DocumentReader.Instance().rfidScenario().setPacePasswordType(eRFID_Password_Type.PPT_MRZ);
DocumentReader.instance.rfidScenario.pacePasswordType = RFIDPasswordType.MRZ;
DocumentReader.setRfidScenario({
    pacePasswordType: eRFID_Password_Type.PPT_MRZ
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    pacePasswordType: Enum.eRFID_Password_Type.PPT_MRZ
});
DocumentReader.setRfidScenario({
    pacePasswordType: DocumentReader.Enum.eRFID_Password_Type.PPT_MRZ
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PacePasswordType = ERFID_Password_Type.PptMrz;

// iOS
RGLDocReader.Shared.RfidScenario.PacePasswordType = RGLRFIDPasswordType.Mrz;
  • Priority of using DS-certificates:
DocReader.shared.rfidScenario.pkdDSCertPriority = false
[RGLDocReader shared].rfidScenario.pkdDSCertPriority = NO;
DocumentReader.Instance().rfidScenario().isPkdDSCertPriority = false
DocumentReader.Instance().rfidScenario().setPkdDSCertPriority(false);
DocumentReader.instance.rfidScenario.pkdDSCertPriority = false;
DocumentReader.setRfidScenario({
    pkdDSCertPriority: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    pkdDSCertPriority: false
});
DocumentReader.setRfidScenario({
    pkdDSCertPriority: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PkdDSCertPriority = false;

// iOS
RGLDocReader.Shared.RfidScenario.PkdDSCertPriority = false;
  • Use of CSCA-certificates submitted by individual data files only:
DocReader.shared.rfidScenario.pkdUseExternalCSCA = false
[RGLDocReader shared].rfidScenario.pkdUseExternalCSCA = NO;
DocumentReader.Instance().rfidScenario().isPkdUseExternalCSCA = false
DocumentReader.Instance().rfidScenario().setPkdUseExternalCSCA(false);
DocumentReader.instance.rfidScenario.pkdUseExternalCSCA = false;
DocumentReader.setRfidScenario({
    pkdUseExternalCSCA: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    pkdUseExternalCSCA: false
});
DocumentReader.setRfidScenario({
    pkdUseExternalCSCA: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PkdUseExternalCSCA = false;

// iOS
RGLDocReader.Shared.RfidScenario.PkdUseExternalCSCA = false;
  • Level of trust to CSCA-certificates from PKD:
DocReader.shared.rfidScenario.trustedPKD = false
[RGLDocReader shared].rfidScenario.trustedPKD = NO;
DocumentReader.Instance().rfidScenario().isTrustedPKD = false
DocumentReader.Instance().rfidScenario().setTrustedPKD(false);
DocumentReader.instance.rfidScenario.trustedPKD = false;
DocumentReader.setRfidScenario({
    trustedPKD: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    trustedPKD: false
});
DocumentReader.setRfidScenario({
    trustedPKD: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().TrustedPKD = false;

// iOS
RGLDocReader.Shared.RfidScenario.TrustedPKD = false;
  • Logical sign of passive authentication performance:
DocReader.shared.rfidScenario.passiveAuth = true
[RGLDocReader shared].rfidScenario.passiveAuth = YES;
DocumentReader.Instance().rfidScenario().isPassiveAuth = true
DocumentReader.Instance().rfidScenario().setPassiveAuth(true);
DocumentReader.instance.rfidScenario.passiveAuth = true;
DocumentReader.setRfidScenario({
    passiveAuth: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    passiveAuth: true
});
DocumentReader.setRfidScenario({
    passiveAuth: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PassiveAuth = true;

// iOS
RGLDocReader.Shared.RfidScenario.PassiveAuth = true;
  • Logical sign of a cancellation of an active authentication procedure (AA) after the successful performance of a chip authentication (CA) procedure:
DocReader.shared.rfidScenario.skipAA = false
[RGLDocReader shared].rfidScenario.skipAA = NO;
DocumentReader.Instance().rfidScenario().isSkipAA = false
DocumentReader.Instance().rfidScenario().setSkipAA(false);
DocumentReader.instance.rfidScenario.skipAA = false;
DocumentReader.setRfidScenario({
    skipAA: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    skipAA: false
});
DocumentReader.setRfidScenario({
    skipAA: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().SkipAA = false;

// iOS
RGLDocReader.Shared.RfidScenario.SkipAA = false;
  • Select the type of logical data profiler to use with an electronic document:
DocReader.shared.rfidScenario.profilerType = RGLRFIDSdkProfilerTypeDoc9303Edition2006
[RGLDocReader shared].rfidScenario.profilerType = RGLRFIDSdkProfilerTypeDoc9303Edition2006;
DocumentReader.Instance().rfidScenario().setProfilerType(eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006)
DocumentReader.Instance().rfidScenario().setProfilerType(eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006);
DocumentReader.instance.rfidScenario.profilerType = RFIDSDKProfilerType.DOC_9303_EDITION_2006;
DocumentReader.setRfidScenario({
    profilerType: eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    profilerType: Enum.eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006
});
DocumentReader.setRfidScenario({
    profilerType: DocumentReader.Enum.eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ProfilerType = ERFID_SDK_ProfilerType.SptDoc9303Edition2006;

// iOS
RGLDocReader.Shared.RfidScenario.ProfilerType = RGLRFIDSdkProfilerType.Edition2006;
  • Strict ISO protocol:
DocReader.shared.rfidScenario.strictProcessing = false
[RGLDocReader shared].rfidScenario.strictProcessing = NO;
DocumentReader.Instance().rfidScenario().isStrictProcessing = false
DocumentReader.Instance().rfidScenario().setStrictProcessing(false);
DocumentReader.instance.rfidScenario.strictProcessing = false;
DocumentReader.setRfidScenario({
    strictProcessing: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    strictProcessing: false
});
DocumentReader.setRfidScenario({
    strictProcessing: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().StrictProcessing = false;

// iOS
RGLDocReader.Shared.RfidScenario.StrictProcessing = false;
  • Specify whether to continue reading RFID chip data despite encountering potential ICAO critical errors. Defaults to false, also ignored if strictProcessing is set to true.
DocReader.shared.rfidScenario.proceedReadingAlways = true
[RGLDocReader shared].rfidScenario.proceedReadingAlways = YES;
DocumentReader.Instance().rfidScenario().isProceedReadingAlways = true
DocumentReader.Instance().rfidScenario().setProceedReadingAlways(true);
DocumentReader.instance.rfidScenario.proceedReadingAlways = true;
DocumentReader.setRfidScenario({
    proceedReadingAlways: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    proceedReadingAlways: true
});
DocumentReader.setRfidScenario({
    proceedReadingAlways: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ProceedReadingAlways = true;

// iOS
RGLDocReader.Shared.RfidScenario.ProceedReadingAlways = true;
  • Specify whether the ePassport must be read or not:
DocReader.shared.rfidScenario.readEPassport = true
[RGLDocReader shared].rfidScenario.readEPassport = YES;
DocumentReader.Instance().rfidScenario().isReadEPassport = true
DocumentReader.Instance().rfidScenario().setReadEPassport(true);
DocumentReader.instance.rfidScenario.readEPassport = true;
DocumentReader.setRfidScenario({
    readEPassport: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readEPassport: true
});
DocumentReader.setRfidScenario({
    readEPassport: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadEPassport = true;

// iOS
RGLDocReader.Shared.RfidScenario.ReadEPassport = true;
  • Specify the data groups of the ePassport that must be read:
DocReader.shared.rfidScenario.ePassportDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.ePassportDataGroups.dG1 = YES;
DocumentReader.Instance().rfidScenario().ePassportDataGroups().isDG1 = true
DocumentReader.Instance().rfidScenario().ePassportDataGroups().setDG1(true);
DocumentReader.instance.rfidScenario.ePassportDataGroups.dg1 = true;
DocumentReader.setRfidScenario({
    ePassportDataGroups: {
      DG1: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    ePassportDataGroups: {"DG1": true}
});
DocumentReader.setRfidScenario({
    ePassportDataGroups: {"DG1": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().EPassportDataGroups().DG1 = true;

// iOS
RGLDocReader.Shared.RfidScenario.EPassportDataGroups.DG1 = true;
  • Specify whether the eID must be read or not:
DocReader.shared.rfidScenario.readEID = false
[RGLDocReader shared].rfidScenario.readEID = NO;
DocumentReader.Instance().rfidScenario().isReadEID = false
DocumentReader.Instance().rfidScenario().setReadEID(false);
DocumentReader.instance.rfidScenario.readEID = false;
DocumentReader.setRfidScenario({
    readEID: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readEID: false
});
DocumentReader.setRfidScenario({
    readEID: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadEID = false;

// iOS
RGLDocReader.Shared.RfidScenario.ReadEID = false;
  • Specify which data groups of the eID must be read:
DocReader.shared.rfidScenario.eIDDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.eIDDataGroups.dG1 = YES;
DocumentReader.Instance().rfidScenario().eIDDataGroups().isDG1 = true
DocumentReader.Instance().rfidScenario().eIDDataGroups().setDG1(true);
DocumentReader.instance.rfidScenario.eIDDataGroups.dg1 = true;
DocumentReader.setRfidScenario({
    eIDDataGroups: {
      DG1: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    eIDDataGroups: {"DG1": true}
});
DocumentReader.setRfidScenario({
    eIDDataGroups: {"DG1": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().EIDDataGroups().DG1 = true;

// iOS
RGLDocReader.Shared.RfidScenario.EIDDataGroups.DG1 = true;
  • Specify whether the eDL must read or not:
DocReader.shared.rfidScenario.readEDL = true
[RGLDocReader shared].rfidScenario.readEDL = YES;
DocumentReader.Instance().rfidScenario().isReadEDL = true
DocumentReader.Instance().rfidScenario().setReadEDL(true);
DocumentReader.instance.rfidScenario.readEDL = true;
DocumentReader.setRfidScenario({
    readEDL: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readEDL: true
});
DocumentReader.setRfidScenario({
    readEDL: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadEDL = true;

// iOS
RGLDocReader.Shared.RfidScenario.ReadEDL = true;
  • Specify which data groups of the eDL must be read:
DocReader.shared.rfidScenario.eDLDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.eDLDataGroups.dG1 = YES;
DocumentReader.Instance().rfidScenario().eDLDataGroups().isDG1 = true
DocumentReader.Instance().rfidScenario().eDLDataGroups().setDG1(true);
DocumentReader.instance.rfidScenario.eDLDataGroups.dg1 = true;
DocumentReader.setRfidScenario({
    eDLDataGroups: {
      DG1: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    eDLDataGroups: {"DG1": true}
});
DocumentReader.setRfidScenario({
    eDLDataGroups: {"DG1": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().EIDDataGroups().DG1 = true;

// iOS
RGLDocReader.Shared.RfidScenario.EDLDataGroups.DG1 = true;

PKD Certificates

  • To add a list of PKD certificates during the initialization process, use:
DocReader.shared.addPKDCertificates(certificates: certificates)
DocumentReader.Instance().addPKDCertificates(certificates);
  • To add a list of PKD certificates when the RFID reading is started, use the following code. Note that all interfaces in the callback are optional, but having at least one is required.
DocumentReader.Instance().startRFIDReader(context, new IRfidReaderCompletion() {
    @Override
    public void onCompleted(int action, @Nullable DocumentReaderResults results, @Nullable DocumentReaderException error) {
        // Completed RFID chip processing
    }
    }, new IRfidReaderRequest(new IRfidPACertificates() {
        @Override
        public void onRequestPACertificates(@Nullable byte[] serialNumber, @Nullable PAResourcesIssuer issuer, @NonNull IRfidPKDCertificateCompletion completion) {
            // Requested PA certificates
        }
    }, new IRfidTACertificates() {
        @Override
        public void onRequestTACertificates(@Nullable String keyCAR, @NonNull IRfidPKDCertificateCompletion completion) {
            // Requested TA certificates
        }
    }, new IRfidTASignature() {
        @Override
        public void onRequestTASignature(@Nullable TAChallenge challenge, @NonNull IRfidTASignatureCompletion completion) {
            // Requested TA signature
        }
    }
));
  • To clear the list of PKD certificates, use:
DocReader.shared.clearPKDCertificates()
DocumentReader.Instance().clearPKDCertificates();

Ignore Notification Codes during PA

To define notification codes that should be ignored during passive authentication (PA), set the paIgnoreNotificationCodes array:

let rfidParams = RFIDParams()
rfidParams.paIgnoreNotificationCodes = [-1879047913, -1845493480]
DocReader.shared.processParams.rfidParams = rfidParams
RFIDParams rfidParams = new RFIDParams();
rfidParams.paIgnoreNotificationCodes(new int[] {-1879047913, -1845493480});
DocumentReader.Instance().processParams.rfidParams = rfidParams;
val rfidParams = RFIDParams()
rfidParams.paIgnoreNotificationCodes = intArrayOf(-1879047913, -1845493480)
Instance().processParams().rfidParams = rfidParams

For the full list of notification codes, see the platform-specific enumeration eLDS_ParsingNotificationCodes by the link below.

TCC Params

Sets the given TCC Params to the RFID session. The parameters are required to be set before starting the RFID session.

The TCCParams includes the following properties:

  • serviceTAURLString is the TA URL for the TCC service. The value of the property must be a valid URL string.
  • servicePAURLString is the PA URL for the TCC service. The value of the property must be a valid URL string.
  • pfxCertURLString is the URL for the certificate for a TCC service. The value of the property must be a valid URL string.
  • pfxCertData is the bytes of the certificate for a TCC service. This data will be used instead of loading the certificate via pfxCertURLString.
  • pfxPassPhrase is the passphrase for the cerficiate provided by the pfxCertURLString property.
let tccParams = TCCParams(
    serviceTAURLString: "",
    servicePAURLString: "",
    pfxCertURLString: "",
    pfxCertData: nil,
    pfxPassPhrase: ""
)
DocReader.shared.setTCCParams(tccParams) { success, error in
    // check `success` or `error`...
}
TCCParams *tccParams = [[TCCParams alloc] initWithServiceTAURLString:@""
                                                  servicePAURLString:@""
                                                    pfxCertURLString:@""
                                                        pfxCertData:nil,
                                                       pfxPassPhrase:@""];
[RGLDocReader.shared setTCCParams:tccParams completion:^(BOOL success, NSError * _Nullable error) {
    // check `success` or `error`...
}];
val tccParams = TccParams()
tccParams.serviceUrlTA = ""
tccParams.serviceUrlPA = ""
tccParams.pfxCertUrl = ""
tccParams.pfxCert = null
tccParams.pfxPassPhrase = ""

DocumentReader.Instance().setTccParams(
    tccParams
) { success, error -> }
TccParams tccParams = new TccParams();
tccParams.setServiceUrlTA("");
tccParams.setServiceUrlPA("");
tccParams.setPfxCertUrl("");
tccParams.setPfxCert(null);
tccParams.setPfxPassPhrase("");

DocumentReader.Instance().setTccParams(tccParams, new ITccParamsCompletion() {
    @Override
    public void onSetTccParamsCompleted(boolean success, @Nullable DocumentReaderException error) {

    }
});

RFID Delegate (iOS-Specific)

The RFID chip delegate:

DocReader.shared.rfidDelegate = self
[RGLDocReader shared].rfidDelegate = self;

func didChipConnected()

Tells the delegate that the connection with the RFID chip is established.

func didChipConnected() {
    print("Connected")
}
- (void)didChipConnected {
    NSLog(@"Connected");
}

func didReceivedError(RFIDErrorCodes)

Tells the delegate an error appeared during the RFID chip processing.

func didReceivedError(_ errorCode: RFIDErrorCodes) {
    print(errorCode.rawValue)
}
- (void)didReceivedError:(RGLRFIDErrorCodes)errorCode {
    NSLog(@"%u", errorCode);
}

For information about the methods you can implement for your delegate object, see the API Reference.

Next Steps