Can an Android NFC phone act as an NFC tag?
Asked Answered
P

12

126

From what I have understood so far, an NFC phone will act as an NFC reader which will read data from an NFC tag. Now my question is, can we switch this around? Can we make an Android NFC phone behave as the tag which an NFC reader will get data from?

Thanks for your assistance.

Peden answered 26/5, 2011 at 11:55 Comment(1)
Use this mobile app play.google.com/store/apps/details?id=com.secodek.nfcemulatorSolorio
T
36

At this time, I would answer "no" or "with difficulty", but that could change over time as the android NFC API evolves.

There are three modes of NFC interaction:

  1. Reader-Writer: The phone reads tags and writes to them. It's not emulating a card instead an NFC reader/writer device. Hence, you can't emulate a tag in this mode.

  2. Peer-to-peer: the phone can read and pass back ndef messages. If the tag reader supports peer-to-peer mode, then the phone could possibly act as a tag. However, I'm not sure if android uses its own protocol on top of the LLCP protocol (NFC logical link protocol), which would then prevent most readers from treating the phone as an nfc tag.

  3. Card-emulation mode: the phone uses a secure element to emulate a smart card or other contactless device. I am not sure if this is launched yet, but could provide promising. However, using the secure element might require the hardware vendor or some other person to verify your app / give it permissions to access the secure element. It's not as simple as creating a regular NFC android app.

More details here: http://www.mail-archive.com/[email protected]/msg152222.html

A real question would be: why are you trying to emulate a simple old nfc tag? Is there some application I'm not thinking of? Usually, you'd want to emulate something like a transit card, access key, or credit card which would require a secure element (I think, but not sure).

