Android application to mimic a physical RFID card
Asked Answered
T

3

27

Is it possible for an Android application to send a previously stored RFID card ID to a NFC reader? The aim would be to use an Android device to enable access to a room instead of a physical RFID card. Having read a lot of other threads about NFC/RFID & card-emulation, I came to the conclusion it was not available for now in Android but I'm still kinda confused if it apply to this particular case. Can't the application simply send the card ID within a NDEF message or an APDU command or I'm just completely dreaming?

Tol answered 28/11, 2012 at 17:2 Comment(2)
take a look at my answer to this question, it could help you to review a work-around solution.Teryl
Luckily things have changed in the meantime :) If you are targeting 4.4+, you may be interested in this: developer.android.com/guide/topics/connectivity/nfc/hce.htmlLebeau
K
13

Well, strictly speaking. For what you want to do you don't need card emulation. You just need to send a token to the door lock that can be validated.

You could do this with Android beam by pushing an NDEF message to a device that is compatible, SNEP is the protocol you'll be looking for.

A solution I would prefer would be to get the door lock device to emulate a tag. Then you could have your Android app register a listener for that tag (Doesn't even need to be running). When the tag is detected that app will fire up and send your secure token to the lock by using the tag write NFC functions in the Android SDK.

Securing your token is another matter.

Kikelia answered 28/11, 2012 at 20:47 Comment(2)
That's what I got in mind. I'll check if the used reader is compatible. Still, I assume this solution needs some piece of software on the reader side to decode the NDEF message and "interpret" it as it was an actual physical card, am I right?Tol
Yes, most access control systems follow the Wiegand Protocol. Duali make readers compatible with this protocol.Kikelia
V
1

The android view:

Long story short: It's not possible.

Long story long:

It would be possible from a hardware and software point of view to do this. The NFC chips are perfectly capable to emulate most (not all) standard tags. The functionality to do this is even built in the lower level software but not exposed to applications.

Why: Emulating tags is what the entire mobile payment infrastructure is built upon. Allowing two card emulations of the same type at once is for most NFC chips not possible and will also shut off mobile payment as mobile payment readers only accept a single tag at once (for security reasons).

Things are a bit different for RIM based Blackberry phones, they allow card emulations (even have this feature out of the box) but they don't do any mobile payment at the moment as far as I know.

Violence answered 28/11, 2012 at 20:30 Comment(1)
As conor said, I'm actually not sure if it really requires card emulation since the physical card ID is embedded within the application, not somewhere in a secure element or anything.Tol
P
0

This is an aged question but according to Android docs: Host-based card emulation overview it is possible. A quote from the docs

Android 4.4 and higher provide an additional method of card emulation that doesn't involve a secure element, called host-based card emulation. This allows any Android application to emulate a card and talk directly to the NFC reader. This topic describes how host-based card emulation (HCE) works on Android and how you can develop an app that emulates an NFC card using this technique.

Pectinate answered 28/5 at 10:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.