Il giorno giovedì 24 gennaio 2013 18:48:20 UTC+1, Michael Roland ha scritto: > > Hi Eliseo, > > > What I want to do is to use the UID received from the phone to > read/write > > the tag emulated on the phone. Another application possible is to use > the > > phone in access control applications, but a fixed UID is necessary. The > UID > > is random for security reasons? How Card Emulation can be used if the > UID is > > random? > > Typically, if you receive a random UID from the NFC phone you detected the > phone's peer-to-peer mode (i.e. the phone listening in passive mode at > 106kbps) or -- if the phone supports it -- software card emulation mode. If > it's peer-to-peer mode, the random UID (btw. the first byte of a random UID > is 0x08, except for some weird cards from NXP ;-) ) is actually an NFCID1. > Most secure elements on the other hand provide a static UID. (At least the > one that is embedded into the Nexus S/Galaxy Nexus/Galaxy SIII). > > You can determine if the detected target supports peer-to-peer mode or if > it is in card emulation mode by the value of the SAK byte (in ISO 14443 > language or SEL_RES in ISO 18092 language). > If the bits of SAK are numbered from 7 downto 0 and bit 2 = 0: > - Bit 6 = 1 denotes that the target supports NFC-DEP (i.e. peer-to-peer > mode as defined in ISO 18092). > - Bit 5 = 1 denotes that the target supports ISO-DEP (i.e. the smartcard > transport protocol from ISO 14443-4). > If none of those two bits is set then the target supports only some > proprietary protocol. > > So if you detected that it's peer-to-peer mode, then there is NO tag to > read/write from. However, you could use some library like ismb-snep-java to > exchange data through Android Beam. > > Regarding fixed UIDs with Android NFC phones: At least phones based on the > NXP chipset (i.e. PN544) can only have a fixed UID in combination with a > secure element that has a fixed UID. For software card emulation mode, the > NFC controller will always use a random UID. > > br, > Michael > > Thank you Michael ! so Nexus S, Galaxy Nexus and Galaxy S III have a fixed UID? it is due to the NFC NXP controller or to the secure element? Which secure element they have? In a previous post, Nikolay say that "You can't fix the UID, at least not with any of the standard NXP controllers.". Is it correct? the fixed UID depends of the SE present on the phone? In case of random UID, what kind of SE is present? Which android phones can do software card emulation? is it made by the OS or by one custom application? br, Eliseo
-- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