Trig answered 26/5, 2011 at 17:15 Comment(8)
Ok. Google just annount google.com/wallet today. In this scenario, wouldn't the phone act as the tag?Peden
As @erich-douglass pointed out above: not necessarily. if the reader terminal is peer-to-peer, it wouldn't need to act as a tag.Glaciate
as above, you can write to a reader from the phone using NDEF push and peer to peer support in android 2.3+, but you need to make sure that the reader code is peer to peer. (needs to be a phone that has an NFC chip obv e.g. Galaxy Nexus, Nexus S.)Brainchild
The problem is that currently most NFC card readers assume passive tags. It's much more complex to support active LLCP exchanges and of course still support passive card reading. It's possible, but I haven't yet heard of a payment option implemented using LLCP...Meingolda
The reason i would want it to act as a tag so that it can be used instead of an access card, etc. For any method of identification.Happygolucky
This is outdated. Android 4.4 has host-based card emulation, which allows precisely this: developer.android.com/guide/topics/connectivity/nfc/hce.htmlForelady
@all, can iPhone be used for Card-emulation mode, so that i can write on it(phone's NFC) and read with another Phone ? I know, iOS supports some external NFC tag(ISO 7816, ISO 15693, FeliCa™, and MIFARE®) to write on, but regarding writing to iPhone itself is unclear.Nesselrode
It's possible with the app I found on Play Store play.google.com/store/apps/details?id=com.secodek.nfcemulatorSolorio
S
19

Can we make an Android NFC as the tag which an NFC reader will get data from?

The Nexus S supports peer-to-peer mode, which as its name implies, causes one phone to act as a tag which another phone can read. There was a really good Google I/O session on NFC this year. I would recommended watching it if you're at all interested in NFC.

Suzannsuzanna answered 26/5, 2011 at 12:26 Comment(4)
Thanks. That makes it clear for me. But can an NFC reader read from the phone?Peden
@jpartogi I'm not completely sure, but I think the reader would have to explicitly support peer-to-peer mode for it to work.Suzannsuzanna
peer-to-peer mode is when BOTH phones or devices act as readers. Information isn't so much as read as it is pushed (written) back and forth.Albanian
@ErichDouglass the video link doesn't work, I think this is the one that you meant youtube.com/watch?v=49L7z3rxz4QColostomy
E
11

Check the Host-based Card Emulation (HCE) NFC mode available in Android 4.4.

API guide: https://developer.android.com/guide/topics/connectivity/nfc/hce.html

Ekaterinoslav answered 13/11, 2013 at 17:26 Comment(0)
R
10

yes you can. Android kitkat boosts of this functionality here

Retract answered 2/11, 2013 at 13:53 Comment(0)
D
6

Its possible to make Android device behave as an NFC Tag. Such a behaviour is called Card Emulation.

  • Card emulation can be host-based(HCE) or secure-element based(CE).
  • In HCE, an application running on the Android main processor responds to the reader. So, the phone needs to be ON.
  • In CE, an applet residing in the Secure element responds to the reader. Here, its sufficient to have the NFC controller powered, with rest of the device suspended.
  • One of these or both approaches can be active simultaneously.
    A routing table instructs the NFC controller where route the Reader's commands to.
Darlinedarling answered 18/9, 2019 at 13:43 Comment(4)
Can provide some reference or use cases?Termination
Are there any known Android apps available for this? To read an access card and then emulate it from the phone itself?Allium
@Allium yes there are available such apps for android. Take a look at this one: play.google.com/store/apps/…Loreleilorelie
@Allium a There is no single app to read an access card and then emulate the same card from the phone itself.Darlinedarling
N
3

Yes, take a look at NDEF Push in NFCManager - with Android 4 you can now even create the NDEFMessage to push to the active device at the time the interaction takes place.

Narial answered 23/11, 2011 at 10:8 Comment(1)
This is p2p mode isn't it? Not NFC forum mandated tag emulation.Knapsack
P
3

Read here: http://groups.google.com/group/android-developers/browse_thread/thread/d5fc35a9f16aa467/dec4843abd73d9e9%3Flnk%3Dgst%26q%3Dsecure%2Belement%2Bdiff%2527s%23dec4843abd73d9e9?pli=1

I've not verified that myself but it looks like people managed to include the hidden code into Android again. They seem to be able to emulate a Mifare Classic card (iso-14443). I'll soon test this myself, it looks very interesting.

If you want to do it for a commercial/free app you'll have a hard time, your users won't like to change their kernel to support your app.

Update: There would be a simple trick to make your phone emulate a ticket:
You can get a NFC-sticker and put it in or on the phone. This way you are able to read and write it at all times and other devices can also read and write it.
It's just an idea I had, never seen that used anywhere of course ;)

Peterman answered 5/2, 2012 at 14:9 Comment(1)
We have tried the trick with NFC tag emulation on iPhone with iCarte. It might work... but we decided to cancel it, since that is really unusable...Knapsack
P
2

In the google io session about NFC, qa section. There was such a question:

card emulation? No API support for card emulation No consistent user experience when doing card emulation and no compelling story

Paba answered 18/1, 2012 at 4:51 Comment(1)
Bu again - the reason the card emulation is 'not allowed' is that usually secure element needs to be used, but for NFC tags have no security (in fact they CANNOT have any). This eliminates the secure element need and it might be possible to emulate it via application code.Knapsack
W
1

If you mean getting a powered NFC device to pretend to be a passive one (eg a tag).. not sure how well it works but the android app NFCClassic purports to record tag contents and then allow the tag to be activated and appear to be the copied tag to NFC readers. Creates a library of recorded tags.

Whipple answered 26/5, 2011 at 12:49 Comment(0)
G
0

No, not at the moment. Google pointed out at the Google IO 2011, that card emulation is not supported and won't be supported for a while. Main (and easy to understand) problem: Which App should get the right on the phone to emulate a smartcard?

Glaciate answered 27/9, 2011 at 13:52 Comment(1)
The right way to do is to have the possibility for the IC to accept Info from each info at request ...Palladous
B
0

You can definitely make an Android phone write to a tag reader using the NDEFPush functionality in the peer-to-peer support - but you will need to write the code on the tag reader side to use peer-to-peer as well (llcp).

Brainchild answered 31/1, 2012 at 13:10 Comment(0)
M
-1

Yes you can which is Peer-To-Peer Mode

Peer-To-Peer Mode


Bidirectional P2P connection to exchange data between devices

–Proximity triggered interactions

–Nexus S: Devices have to be placed back-to-back

Example of Applications

–Exchange of vCards

–Hand-over of Tickets & P2P Payment

–Web-page sharing, Youtube-video-sharing

–Application sharing

Molecular answered 24/4, 2014 at 12:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.