3

I have an NFC receiver / sender (depends on how configured)...I want to use it as an NFC receiver and when the customer holds his phone to it (I am going for Android for now), It needs to get some sort of response.

As Android has 'Android Beam', which detects when 2 phones are near each other, I would have expected for the NFC reader to pick up at least SOMETHING. But it doesn't, when I hold my phone to the antenna, no data is received by the NFC receiver.

I have been Googling a lot for examples, but what I find is how to implement NFC communications in Android. But ideally, I don't want to implement an app. I just needs some sort of unique ID from the device to be send out to the NFC receiver.

Does anyone have an idea how come I do not receive anything, while when I put 2 Android phones together, Android beam works perfectly?

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
Boy
  • 7,010
  • 4
  • 54
  • 68
  • Presumably your NFC receiver/sender isn't using Android Beam, which is a very specific capability. You can read up on the rest of Android's NFC programming APIs at https://developer.android.com/guide/topics/connectivity/nfc/index.html "But ideally, I don't want to implement an app" -- StackOverflow is for programming questions. – CommonsWare Apr 13 '14 at 11:03
  • Yes, Stackoverflow is for programming questions, but actually I am programming, but then the embedded software that is using the NFC receiver. Indeed it isn't using Android Beam, but in any case, I would expect to see SOME communication, right? How else does Beam know if a phone is nearby... – Boy Apr 13 '14 at 13:58
  • "I would expect to see SOME communication, right?" -- not knowing what your NFC receiver does, I cannot answer that. Moreover, Android Beam is not on continuously anyway, but only when somebody explicitly does something in an app to beam something. – CommonsWare Apr 13 '14 at 14:29
  • yes, but when I put two phones together, the apps detect this, so this needs to be triggered somehow. Hmm, maybe I will need to make an app to show the customer that he does need an app for this...And as an Android developer, I won't mind supplying it ;) – Boy Apr 15 '14 at 05:22
  • Hey, I found an topic that actually asks the same. I'm going to use that one as a start now. I see I need to implement some protocols on the NFC device side...http://stackoverflow.com/questions/10813483/is-it-possible-to-use-android-beam-between-an-android-device-and-another-nfc-dev – Boy Apr 15 '14 at 05:26

1 Answers1

2

By default, an Android device will cyclically check if there is another peer-to-peer device, an NFC tag (or actually any contactless transponder with a supported protocol) or another ISO 14443 reader (this will typically only be available on some 4.4 devices and on devices with activated secure element) available.

So, if your NFC reader is active in peer-to-peer mode or card emulation mode, it should pick up some communication:

  1. In peer-to-peer mode, the Android device will at least activate the NFC lick up to the NFC Forum LLCP protocol.
  2. In reader/writer mode (i.e. when your NFC device is in card emulation mode), the Android device should try to activate the emulated card and check for availability of NDEF data.

Nevertheless, none of this will provide you any (somewhat) unique identification of the device unless you have an app providing this functionality on the device. In reader/writer mode, an Android device will not reveal any data usable for identification (you may be able to identify the NFC chipset and the Android version though). In peer-to-peer mode, an Android device does not reveal any useful data either. The ID's that are exchanged during activation of the communication channel must be random as per the NFC standard (ISO/IEC 18092). Still, as with R/W mode, you may be able to identify the NFC chipset, the Android version and for some devices even the device manufacturer.

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
  • Thanks for you most complete answer I have had till now! I am not convinced the NFC module we are using it capable of what we want it to do. The documentation is lacking. Contacting the manufacturer at the moment to get any examples of how they tested the module – Boy Apr 19 '14 at 07:59