Replies: 7 comments 6 replies
-
Hello, I have been able to use this library to be able to read the Spanish DNIe using the CAN or MRZ. In your case it seems that the error is that you send the CAN but you are using the validation by MRZ. When using the readPassport function, it is necessary to indicate the correct paceKeyReference (in case you want to use the CAN it would be PACEHandler.CAN_PACE_KEY_REFERENCE. |
Beta Was this translation helpful? Give feedback.
-
If I read passport like this: passportReader.readPassport(mrzKey: mrzKey, customDisplayMessage: { (displayMessage) in
Read CardAccess - data 3170300D060804007F0007020202020101300F060A04007F000702020302010201013012060A04007F0007020204020202010202010D3012060A04007F0007020204020102010202010D3012060A04007F000702020401020201020201003012060A04007F00070202040101020102020100 |
Beta Was this translation helpful? Give feedback.
-
I have modified the code to be able to do it via CAN and that is why my response was not as immediate as I thought, sorry. I put you in context. Before reading the datagroups, it is necessary to establish the PACE channel, and for this there are two methods, using MRZ or using CAN. The code in this default library creates the PACE channel using MRZ. Have you tried using this data to establish the channel? func getMRZKey(passportNumber: String, dateOfBirth: String, dateOfExpiry: String ) -> String {
You can obtain the MRZ code with the following function to which you have to pass the DNI number, the date of birth and the expiration date of the DNI. Dates are Strings in "dd/MM/yyyy" format. Indicates the value [] in the tags parameter of the readPassport method. With this you should be able to read the DNIe with this library using MRZ. Once this was tested, in order to read the DNIe using the CAN code, I had to modify the code of this library. I have modified the readPassport method and simply modify the existing parameter to indicate the method I use to set the pace channel (self.paceKeyReference = paceKeyReference). |
Beta Was this translation helpful? Give feedback.
-
Hi! I have checked using func getMRZKey(passportNumber: String, dateOfBirth: String, dateOfExpiry: String ) -> String { Im getting the same error. Completed output: |
Beta Was this translation helpful? Give feedback.
-
Sorry, I have miscounted the parameters that are sent to the function to generate the MRZ. You have to send the support number (not the DNI number) and the dates are in YYMMdd format. A question about your objectives, are you only looking to read the public data of the DNIe or are you also looking to use the certificates of the DNIe? |
Beta Was this translation helpful? Give feedback.
-
When I have told you that I can read the DNIe from IOS with these libraries, it is because I am the developer of the Valida app. In it, it has been decided to use the CAN to establish the secure channel, but the MRZ can be used. |
Beta Was this translation helpful? Give feedback.
-
Joe pues enhorabuena! Escuché un podcast donde explicabas tu trabajo.
Me parece increíble, ojalá más gente así.
El vie., 13 ene. 2023 10:18, diegocidm4 ***@***.***> escribió:
… When I have told you that I can read the DNIe from IOS with these
libraries, it is because I am the developer of the Valida app. In it, it
has been decided to use the CAN to establish the secure channel, but the
MRZ can be used.
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOPR6TRIZL24K554A5J63WSETYXANCNFSM6AAAAAATZKRA24>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Andy, your work is awesome!
Im trying to read spanish electronic id using some clases of your proyect.
Exist Android library but for ios there is nothing to use.
I think that i have to send only can number , there are 6 number, for example: 373833
When i use your functions, i suppose that i need few datagroups to read,
i always receive the same error:
Error reading tag: sw1 - 0x63, sw2 - 0x00
ERROR - InvalidMRZKey
BAC Failed
Anyone can help me to get that communication?
thanks you very much.
Beta Was this translation helpful? Give feedback.
All reactions