mifare

NFC APDU READ command performance tuning

走远了吗. 提交于 2019-12-05 05:39:04
问题 I am reading several hundred bytes from a DESFire card using APDU commands. The data application is authenticated, and the response MAC'ed. I submit a series of READ_DATA commands (0xBD), each retrieving 54 bytes+MAC while increasing read offset for each command. Will this operation go much quicker if I use a long READ with ADDITIONAL_FRAME (AF) instead of many sequential reads? I understand that a simple AF is 1 byte vs 8 bytes for a full READ DATA command, thus reducing the number of bytes

Writing to a Mifare tag with Android NFC?

◇◆丶佛笑我妖孽 提交于 2019-12-05 01:52:01
问题 I'm trying to write a simple "Hello World" string to the first block of sector 0 on a Mifare 1K tag. The tag is brand new with default configuration. The sector trailer (block 3), when read, is: 00 00 00 00 00 00 00 00 ff 07 80 69 ff ff ff ff ff ff ff ff . Hence, the access conditions is ff 07 80 69 , meaning I can read and write on each block with key A. Still, I can't manage to write anything on the tag. Here's my code: try { mfc.connect(); boolean auth = false; auth = mfc

Standards for smartcard communication

半城伤御伤魂 提交于 2019-12-05 00:22:42
问题 What is the difference between ISO 14443-3 and ISO 7816-4 APDUs? I'm asking this because seems some cards use former to communicate with reader, some latter. I'm confused with this, would like to get a good understanding about this. For example, I think Mifare Classic uses ISO 14443-3. But what confused me here is that when I wrote application to communicate with Mifare classic, I was sending APDUs to it. 回答1: The ISO 14443 standard defines the physical RF transport protocol for communication

Mifare Ultralight C Authentication in Android (2.3.6)

你离开我真会死。 提交于 2019-12-05 00:16:16
问题 I'm trying to authenticate a Mifare Ultralight C (ISO/IEC 14443-2 and 14443-3 type A compatible) tag. I send the authentication command with the MifareUltralight.transceive() function provided in Android. I have also checked NfcA.transceive() (IsoDep seems not to be compatible with this kind of tag because this object is for dealing with ISO/IEC 14443-4 tags and that's why I don't use IsoDep.transceive()). So, when I first send the authentication request command the tag answers the transceive

Coordinate Id of same card that is read by two different card readers

醉酒当歌 提交于 2019-12-04 21:33:11
In a part of a software, card is read by a card reader and is allocated to an user. And in other part of this software, in a terminal by same card reader, the user card is read and fetch data from database by card serial number and etc. In a new part of this software, there are a new terminal with a new card reader. card is read from this card reader and fetch data from database and etc. So, now the problem is that a same card that is read by this two card readers are different in type. The first device return card id as a hexadecimal string, like this: 2E 6F 27 3F This hexadecimal string is

Reading Mifare 1k from a WinForm application

ぃ、小莉子 提交于 2019-12-04 21:09:33
I have a really weird problem with reading Mifare 1k card from WinForm application. The reader I'm using is a PROMAG PCR-310U smart card reader. I use this code to read the card: MifareReader.CommPort = 4; MifareReader.PortOpen = true; MifareReader.mfRequest(); MessageBox.Show(MifareReader.mfAnticollision().ToString()); MifareReader.mfHalt(); The code is placed inside the backgroundWorkers DoWork method, and the entire method looks like this: private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; while (!worker

Unable to authenticate to a MIFARE Classic tag used as NDEF tag

随声附和 提交于 2019-12-04 20:16:17
I'm using an ACR 1255U-J1 as external reader connected through Bluetooth. The library I use to access the reader is acsbt-1.0.0preview7. I use the following commands to authenticate to sector 1 (block 4) of a MIFARE Classic tag: FF 82 0000 06 FFFFFFFFFFFF FF 86 0000 05 01 00 04 60 00 When I authenticate to an empty MIFARE Classic tag (with manufacturer default configuration), I receive the response status word 9000 . This indicates that authentication was successful. However, when I try to authenticate to a MIFARE Classic tag that has been formatted for use as an NDEF tag, the returned status

Android 4.4.2, PN532 NFC reader and NFC Card emulation

左心房为你撑大大i 提交于 2019-12-04 20:16:02
I have developed a system that can read NFC tag using a reader with PN532 chip . It works ok. I can read Mifare Classic and Mifare Ultralight tag. Now I'd like to use a Nexus Tablet with Android 4.4.2 to emulate a tag. I have no experience with android development but I think it is possible. I have set NFC communication in the Nexus Tablet but I think I have to download or write some application to emulate a Tag and an NDEF communication. What is the easiest way? Michael Roland That depends on what Nexus tablet you have: Nexus 7 (first generation/2012 version): This device uses NXP's PN544 NFC

Mifare Change KEY A and B

僤鯓⒐⒋嵵緔 提交于 2019-12-04 19:17:34
问题 I have an ACR122U Contactless NFC reader. I bought a lot of blank RFID Mifare 4k tags. Their default Authentication KEY A and KEY B is FF FF FF FF FF FF. Now I want to change them to something else. I'm using APDU structure. I'm sending commands like this and it works well: byte[] baData = { 0x01, 0x00, (byte)i, 0x60, 0x00 }; APDUCommand apdux3 = new APDUCommand((byte)0xFF, (byte)0x86, (byte)0x00, (byte)0x00, baData, 0x05); It works well. I don't know what this interface and model means, but

Reading a NFC Mifare card with NXP Reader Library

不想你离开。 提交于 2019-12-04 18:42:49
I'm trying to read the content of a Mifare Ultralight card using the NFC Reader Library. I'm totally new with NFC and I'm using this github repository to start. The code in this repo allows to detect which type of card is detected (Mifare, Mifare ultralight ...) and read the UID of the card. I added this code in order to read the content of a Mifare ultralight card: uint8_t bBufferReader[96]; memset(bBufferReader, '\0', 0x60); PH_CHECK_SUCCESS_FCT(status, phalMful_Read(&alMful, 4, bBufferReader)); int i; for(i = 0; i < 96; i++){ printf("%02X", bBufferReader[i]); } I have a card that contains