mifare

Android NFC - ndef.writeNdefMessage() throws IOException and erases tag data

為{幸葍}努か 提交于 2020-01-21 08:14:18
问题 My app uses the foreground dispatch system to allow a user to tap their NFC tag in order to perform a read-then-write operation on the tag. It works nicely if the user taps their tag properly (i.e., they tap it in the correct place on the phone and leave it connected for long enough), but if they physically remove the tag too early, then ndef.writeNdefMessage(...) throws an IOException. That means the write operation fails, which is fair enough. But the real problem is that the same failed

Formatting a Mifare Ultralight C to NDEF

只谈情不闲聊 提交于 2020-01-17 04:26:06
问题 I want to format a Mifare Ultralight C to handle NDEF messages. I have written the code below and it works just fine with the Mifare Classic 1K chips but it gets an IOExeption when i try and connect to the Ultralight C chip. NdefFormatable format = NdefFormatable.get(tag) if(format != null){ try { format.connect(); format.format(new NdefMessage(new NdefRecord(NdefRecord.TNF_EMPTY, null, null, null))); format.close(); Toast.makeText(getApplicationContext(), "Tag formated.", Toast.LENGTH_LONG)

APDU Write block commands on mifare classic

℡╲_俬逩灬. 提交于 2020-01-13 20:27:53
问题 I have been trying to write some data to my mifare classic cards. first I send these two commands which returns 90 00: Load Mifare Keys: FF 82 20 01 06 FF FF FF FF FF FF Authenticate: FF 86 00 00 05 01 00 01 60 01 now I can write commands to sector 0 and block 1 + 2 ff d6 00 01 10 14 01 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 ff d6 00 02 10 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 i mistakenly overwritten block 3 a few times rendering this sector unreadable it seems: if I send the

APDU Write block commands on mifare classic

时光毁灭记忆、已成空白 提交于 2020-01-13 20:26:32
问题 I have been trying to write some data to my mifare classic cards. first I send these two commands which returns 90 00: Load Mifare Keys: FF 82 20 01 06 FF FF FF FF FF FF Authenticate: FF 86 00 00 05 01 00 01 60 01 now I can write commands to sector 0 and block 1 + 2 ff d6 00 01 10 14 01 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 ff d6 00 02 10 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 03 E1 i mistakenly overwritten block 3 a few times rendering this sector unreadable it seems: if I send the

Is it possible to implement a token queue in NFC cards?

这一生的挚爱 提交于 2020-01-12 07:23:10
问题 This question is specifically about MIFARE Ultralight C/EV1, or MIFARE DESFire EV1, or even NTAG cards. I want to implement a system of tokens, so that each time a normal user reads one of those cards they'll get one available token; that token will "pop out" from the NFC card they're reading. In other words, every time that NFC chip is read, it will issue a different usable token from the card's storage. Is this possible to implement? 回答1: Common non-programmable smart cards usually provide

MIFARE read-only & write protected block at the same time?

痞子三分冷 提交于 2020-01-06 03:58:04
问题 Which of MIFARE cards support a single block that can be programmed to require a password for writing, but is available to everyone for reading its data? And is such standard eligible on all platforms, specifically iOS. Can it use its NFC chip for doing both mentioned operations on such card? 回答1: There are quite a few products in the MIFARE product family 1 that would allow write-protecting information with an authentication key/password (while at the same time having that information freely

How to write MifareClassic with Custom Key

佐手、 提交于 2020-01-02 16:02:56
问题 I need to find a solution to write Mifare Classic 1 K Tag with Custom Key. I am unable to write it, I have tried with every option but unfortunately all the time I get the error "IOException: Transceive Failed". Below is my code snippet: byte custom_key[]={ (byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff }; // 16 bytes of Data. Otherwise it was throwing IllegalArgumentException . byte[] data="Hello world of N".getBytes(); getMfc().connect(); if(getMfc()

How to write MifareClassic with Custom Key

試著忘記壹切 提交于 2020-01-02 16:02:04
问题 I need to find a solution to write Mifare Classic 1 K Tag with Custom Key. I am unable to write it, I have tried with every option but unfortunately all the time I get the error "IOException: Transceive Failed". Below is my code snippet: byte custom_key[]={ (byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff }; // 16 bytes of Data. Otherwise it was throwing IllegalArgumentException . byte[] data="Hello world of N".getBytes(); getMfc().connect(); if(getMfc()

How use security on Mifare Ultralight C (using android)?

爷,独闯天下 提交于 2020-01-02 06:57:06
问题 I am trying to develop an Android application that uses the features (specifically read protection) of the MF0ICU2 tags (Mifare Ultralight C). That tags are Mifare DESFire EV1 compatible. Into Android classes, MifareUltralightTag have only standard Read and Write capability, but with transceive method you could send raw command to Tag, for example 0x30 0xYY is a read page and it works. But how use raw command to use security capability on MF0ICU2 tags? Does anyone have experience with this

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

和自甴很熟 提交于 2020-01-01 19:58:13
问题 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