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

Adding banks from different country #14

Closed
berkaykr opened this issue Nov 9, 2022 · 12 comments
Closed

Adding banks from different country #14

berkaykr opened this issue Nov 9, 2022 · 12 comments

Comments

@berkaykr
Copy link

berkaykr commented Nov 9, 2022

Hello, it does not read some cards in Turkey with nfc. How can I solve this? Can you help me how do I change the code structure?

Some cards receive information, some do not.

@dangfan
Copy link
Contributor

dangfan commented Nov 9, 2022

Thank you for your inquiry.
Identifying the type of card you are dealing with should be your first priority. You can utilize APDUs to retrieve the data if the card is ISO 7816-4 compliant. The keys are necessary if the card is a MIFARE Classic card. Basically, Line 799 of /assets/read.js is the entrance point. Your code ought to be added there.
Pull requests are encouraged.

@dangfan dangfan closed this as completed Nov 9, 2022
@berkaykr
Copy link
Author

berkaykr commented Dec 4, 2022

The cards are (ISO 7816-4) compliant. But it doesn't read some cards. I have 6 cards, some of them receive their information, some do not. What exactly do I need to do?

@dangfan
Copy link
Contributor

dangfan commented Dec 5, 2022

Would you provide more information, including the platform (Android or iOS) you're testing, the AID of the card, and other that may help figure out the problem?

@berkaykr
Copy link
Author

berkaykr commented Dec 5, 2022

I am testing the tests on android device. It's a debit card I use. I cannot receive MasterCard and its information.

{apdu_history: [{tx: 00A404000E325041592E5359532E444446303100, rx: 6F27840E325041592E5359532E4444463031A515BF0C1261104F07A00000000410108701019F2A01029000}, {tx: 00A4040007A000000004101000, rx: 6F468407A0000000041010A53B500A4D4153544552434152448701015F2D047472656E9F1101099F120C4D4320435245444954205050BF0C0F9F4D020B0A9F6E07079200003030009000}], tag: {standard: ISO 14443-4 (Type A), dsfId: , ndef: null, ndefWritable: false, ndefCapacity: 0, ndefCanMakeReadOnly: false, type: iso7816, atqa: 4403, manufacturer: , ndefAvailable: false, protocolInfo: , systemCode: , id: 04251E9AD83780, applicationData: , sak: 20, hiLayerResponse: , webUSBCustomProbeData: null, historicalBytes: 4A434F503234325232, ndefType: }, detail: {}, card_type: Unknown}

@berkaykr
Copy link
Author

berkaykr commented Dec 5, 2022

This is the code structure I got on a different card.

{apdu_history: [{tx: 00A404000E325041592E5359532E444446303100, rx: 6F35840E325041592E5359532E4444463031A523BF0C20611E4F07A000000004101050104445424954204D4153544552434152448701019000}, {tx: 00A4040007A000000004101000, rx: 6F4F8407A0000000041010A54450104445424954204D4153544552434152448701015F2D087472656E646566729F1101099F120B42414E4B41204B41525449BF0C0F9F4D020B0A9F6E07079200003030009000}], tag: {standard: ISO 14443-4 (Type A), dsfId: , ndef: null, ndefWritable: false, ndefCapacity: 0, ndefCanMakeReadOnly: false, type: iso7816, atqa: 4400, manufacturer: , ndefAvailable: false, protocolInfo: , systemCode: , id: 058E3A87A33200, applicationData: , sak: 28, hiLayerResponse: , webUSBCustomProbeData: null, historicalBytes: 41434F532046696F6E6131204C6336, ndefType: }, detail: {}, card_type: Unknown}

@Harry-Chen
Copy link
Contributor

@berkaykr The APDU history you provided contains only successful commands. You can retrieve all APDUs in the log. You can refer to read.js for more details.

@berkaykr
Copy link
Author

berkaykr commented Dec 7, 2022

@Harry-Chen Can you give detailed information? What exactly do I need to do?

@dangfan
Copy link
Contributor

dangfan commented Dec 8, 2022

This is the code structure I got on a different card.

