mifare

Android 4.4.2, PN532 NFC reader and NFC Card emulation

吃可爱长大的小学妹 提交于 2020-01-01 19:22:12
问题 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? 回答1: That depends on what

java.lang.nullpointerexception in j2me

人走茶凉 提交于 2019-12-29 09:25:10
问题 I am writing an application for read the mifare card,but when I pass the APDU the error occur that on emulator "java.lang.nullpointerexception".I have successfully detect the ISO14443_CARD after that I pass the APDU like if (tp.hasTargetType(TargetType.ISO14443_CARD)){ form.append("Target is ISO14443_CARD\n"); try { static byte[] APDU_AUTH1 = { (byte) 0xff, (byte) 0x86, (byte) 0x00, (byte) 0x00, (byte) 0x05,(byte)0x01,(byte)0x00,(byte)0xfc,(byte)0x60,(byte)0x00}; static byte[] STATUS_BYTE = {

Reading Mifare Classic returns strange characters

流过昼夜 提交于 2019-12-29 09:19:06
问题 When reading a MIFARE card with Android and converting the data to UTF-8 I get strange characters like �. I'm trying to build an application that can read some kind of ID card we're using. The problem now is that I get weird characters between words and some words are split between blocks so how can I safely get a word I'm looking for? For instance my readings is something like this: 43224���19032019�� at block 2 sektor 2 bindex :8 and with splitting where rest of the number starting with 19

Why doesn't Android HCE support Mifare Classic type?

无人久伴 提交于 2019-12-29 07:13:07
问题 Mifare Classic is the most used cards and I can't understand why HCE (Host-based Card Emulation) only supports ISO 14443-4, but not Mifare Classic type. Because NXP stops them from using their proprietary protocols and algorithms? Or because they didn’t implement Mifare Classic in Android OS level? Any comments will be very appreciated. 回答1: Short answer: Because Google decided to support only ISO/IEC 7816-4 over ISO-DEP (ISO/IEC 14443-4). Speculations on why they decided that way: First of

Why doesn't Android HCE support Mifare Classic type?

走远了吗. 提交于 2019-12-29 07:13:00
问题 Mifare Classic is the most used cards and I can't understand why HCE (Host-based Card Emulation) only supports ISO 14443-4, but not Mifare Classic type. Because NXP stops them from using their proprietary protocols and algorithms? Or because they didn’t implement Mifare Classic in Android OS level? Any comments will be very appreciated. 回答1: Short answer: Because Google decided to support only ISO/IEC 7816-4 over ISO-DEP (ISO/IEC 14443-4). Speculations on why they decided that way: First of

Android nfcA.connect(), nfcA.transceive(), nfcA.setTimeout() and nfcA.getMaxTransceiveLength()

人盡茶涼 提交于 2019-12-29 06:25:15
问题 I have a a number of newbie NfcA questions. There seems to be little guidance on this in the docs and elsewhere on the web, so I hope no-one minds me stringing a few basic questions together here... I am using nfcA.transceive() to write data to my NTAG213 tag like this: byte[] result = nfcA.transceive(new byte[] { (byte)0xA2, // WRITE (byte)(pageNum & 0x0ff), myData[0], myData[1], myData[2], myData[3] }); 1. The result array is a single byte of value 10. What does this mean and what other

android nfc - mifare classic 1k Increment operation tranceive failed

£可爱£侵袭症+ 提交于 2019-12-25 11:54:29
问题 I want to store an integer value and increment or decrement it with API function. I have readed the card with an utility and this is the content of block 5: It seems that there is not any value block. This is my code: int sector = 5; this.mClassic.connect(); boolean success = this.mClassic.authenticateSectorWithKeyA(sector, MifareClassic.KEY_DEFAULT ); if(success){ int firstBlock = mClassic.sectorToBlock(sector); Log.i("MIFARE CLASSIC", "first block of the given sector:" + firstBlock); //set

android nfc - mifare classic 1k Increment operation tranceive failed

纵然是瞬间 提交于 2019-12-25 11:54:21
问题 I want to store an integer value and increment or decrement it with API function. I have readed the card with an utility and this is the content of block 5: It seems that there is not any value block. This is my code: int sector = 5; this.mClassic.connect(); boolean success = this.mClassic.authenticateSectorWithKeyA(sector, MifareClassic.KEY_DEFAULT ); if(success){ int firstBlock = mClassic.sectorToBlock(sector); Log.i("MIFARE CLASSIC", "first block of the given sector:" + firstBlock); //set

How to remove password protection in NTAG216?

ⅰ亾dé卋堺 提交于 2019-12-25 08:52:04
问题 I was able to find a way to protect a tag with a password, the problem is that I don't know how to remove it. According to this datasheet, if you set the value of AUTH0 outside its range, the password will be disabled, I tried doing that but nothing happened. This is how I am trying to disable the password: Open tag Authenticate tag Set value of AUTH0 (page 41, third byte) to 256 (range of AUTH0 is 0 to 255 according to the datasheet) Close tag 回答1: You indicate that you change AUTH0 on page

How can I edit the content of my smart card?

梦想与她 提交于 2019-12-25 01:45:37
问题 Can you tell me please how I can edit the content of my smart card? How should I use APDU commands in order to edit the content? Lets say I have something like this on a smart card: 00 00 05 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 And I want it to be : 00 00 06 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 How can I do that? Is it possible? If yes, how? I have ACR-122 NFC READER/writer 回答1: You're talking about simple