passport-reader
passport-reader copied to clipboard
Mutual authentication failed
When I'm trying to read my passport it says "Mutual authentication failed: expected length: 40 + 2, actual length: 2 (SW = 0x6985: CONDITIONS NOT SATI...".
I would recommend to ask in JMRTD project. That's the library I'm using in this project to communicate with the passport chip.
Hello, Did you find the solution for this error, I am also facing the same problem. Thanks
I switched to this app. It works flawless and even has OCR for the passport ID.
Thanks for quick response, I tried this application and it works fine but i need to implement it in my android application.
I sadly can't help you with that as I only used the app to scan my passport.
No worries, Thanks
i have this same issue @shwetankb11 any solution yet?
Are u making your own application?
@shwetankb11 yeah i m making an android application that scans passport, i can read Nigerian passport(no BAC) perfectly but when i scan a British/Fininsh passport(BAC protected) i get the error you mentioned.
Go to playstore and search for Bondi passport, in the more section you will find the github project link, Try that if it works.
thanks would check it out.
I usually get this error when the information I entered in the app (passport number, birth date and expiration date) are incorrect.
Hello, i finally solved this problem on my app. I hope that will help you all, too. Once you set a timeout to your NfcA or NfcB depends on which one you use, it works pretty well if the informations about the card are correct. This was the only change that I have made.
isoDep.setTimeout(5000)
@cihatkapusuz where did you set the isoDep timeout exactly in the code ?
I am not able to post a snapshot of my code but I can say on the top of everything after defining my isoDep variable.
I think the likely location is within
private ReadTask(IsoDep isoDep, BACKeySpec bacKey) {
//set timeout ?
isoDep.setTimeout(5000);
this.isoDep = isoDep;
this.bacKey = bacKey;
}
Yes, something like this would help.
Hi, Any update on this issue, Am trying to read a BRP card by using "Read ID card" button in the app. When I tap my ID card, I get this same error "Mutual authentication failed: expected length: 40 + 2, actual length: 2 (SW = 0x6985: CONDITIONS NOT SATI...".
Any solution for this problem? I think that is only works on card ID, but on passport (some) require extras steps.
Hi, I managed to solve this by calling
passportService.sendSelectApplet(false);
just before calling doBAC
in order to specify that the PACE secure channel has not been initialised.
@shwetankb11 Thanks, it works
Work for me BACKey bacKey = new BACKey(documentNumber, dateOfBirth, dateOfExpiry); service.sendSelectApplet(false); //Important sinon erreur service.doBAC(bacKey);