apdu

Writing data into Nexus 4 in card emulation mode with ACR122

大兔子大兔子 提交于 2019-12-01 14:49:09
I am trying to send some data to the Nexus 4 through NFC (i.e. the card emulation mode). I tried a number of the command APDUs such as writing and updating APDUs, but I couldn't get them to work. What I am trying to say is, I want to send some data (that is not the AID) to the phone after the select APDU command. Thanks in advance, Bader The HCE emulated card will understand exactly those commands that your HCE app's APDU service processes. So, for instance, if your HCE service's processCommandApdu() callback method looks like this: final static byte[] SW_NO_ERROR = new byte[]{ (byte)0x90,

Writing data into Nexus 4 in card emulation mode with ACR122

久未见 提交于 2019-12-01 13:30:49
问题 I am trying to send some data to the Nexus 4 through NFC (i.e. the card emulation mode). I tried a number of the command APDUs such as writing and updating APDUs, but I couldn't get them to work. What I am trying to say is, I want to send some data (that is not the AID) to the phone after the select APDU command. Thanks in advance, Bader 回答1: The HCE emulated card will understand exactly those commands that your HCE app's APDU service processes. So, for instance, if your HCE service's

how to write and read data from smart card using java card apdu

我只是一个虾纸丫 提交于 2019-12-01 12:56:15
I have written an applet and installed it in smart card. But I don't know how to read and write data to smart card? private void readName(APDU apdu) throws ISOException { byte[] apduBuffer = apdu.getBuffer(); for (byte i=0; i<userName.length; i++) { apduBuffer[5+i] = userName[(byte)i] ; } apdu.setOutgoing(); apdu.setOutgoingLength((short)userName.length); apdu.sendBytes((short)5, (short)userName.length); } Is it right code to read data from smart card? please tell me how to write data to smart card using javacard. Your card is either contact or contactless. Since you say you have already

Unable to identify AFL on a smart card

淺唱寂寞╮ 提交于 2019-12-01 12:42:09
问题 I'm working to get useful data from a VISA (such as PAN, expiry date...) credit card using a list of AIDs I got stuck. I have been able to access to all the data manually. Using the next tutorial: http://www.openscdp.org/scripts/tutorial/emv/reademv.html >>00 A4 04 00 07 A0 00 00 00 03 10 10 00 In ASCII: <<o<EM>„<BEL> <0><0><0><ETX><DLE><DLE>¥<SO>P<EOT>VISA¿<FF><ENQ>ŸM<STX><VT><LF><0> In Hexadecimal: <<6F 19 84 07 A0 00 00 00 03 10 10 A5 0E 50 04 56 49 53 41 BF 0C 05 9F 4D 02 0B 0A 90 00

how to write and read data from smart card using java card apdu

怎甘沉沦 提交于 2019-12-01 11:48:15
问题 I have written an applet and installed it in smart card. But I don't know how to read and write data to smart card? private void readName(APDU apdu) throws ISOException { byte[] apduBuffer = apdu.getBuffer(); for (byte i=0; i<userName.length; i++) { apduBuffer[5+i] = userName[(byte)i] ; } apdu.setOutgoing(); apdu.setOutgoingLength((short)userName.length); apdu.sendBytes((short)5, (short)userName.length); } Is it right code to read data from smart card? please tell me how to write data to

Read NDEF message with external NFC reader ACR1252

岁酱吖の 提交于 2019-12-01 11:29:20
问题 I am using the following command to read a binary block from a Mifare Ultralight tag: FF B0 00 01 04 But now I want to exact the NDEF message stored in that Mifare Ultralight tag using an ACR1252 NFC reader. Which command do I have to use to get the full NDEF message? On which position in the tag is the NDEF message stored? 回答1: MIFARE Ultralight tags map to the NFC Forum Type 2 Tag Operation specification (broken link, here is an alternative. Consequently, in order to extract the NDEF

Emulate a smart card on Android when the NFC Reader does not send a “SELECT AID” APDU

谁都会走 提交于 2019-12-01 07:40:28
问题 I have read the Android documentation about NFC and found that it could emulate an NFC tag. However it requires that you register which AID you serve. Is it possible to create an application that handles communication if the NFC reader does not send a "SELECT AID" APDU? Either by creating an application where the AID in the manifest file is empty, or create some sort of default application. I don't mind if the application has to be in the foreground, if that helps in any way. Thank you in

Read write data in SLE4442 smart card with java commandAPDU?

醉酒当歌 提交于 2019-12-01 02:00:51
I want to read and write data in SLE4442 smart card i have ACR38U-i1 smart card reader For write I am use this commandAPDU byte[] cmdApduPutCardUid = new byte[]{(byte)0xFF, (byte)0xD0, (byte)0x40,(byte)0x00, (byte)4,(byte)6,(byte)2,(byte)6,(byte)2}; And for read data byte[] cmdApduGetCardUid = new byte[]{(byte)0xFF,(byte)0xB0,(byte)0x40,(byte)0x00,(byte)0xFF}; both are execute and send SW= 9000 but no one data receive in responseAPDU Like I write 6262 data but it not receive I am also use Select command to before write and read command The select command is byte[] cmdApduSlcCardUid = new byte[

Transmission error for T=0 JavaCards

筅森魡賤 提交于 2019-12-01 01:27:19
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 void process(APDU arg0) throws ISOException { arg0.setOutgoingAndSend((short)0, (short)256); } } When I

Android isoDep.transceive on Generate AC command always returns 6D00 unsupported

孤街醉人 提交于 2019-11-30 23:13:03
I'm trying to emulate a PoS, point of sale :), system and complete a transaction with Google wallet running on a 2013 Nexus 7 (no secure element) v4.4.2. My PoS prototype is also running on a 2013 Nexus 7 v4.4.2. I'm able to get NFC responses from the 2PAY_SYS_DDF01 request. I'm able to select the MasterCard application ID. I'm able to get Processing Options. When I Read Records it doesn't look like Google wallet is returning all the mandatory EMV fields. And finally when I request the Generate AC command it always returns 6D00 unsupported. Area of the code that is a problem: //set P1 to '40',