{apdu_history: [{tx: 00A404000E325041592E5359532E444446303100, rx: 6F35840E325041592E5359532E4444463031A523BF0C20611E4F07A000000004101050104445424954204D4153544552434152448701019000}, {tx: 00A4040007A000000004101000, rx: 6F4F8407A0000000041010A54450104445424954204D4153544552434152448701015F2D087472656E646566729F1101099F120B42414E4B41204B41525449BF0C0F9F4D020B0A9F6E07079200003030009000}], tag: {standard: ISO 14443-4 (Type A), dsfId: , ndef: null, ndefWritable: false, ndefCapacity: 0, ndefCanMakeReadOnly: false, type: iso7816, atqa: 4400, manufacturer: , ndefAvailable: false, protocolInfo: , systemCode: , id: 058E3A87A33200, applicationData: , sak: 28, hiLayerResponse: , webUSBCustomProbeData: null, historicalBytes: 41434F532046696F6E6131204C6336, ndefType: }, detail: {}, card_type: Unknown}

It seems that this card does not contain a compatitble FCI Proprietary Template. You may read the EMV spec to add more code to support it.

@dangfan
Copy link
Contributor

dangfan commented Dec 8, 2022

I am testing the tests on android device. It's a debit card I use. I cannot receive MasterCard and its information.

{apdu_history: [{tx: 00A404000E325041592E5359532E444446303100, rx: 6F27840E325041592E5359532E4444463031A515BF0C1261104F07A00000000410108701019F2A01029000}, {tx: 00A4040007A000000004101000, rx: 6F468407A0000000041010A53B500A4D4153544552434152448701015F2D047472656E9F1101099F120C4D4320435245444954205050BF0C0F9F4D020B0A9F6E07079200003030009000}], tag: {standard: ISO 14443-4 (Type A), dsfId: , ndef: null, ndefWritable: false, ndefCapacity: 0, ndefCanMakeReadOnly: false, type: iso7816, atqa: 4403, manufacturer: , ndefAvailable: false, protocolInfo: , systemCode: , id: 04251E9AD83780, applicationData: , sak: 20, hiLayerResponse: , webUSBCustomProbeData: null, historicalBytes: 4A434F503234325232, ndefType: }, detail: {}, card_type: Unknown}

As for this card, please provide the detailed log of flutter, for example, the outputs generated here: https://github.com/nfcim/nfsee/blob/master/assets/read.js#L462
Thanks!

@berkaykr
Copy link
Author

berkaykr commented Dec 8, 2022

I am testing the tests on android device. It's a debit card I use. I cannot receive MasterCard and its information.
{apdu_history: [{tx: 00A404000E325041592E5359532E444446303100, rx: 6F27840E325041592E5359532E4444463031A515BF0C1261104F07A00000000410108701019F2A01029000}, {tx: 00A4040007A000000004101000, rx: 6F468407A0000000041010A53B500A4D4153544552434152448701015F2D047472656E9F1101099F120C4D4320435245444954205050BF0C0F9F4D020B0A9F6E07079200003030009000}], tag: {standard: ISO 14443-4 (Type A), dsfId: , ndef: null, ndefWritable: false, ndefCapacity: 0, ndefCanMakeReadOnly: false, type: iso7816, atqa: 4403, manufacturer: , ndefAvailable: false, protocolInfo: , systemCode: , id: 04251E9AD83780, applicationData: , sak: 20, hiLayerResponse: , webUSBCustomProbeData: null, historicalBytes: 4A434F503234325232, ndefType: }, detail: {}, card_type: Unknown}

As for this card, please provide the detailed log of flutter, for example, the outputs generated here: https://github.com/nfcim/nfsee/blob/master/assets/read.js#L462 Thanks!

[log] Log from script: PPSE DF Name: A0000000041010 (MC) Log from script: PPSE DF Name: A000000003101001 (Visa)

@berkaykr
Copy link
Author

I need to have my card scanned, can you help me on how to add it? @dangfan @Harry-Chen

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

4 participants
@dangfan @Harry-Chen @berkaykr and others