How Android Survey for NFC Devices

I work with a contactless reader to communicate with my Android device.

I noticed that at any given time, I cannot connect to my Android device using P2P. If I want to connect to initiating an Android Beam transfer, I must constantly try to connect to the device several times in one second period.

An Android NFC device can detect proximity cards, NFC P2P targets, and NFC P2P initiators, i.e. 3 different modes. I'm starting to think that behind the scenes there is some kind of poll that quickly switches between the three modes.

This means that at any time when I try to connect to the phone, it may or may not be in the correct mode and it will work. This is why I need to make some connections.

I was looking for an Android source to try to figure this out without real luck. here is the most promising file I've seen, but it still doesn't make sense.

My question is: how does Android detect several NFC modes, does it use a switching algorithm, and if so, what is the specificity of the algorithm?

Thanks.

+6
source share
1 answer

I'm starting to think that there is some kind of poll taking place behind the scenes that switches between the three modes very quickly.

This is exactly what is happening. Various technologies receive time multiplexing. However, this is much more than three modes. Typically, an NFC device will be polled for:

  • Reader ISO14443 A
  • Reader ISO14443 B
  • Reader FeliCa (also known as tag type 3)
  • Reader ISO15693
  • ISO14443 A card emulation
  • ISO14443 B card emulation
  • Felica Card Emulation

Peer-to-peer network mode uses Reader A, Reader FeliCa as the initiator. Card A emulation and Felica card emulation are also used as Peer-to-Peer Target technology.

The exact polling time is not publicly available, and you will not find much in this source code. It is handled by an NFC chip inside.

+5
source

Source: https://habr.com/ru/post/950092/


All Articles