mifare

Open Android Activity when NFC_TECH is discovered

妖精的绣舞 提交于 2019-11-28 09:30:02
问题 I am developing an app which is required to open upon scanning an NFC tag that doesn't contain any data(?) except for ID . The items in database are supposed to be identified by that ID and I am not supposed to write anything on these tags I can get the device to scan the tag in foreground mode by calling enableForegroundDispatch() and it returns me with new intent that contains the required data EXTRA_ID However when the application is on background and I scan a tag, I can hear the system

Reading UIDs of NFC Cards in iOS 13

感情迁移 提交于 2019-11-28 01:15:17
问题 I would like to retrive the UID of MiFare cards. I'm using an iPhone X, Xcode 11 and iOS 13. I'm aware this wasn't possible (specifically reading the UID) until iOS 13 according to this website: https://gototags.com/blog/apple-expands-nfc-on-iphone-in-ios-13/ and this guy: https://www.reddit.com/r/apple/comments/c0gzf0/clearing_up_misunderstandings_and/ The phones NFC reader is correctly detecting the card however the unique identifier is always returned as empty or nil. I can read the

Get UID of Mifare Ultralight with SCL010

蹲街弑〆低调 提交于 2019-11-27 23:13:33
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[] uid = answer.getBytes(); The problem is that I receive two bytes and not the UID. What's the problem? Is

What APDU command gets card ID

前提是你 提交于 2019-11-27 22:20:23
问题 What APDU command gets 7 byte of card ID? I use T=CL (ISO7816) pritocol with ISO14443 layer. On detect card I can see only 4 byte of card ID. I searched, that is APDU command for gets card ID. For example its: 0xFF, 0xCA, 0x00, 0x00, 0x00 but result of thouse command is: 6E 00 , that on specifications of APDU answers tell that "Class not supported" Then I find, that its APDU command may be as: 0x00, 0xCA, 0x00, 0x00, 0x00 this command return 6A 88 where 6A XX - "Wrong parameter(s) P1-P2" and

Exclude non-NXP Android phones with NFC (like the Nexus 4/10)

亡梦爱人 提交于 2019-11-27 19:00:00
问题 I've built an app that reads out certain data from the student ID cards our school uses. Right now it only reads user data but in the future the plan is to add support to read the remaining credit. The problem is that the cards we use are Mifare Classic. Nexus 4 and Nexus 10 (and possibly more devices) don't support these cards since they have a Broadcom NFC controller. If I'm right the app shouldn't crash or give issues on those devices, but it just doesn't do anything. Is there a way to

Set own authentication keys MiFare Classic with APDU C#

社会主义新天地 提交于 2019-11-27 16:56:10
问题 I'm using the SMARTCARD API from CardWerk. How can I change the default key ( (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF ) using an APDU? The APDU consits of a CLASS, an INSTRUCTION, P1, P2. I have been reading documentation but I'm unable to find what parameters do I need to change the actual key to a new one. 回答1: The process for changing the keys of a MIFARE Classic card is like this: Authenticate to the secor for which you want to change the key. Read the

DESFire EV1 card emulation

耗尽温柔 提交于 2019-11-27 15:31:15
问题 I need to emulate a DESFire EV1 card on an Android device. However, I'm confused on how to use the Mifare SDK (lite or advanced) with the HCE. Is that even possible? I need to start the project and I had a lot of researches about how the data are stored and ciphered in the DESFire cards but I ended up with the fact that I need to use Mifare SDK on HCE. 回答1: First of all, you cannot use the MIFARE SDK to emulate cards. The MIFARE SDK provides reader-side functionality only. Second, you cannot

How well does the Android NFC API support Mifare Desfire?

試著忘記壹切 提交于 2019-11-27 10:12:42
问题 I'm likely to be working on a project where existing Desfire cards (used to access paid services) will be replaced with an NFC-capable mobile device. Can anyone point me to any resources to help me understand what's involved in a) replicating a Desfire card's data onto a mobile device so it can take the place of a card, and b) for the app to deliver NFC data in order to present to the reader as if it were a card. All relevant keys and access will be provided by the card issuer (if the project

DES Send and Receive Modes for DESFire Authentication

南楼画角 提交于 2019-11-27 10:02:56
问题 I'm trying to authenticate DESFire card with my android application. I use the example in this link to decypher the bytes I got from the card. For that, I ruled out padding in decryption (commented out below), because DESFire documentation points it out. Also, if I don't do so, decryption returns 7 bytes for input of 8 bytes. Below are DES and TripleDES decryption functions I use: public static byte[] TripleDES_Decrypt(byte[] data,byte[][] keys) { int i; byte[] tmp = new byte[data.length];

Locking mechanism of Mifare Classic 1K

巧了我就是萌 提交于 2019-11-27 09:19:25
The procedure of Mifare Classic 1K is Polling for tags Authenticate those tags If authentication succeded then read/write. I already completed those procedures and also read and write data from specific sectors. Command for Polling for tags is new byte[] { (byte) 0xFF, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0xD4, (byte) 0x4A, (byte) 0x01, (byte) 0x00 } Authentication command is new byte[] { (byte) 0xFF, (byte) 0x86, (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x01,(byte) 0x00, (byte) 0x04, (byte) 0x60,(byte) 0x00 }; Here "(byte) 0x01" is the Sector 1 And Write on Sector 1