0

I am working with a Visa CDET contact-less test card. I have successfully selected the Application, which gave me the following result:

<= 6f 29 84 07 a0 00 00 00 03 10 10 a5 1e 50 0b 56 49 53 41 20 43 52 45 44 49 54 5f 2d 02 65 6e 9f 38 09 9f 66 04 9f 02 06 9f 37 04

The result included a PDOL which asked for the following items:

Terminal Transaction Qualifiers
Length: 4 bytes

Authorised Amount
Length: 6 bytes

Unpredictable Number
Length: 4 bytes

When it comes to the GPO command, I do have all the elements needed as shown below:

=> 80 a8 00 00 10 83 0e f3 20 40 00 00 00 00 00 12 00 bc 4b a2 3f 00

But when i run the command, I received a 67 00 error: Wrong Lc length. What could be the issue? Keep in mind the same program works perfectly when working with Visa CDET Contact test cards from the same kit.

EDIT: About the same problem, I have a test reader that I use to confirm my readings. The reader and its program can get the GPO options and return the result for other cards, but my program is not giving me any results when I try the EXACT same command using the EXACT same card in my custom program. The result is a blank, yet the status words are 90 00 (they are separate from the returned data). Why is that?

Peter
  • 648
  • 7
  • 26
  • Are you sure that the TTQ that you send for that transaction are correct/valid for a contactless transaction? See [Getting Parser error on request for GPO command for EMV card](http://stackoverflow.com/a/23591064/2425802). – Michael Roland Mar 05 '15 at 07:24
  • @MichaelRoland please explain more about that, since the same cards causing the above errors when using contact-less method do not show such errors when using contact transaction method, both tests done using the same program. But am sure my TTQ is okay for a mobile POS device – Peter Mar 05 '15 at 11:02
  • I'm not familiar with the contact specifications, but for contactless, TTQ byte 1 (`F3`): Bit 7 is RFU and expected to be zero according to the current CL Kernel 3 spec. Bit 1 is RFU and expected to be zero according to the CL Kernel 3 spec in version 2.1. So I would suggest that you try `B2` or `B3`. Wrong TTQ do not explain why the card responds with SW `67 00` though. – Michael Roland Mar 05 '15 at 14:28
  • @MichaelRoland would you happen to know which conditions would cause a GPO command to return no results, yet the status condition is 90 00? This is when there are no PDOL options to process – Peter Mar 06 '15 at 11:59

2 Answers2

1

Just assume first, that the card is right: If the length of data object 83 is 0x0F (instead of 0x0E) if I counted correctly, then the total length to be supplied in LC has to be 0x11 instead of 0x10 (tag and length to be added). This does not explain, why the contact version works, but possibly it still will work after the adjustment.

guidot
  • 5,095
  • 2
  • 25
  • 37
0

I received a 67 00 error: Wrong Lc length.

ok, its because you dont have Lc=0x00 in APDU just add 0x00 to APDU