android - Get Static NFC Tag Id with HCE mode -


i'm new in nfc thing, tested several phones calling gettagid() method in hce mode, , result:

device       | uid lg g2        | random lg g3        | static s4           | random htc 1 mini | static xiaomi mi3   | static 

my questions:

  1. why phones have static uid , not? chipset related?
  2. is possible fixed uid? need authenticate device.
  3. on other side, i'm using kitkat cyanogenmod 11 on xperia m, did not manage use hce, why?

any documents can explain/support answer?

why phones have static uid , not? chipset related?

that depends on chipset , implementation of nfc stack. far i'm aware of, there 3 different scenarios used various android nfc devices:

  • the device has secure element , uses static uid of secure element.
  • the device generates new random uid whenever turned on.
  • the device generates new random uid on every activation external reader device. i.e. whenever external hf field applied nfc antenna of android device.
  • the device has no secure element still uses static uid (typically not unique), e.g. 0x01020304. [thanks erikm pointing out.]

is possible fixed uid?

typically, can't influence this. without modifying android device firmware (changes nfc stack) it's not possible. see this answer method set uid value on broadcom chipsets through modifying libnfc-nci library.

i need authenticate device.

don't this! see this answer more information on that.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -