apdu

APDU command to get the serial number of a smart card

时光怂恿深爱的人放手 提交于 2019-12-19 05:07:13
问题 How can I get the serial number of a smart card using APDU command? I have tried to query it by using SCardGetAttrib function of winscard.dll with no luck, I've been told to use an APDU command to do that since there is no standard way to get the serial number. The problem is that I can't figure out what type my smart cards are! So I have looked into the documents of few of popular smart card manufacturers with no luck to find a way to get the serial number!! My card reader is ACR88. 回答1: In

Transmission error for T=0 JavaCards

梦想与她 提交于 2019-12-19 04:14:08
问题 I have 4 different types of JavaCards. For a weird purpose, I wrote the following applet to return whole the APDU buffer on reception of each APDU command: package bufferReturner; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISOException; public class BufferReturner extends Applet { private BufferReturner() { } public static void install(byte bArray[], short bOffset, byte bLength) throws ISOException { new BufferReturner().register(); } public

Sign App with UICC Carrier Privileges Certificates

喜夏-厌秋 提交于 2019-12-18 13:54:18
问题 I was reading information on this link in regards to signing an application with carrier privileges. I am aware of how to sign an application using a keystore for production releases, but how do I add UICC certificates to my app so it gets carrier privileges? My main goal is to be able to call TelephonyManager functions like: iccOpenLogicalChannel iccCloseLogicalChannel iccTransmitApduLogicalChannel iccTransmitApduBasicChannel This is the stack trace I get when calling one of the above

Android HCE: are there rules for AID?

人走茶凉 提交于 2019-12-18 02:57:54
问题 I'm trying to use an ACR122 NFC reader to select an application emulated in one Nexus 5 using Android Host Card Emulation. However, small AIDs are not recognized. My goal is to use a three byte long AID, as I do in a DESfire card. My first goal is only to be able to do a SELECT command. My test app uses the following configuration for AIDs: <host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android" android:description="@string/service_descr" android:requireDeviceUnlock=

Host card emulation on Android (4.4 / KitKat and above) with Nexus 5

那年仲夏 提交于 2019-12-18 01:19:56
问题 I'm trying to emulate an NFC tag with my Nexus 5 according to this document, but my service is never invoke. Should I turn off Android beam? I'd like to emulate a simple tag containing a url. The reader is a Nexus 7 (2012) and I've figured out the process like a simple scan of a NFC tag using Android beam on Nexus 7. In addition I'm a bit confused about aid-filter name. Is there a list of them? I'm sure that I don't understand something. Thanks 回答1: First of all (though this does not directly

issue with get processing options

丶灬走出姿态 提交于 2019-12-17 20:28:46
问题 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? 回答1: 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

Get UID of Mifare Ultralight with SCL010

早过忘川 提交于 2019-12-17 16:30:58
问题 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[]

How can i credit or debit more than 1 byte to/from card?

你离开我真会死。 提交于 2019-12-13 22:09:59
问题 I am newbie applets and i used from this link: working with Java Card Wallet for creating an Wallet project. I before could credit card amount by this command : 80 30 00 00 01 1A 00 . I now want add '5000' to the present amount. As you know 5000 in hex equals with '1388' that is 2 byte. So i must send 2 byte data 13 and 88 to the card. I create bellow command and sent it to card but i get '67 00 Wrong lenght' as response. 80 30 00 00 02 13 88 00 How can i credit or debit more than 1 byte to

is it possible to return some data along with the status word 9000 on selecting an applet in javacard?

情到浓时终转凉″ 提交于 2019-12-13 14:34:47
问题 i was wondering if i could send back some data from the javacard applet when it is selected. since select() method returns a boolean value i don't know how to return data bytes from it. can anyone help me with this? i want the applet to return a simple byte array along with the status word 9000 (which is default for success), when i send the select command to the card. ie, when i send the following command 00A4040006010203040506 i want a response like, 010203049000 (first four bytes are the

Arduino: uint8_t array to string

折月煮酒 提交于 2019-12-13 04:48:39
问题 I have an NFC application built on android that sends a hash as an apdu answer. This is the code I use in my Android app to send the hash: @Override public byte[] processCommandApdu(byte[] arg0, Bundle arg1) { String hash = "e68d3f574009cbbe011150263634c5c0"; return hash.getBytes(Charset.forName("UTF-8")); } Now when I receive it on the Arduino side of things I get this RAW data: 10154561005110253555248485799989810148494949534850255255255255255255255255255 How do I get the hash back from that