nfctype3: Detect blank tags while reading
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Mon, 20 Aug 2012 15:16:26 +0000 (18:16 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 23 Aug 2012 13:07:28 +0000 (15:07 +0200)
commitbd285ab69e7d96025198fa52558289c4e80579ba
treeb3e16099fc72091010e6bc0e168449e6492c7ce4
parenta495f81dc7cd9a55df9aee03ef2dc882cacb1f77
nfctype3: Detect blank tags while reading

If tag is empty means no NDEF content in tag does not support
system code 0x12FC(in polling). In case of blank tags polling
request response is an error. Finding out tag is blank or not
couple of more steps added before tag reading. Currently it
supports only Felica Lite.
   1) Poll Type-3 tag with 0xFFFF system code.
   2) In response to poll command, tag ID and manufacturer parameter
      will be received. And Manufacturer information contains IC Type
      which is used to identify the tag is Felica Lite, LiteS or other.
   3) Depends upon the tag, read block number 0x88(MC Block) which
      contains memory configuration.
   4) MC contains system code(byte3) related information. If tag is
      blank then it is '0x00', if tag supports NDEF( that means it
      supports system code 0x12FC) then it is '0x01'.
   5) If byte3 is 0x00 then it as 'Blank tag', if it contains 0x01
      then detect ndef(poll with 12FC), read and write.
   6) In case tag is not Felica Lite series then detect ndef
      (poll with 12FC), read and write.
plugins/nfctype3.c