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

Add option to force contact card run in contactless mode #13

Open
kentalee opened this issue Jan 19, 2022 · 7 comments
Open

Add option to force contact card run in contactless mode #13

kentalee opened this issue Jan 19, 2022 · 7 comments
Assignees

Comments

@kentalee
Copy link

some visa dual interface test card (flashed by app VMCP) have only contactless PSE on contact reader. Could you please add an option to force program run in contactless mode?

@kentalee kentalee changed the title Add option to force contact run in contactless mode Add option to force contact card run in contactless mode Jan 19, 2022
@mrautio
Copy link
Owner

mrautio commented Jan 19, 2022

Sounds like a good idea! Maybe having a command line option that forces contactless vs. chip functionality to override default way-of-working. If I remember correctly I have in the past seen also test setups where NFC application behaves same as the chip application.

@mrautio
Copy link
Owner

mrautio commented Jan 19, 2022

Also thanks for the tip about VMCP! I'll need to try that out as well

@kentalee
Copy link
Author

Sounds like a good idea! Maybe having a command line option that forces contactless vs. chip functionality to override default way-of-working. If I remember correctly I have in the past seen also test setups where NFC application behaves same as the chip application.

Good idea! It's really useful on some test card.

@kentalee
Copy link
Author

But in some intensive test scenarios, I need to keep modifying the command line parameters for different cards. Maybe there can be an option to let program try both modes instead of set them manually.

@mrautio
Copy link
Owner

mrautio commented Jan 20, 2022

Yes, maybe adding an option to try both "payment application selectors" could be the primary way of working.

@kentalee
Copy link
Author

Also I found that Visa Mobile CDET has no response to default PSE select command:

2022-01-20 13:39:18.223095 +08:00 DEBUG emvpt - Sending APDU:
00000000  00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44  | .ñ♦.♫2PAY.SYS.DD |
00000010  46 30 31                                         | F01              |
2022-01-20 13:39:18.254735 +08:00 DEBUG emvpt - APDU response status: [6A, 82]
2022-01-20 13:39:18.254788 +08:00 DEBUG emvpt - APDU response(0 bytes):
00000000    |  |
2022-01-20 13:39:18.254872 +08:00 WARN emvpt - Could not select "2PAY.SYS.DDF01"

but if append 0x00 as APDU Le, the visa app works fine.

2022-01-20 13:37:20.559691 +08:00 DEBUG emvpt - Sending APDU:
00000000  00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44  | .ñ♦.♫2PAY.SYS.DD |
00000010  46 30 31 00                                      | F01.             |
2022-01-20 13:37:20.590982 +08:00 DEBUG emvpt - APDU response(47 bytes):
00000000  6F 2D 84 0E 32 50 41 59 2E 53 59 53 2E 44 44 46  | o-ä♫2PAY.SYS.DDF |
00000010  30 31 A5 1B BF 0C 18 61 16 4F 07 A0 00 00 00 03  | 01Ñ←┐♀↑a▬O•á...♥ |
00000020  10 10 50 0B 56 49 53 41 20 43 52 45 44 49 54     | ►►P♂VISA CREDIT  |

@mrautio
Copy link
Owner

mrautio commented Jan 23, 2022

Yes, the missing 0x00 Le is a bug (ref. EMV v4.3 Book 1, chapter 11.3.2). Ironically all the cards I've tried seem not to care about the missing Le :)

I'll do a quick fix for that soonish.

mrautio added a commit that referenced this issue Jan 23, 2022
@mrautio mrautio self-assigned this Jan 23, 2022
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

2 participants