apdu

Android NFC : Tag lost when APDU command sent to a smart card

无人久伴 提交于 2019-11-28 20:53:36
I am doing an EMV application on Android OS (Samsung Galaxy). I am able to send several APDU commands without problem but when I am trying to send the internal authentication command. I have this error : Tag lost. Have you got any idea concerning the purpose of this error ? I am not an experimented developer on Android, It may I have forgotten some stuff. the command is correct. I can replace by another command, it works (I mean I can recover a response). In which cases a NFC communication can be broken on Android? Here, you can see my problem when the command is sent : D/ECInfoGrabber(14088):

KitKat: How to route APDUs to the SIM

。_饼干妹妹 提交于 2019-11-28 19:54:13
I want to route APDUs I get from an NFC Reader to the SIM Card. According to the HCE documentation I thought it would be possible simply by creating an OffHostApduService with the according routing-entries (which I did). Sadly, the SIM does not seem to get any APDUs. SELECT-Commands that work when the SIM is directly attached to my workstation by a SIM-Reader return with 6a82 (File not found). In LogCat I found two interesting bits of information: Every time I shoot a select command which should be routed to the SIM, I get these entries: 01-14 10:44:18.501: D/BrcmNfcJni(1009): RoutingManager:

SIMPLE-TLV vs BER-TLV

孤街醉人 提交于 2019-11-28 18:00:45
问题 I have found in docs they are referring to SIMPLE-TLV and BER-TLV . I was look into most of the EMV and GP docs but they have not mentioned the different. Could anyone help me to understand the difference of two ? 回答1: Data fields in ISO/IEC 7816-4 for smart cards BER encoding This is the specification of the more common BER encoding used by ISO/IEC 7816-4: Each BER-TLV data object shall consists of 2 or 3 consecutive fields (see ISO/IEC 8825 and annex D). The tag field T consists of one or

issue with get processing options

孤街醉人 提交于 2019-11-28 12:48:31
I have selected application ( A0000000032010 ) on Visa contactless card and when I issue GPO command: "80A8000002830000" I get error: 67 00 Does anyone have idea what can be causing this? Michael Roland You receive that error code because you are sending an invalid GET PROCESSING OPTIONS command. In response to the application selection, you received the following PDOL: 9F38 0E (Processing Options Data Object List (PDOL)) 9F6604 (Terminal Transaction Qualifiers (TTQ)) 9F0206 (Amount, Authorized (Numeric)) 9F3704 (Unpredictable Number) 5F2A02 (Transaction Currency Code) 9A03 (Transaction Date)

I can't find APDU commands for SLE5542

感情迁移 提交于 2019-11-28 11:02:56
问题 I can't find anywhere a valid APDU list for SLE5542 smartcard. Actually I found this: http://www.acs.com.hk/drivers/eng/PMA_ACR38x(CCID)_v6.01.pdf but it's not working. I've searched also for SLE4442 which is compatible, I've searched some standardization, but nothing. (I found some comprehensive datasheets about SLE4442 but they don't contain APDU data) I'm novice in this domain, so maybe I'm missing something. In the end I want to be able to read/write some data to the card. (including

Do I have to know what the AID of a card is for card emulation with Android HCE?

隐身守侯 提交于 2019-11-28 06:11:00
问题 I merely want to emulate a transit card with an Android application using HCE. I'm confused about the AID of the card. Do I have to know what the AID of the card is? According to Host-based Card Emulation document: If you are emulating cards for an existing NFC reader infrastructure, the AIDs that those readers are looking for are typically well-known and publicly registered (for example, the AIDs of payment networks such as Visa and MasterCard). So, what is the point? P.S. I don't think the

Selecting DF (Dedicated File) in Smart Card, Return Error 6981

99封情书 提交于 2019-11-28 02:10:15
问题 I have written a program to communicate with a smart card (Gemalto Company MPCOS applet). I could successfully connect to card and transmit commands and fetch data. However I have a problem: When I used 00 A4 01 00 02 02 00 command to select DF(Dedicated File), It returned error 69 81 (file indicator is incorrect). This is so weird because after this command I used another command to fetch sub-file of this DF and it returned success 61 12 . command1(Select MPCOS Applet): 00 A4 04 00 10 A0 00

Get UID of Mifare Ultralight with SCL010

蹲街弑〆低调 提交于 2019-11-27 23:13:33
I want get the UID of the Mifare Ultralight NFC tag. In Java I have this code: TerminalFactory factory = TerminalFactory.getDefault(); List<CardTerminal> terminals = factory.terminals().list(); System.out.println("Terminals: " + terminals); CardTerminal terminal = terminals.get(0); Card card = terminal.connect("*"); System.out.println("card: " + card); CardChannel channel = card.getBasicChannel(); ResponseAPDU answer = channel.transmit(new CommandAPDU(0xFF, 0xCA, 0x00, 0x00, 0x00)); byte[] uid = answer.getBytes(); The problem is that I receive two bytes and not the UID. What's the problem? Is

What APDU command gets card ID

前提是你 提交于 2019-11-27 22:20:23
问题 What APDU command gets 7 byte of card ID? I use T=CL (ISO7816) pritocol with ISO14443 layer. On detect card I can see only 4 byte of card ID. I searched, that is APDU command for gets card ID. For example its: 0xFF, 0xCA, 0x00, 0x00, 0x00 but result of thouse command is: 6E 00 , that on specifications of APDU answers tell that "Class not supported" Then I find, that its APDU command may be as: 0x00, 0xCA, 0x00, 0x00, 0x00 this command return 6A 88 where 6A XX - "Wrong parameter(s) P1-P2" and

Android NFC Issue with APDU Commands

南笙酒味 提交于 2019-11-27 18:10:45
问题 I am working on an Application using the IsoDep Tag Tech to issue APDU commands to an NFC enabled card. UPDATE: So the issues seen below seem related to the power requirements of the cards I am using, when I use a different card with lower power requirements the below symptoms don't occur as frequently. I have followed the documentation explicitly and have a successful managed to implement the protocol. However with mixed success I am experiencing some issues with the NFC lower level