NFCPassportReader icon indicating copy to clipboard operation
NFCPassportReader copied to clipboard

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

Open enaifuose opened this issue 4 years ago • 9 comments

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.

enaifuose avatar Sep 16 '21 11:09 enaifuose

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

danydev avatar Oct 06 '21 08:10 danydev

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

shakhzodiosdev avatar Mar 01 '22 12:03 shakhzodiosdev

@enaifuose Any solutions?

shakhzodiosdev avatar Mar 02 '22 11:03 shakhzodiosdev

Ran into the same problem using a Latvian ID card.

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

RobinFarmer avatar Aug 04 '22 12:08 RobinFarmer

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 )

shakhzodiosdev avatar Aug 04 '22 12:08 shakhzodiosdev

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

RobinFarmer avatar Aug 04 '22 12:08 RobinFarmer

@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 avatar Aug 04 '22 13:08 shakhzodiosdev

@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.

shakhzodiosdev avatar Aug 04 '22 13:08 shakhzodiosdev

@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.

RobinFarmer avatar Aug 04 '22 13:08 RobinFarmer

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

AndyQ avatar Feb 03 '23 16:02 AndyQ