Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading tag: sw1 - 0x6A, sw2 - 0x86. when scan idcard #116

Closed
enaifuose opened this issue Sep 16, 2021 · 10 comments
Closed

Error reading tag: sw1 - 0x6A, sw2 - 0x86. when scan idcard #116

enaifuose opened this issue Sep 16, 2021 · 10 comments

Comments

@enaifuose
Copy link

Hi,

first, i want to thank u for the great work you do.

i m trying to test the NFC scan in id card. but i get the following errors :

[CoreNFC] 00000002 827685a0 -[NFCTagReaderSession setAlertMessage:]:90 (null)
Error reading tag: sw1 - 0x6A, sw2 - 0x86
reason: Incorrect parameters P1-P2
Re-selecting eMRTD Application
Starting Basic Access Control (BAC)
BACHandler - deriving Document Basic Access Keys
BACHandler - Getting initial challenge
Error reading tag: sw1 - 0x6D, sw2 - 0x00
reason: Instruction code not supported or invalid
ERROR - Instruction code not supported or invalid
BAC Failed

Any help please.

@danydev
Copy link
Contributor

danydev commented Oct 6, 2021

When reporting issues it's kind of useful to specify type (id card, passport, etc..) and country of the document you are using

@shakhzodiosdev
Copy link

The same issue while reading driving license. Have you solved?

@shakhzodiosdev
Copy link

@enaifuose Any solutions?

@RobinFarmer
Copy link

Ran into the same problem using a Latvian ID card.

@shakhzodiosdev did you happen to find a solution for this?

@shakhzodiosdev
Copy link

shakhzodiosdev commented Aug 4, 2022

As I remember you should try to add ISO7816 application identifiers for NFC Tag Reader Session in your plist :
image

Here is the list of identifiers :
D3921000310001010408
D3921000310001010100
00A4040C07A0000002471001
D3921000310001010401
D392F000260100000001
A0000002310100000000000000000000
A0000002310200000000000000000000
A0000002480300000000000000000000
A0000002471001
D2760000850101
A000000151000000
00000000000000

your plist should look like that ) I am not sure that it will help you but anyway you can try )

@RobinFarmer
Copy link

RobinFarmer commented Aug 4, 2022

Thanks just tried it but unfortunately the problem remains.

I did already have the the following:

A0000002471001
A0000002472001

I added the ones you said but yea same problem.

Do you remember where you find those identifiers? @shakhzodiosdev

@shakhzodiosdev
Copy link

@RobinFarmer These identifiers I found from different sources) I am sure that some of them I do not need also) I just tried to add each identifier that I could find while searching.

@shakhzodiosdev
Copy link

@RobinFarmer I am sorry earlier I had said the same problem with driving license. Actually I could not solve the issue with driving license and as I remember I had not problem with reading from ID card.

@RobinFarmer
Copy link

@shakhzodiosdev Thanks,

I did find https://www.eftlab.com/knowledge-base/211-emv-aid-rid-pix/ which has lots of identifiers including:
Screenshot 2022-08-04 at 15 22 20

I can't it to work yet but will continue to look into it.

@AndyQ
Copy link
Owner

AndyQ commented Feb 3, 2023

I'm closing this as whilst ID cards may work, its not something I can test as I don' have access to any.

If you are able to to get more information, please submit a PR or a new issue with more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants