<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TAG Emulation: Communication with NFC TagInfo in NFC</title>
    <link>https://community.nxp.com/t5/NFC/TAG-Emulation-Communication-with-NFC-TagInfo/m-p/2062521#M12871</link>
    <description>&lt;P&gt;We want to use e.g. NTAG215 for our application. To facilitate debugging,&amp;nbsp;I want to emulate such TAG on my iPhone.&lt;/P&gt;&lt;P&gt;• We got the HCE entitlement from Apple, thus may use the emulation API (CardSession).&lt;/P&gt;&lt;P&gt;• I implemented&amp;nbsp;the flow of Appendix E "Example of Mapping Version 2.0 Command Flow" in the NFC Forum specification.&lt;/P&gt;&lt;P&gt;• I can successfully emulate a TAG with e.g. a URL (&lt;A href="https://apple.com" target="_blank"&gt;https://apple.com&lt;/A&gt;) from my iPhone to another iPhone (with the built-in background NFC reader), which will then open that website, as if it scanned a real NTAG215.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try an Android as reader, neither the built-in background NFC reader nor NXP TagInfo can read my emulated TAG.&lt;/P&gt;&lt;P&gt;So I tried running TagInfo on my reader iPhone, and that also doesn't succeed reading my emulated TAG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the log from my emulation when it successfully transfers the URL to another iPhone (background NFC reader):&lt;/P&gt;&lt;P&gt;readerDetected&lt;BR /&gt;incoming commandApdu: 00a4040007d276000085010100&lt;BR /&gt;APDU_SELECT triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00a4000c02e103&lt;BR /&gt;CAPABILITY_CONTAINER_OK triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00b000000f&lt;BR /&gt;READ_CAPABILITY_CONTAINER triggered. Our Response: READ_CAPABILITY_CONTAINER_RESPONSE&lt;BR /&gt;sending back data: 001120ffffffff0406e104fffe00ff9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00a4000c02e104&lt;BR /&gt;NDEF_SELECT_OK triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00b0000002&lt;BR /&gt;NDEF_READ_BINARY_NLEN triggered. Our Response: length + A_OKAY&lt;BR /&gt;sending back data: 00169000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00b0000216&lt;BR /&gt;NDEF_READ_BINARY triggered. Our Response: data + A_OKAY&lt;BR /&gt;sending back data: d10112550068747470733a2f2f6170706c652e636f6d9000&lt;/P&gt;&lt;P&gt;readerDeselected. cardSession.stopEmulation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the log when the reader iPhone is running TagInfo:&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00a4040007d276000085010100&lt;BR /&gt;APDU_SELECT triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 9060000000&lt;BR /&gt;GET_VERSION triggered. Our Response: GET_VERSION_RESPONSE&lt;BR /&gt;sending back data: 000401010101010e039000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 90af000000&lt;BR /&gt;MORE_INFO triggered. Our Response: APPLICATION_ERROR&lt;BR /&gt;sending back data: 6a88&lt;/P&gt;&lt;P&gt;incoming commandApdu: 90af000000&lt;BR /&gt;MORE_INFO triggered. Our Response: APPLICATION_ERROR&lt;BR /&gt;sending back data: 6a88&lt;/P&gt;&lt;P&gt;readerDeselected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, instead of querying CAPABILITY_CONTAINER_OK, or&amp;nbsp;READ_CAPABILITY_CONTAINER, TagInfo starts with asking&amp;nbsp;GET_VERSION (which is not in the "Mapping Version 2.0 Command Flow") followed by&amp;nbsp;MORE_INFO, to what I have no answer.&lt;/P&gt;&lt;P&gt;TagInfo didn't like my responses, and stopped reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) What should I reply to&amp;nbsp;GET_VERSION?&lt;/P&gt;&lt;P&gt;My current response is:&lt;/P&gt;&lt;P&gt;GET_VERSION_RESPONSE: {&lt;BR /&gt;0x00, // fixed header&lt;BR /&gt;0x04, // vendor ID (04 = NXP Semiconductors)&lt;BR /&gt;0x01, // product type&lt;BR /&gt;0x01, 0x01, // product subtype&lt;BR /&gt;0x01, // major product version&lt;BR /&gt;0x01, // minor product version&lt;BR /&gt;0x0E, // storage size&lt;BR /&gt;0x03, // protocol type: ISO/IEC 14443-3 compliant&lt;BR /&gt;0x90, 0x00, // A_OKAY&lt;BR /&gt;} //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) What&amp;nbsp;should I reply to MORE_INFO?&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;A_ERROR: {&lt;BR /&gt;0x6A, // SW1 Status byte 1 - Command processing status&lt;BR /&gt;0x82, // SW2 Status byte 2 - Command processing qualifier&lt;BR /&gt;} // 6A82 = File not found&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;APPLICATION_ERROR: {&lt;BR /&gt;0x6A, // SW1 Status byte 1 - Command processing status&lt;BR /&gt;0x88, // SW2 Status byte 2 - Command processing qualifier&lt;BR /&gt;} // 6A88 = no application ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for answers,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Mar 2025 08:33:13 GMT</pubDate>
    <dc:creator>MarcSt</dc:creator>
    <dc:date>2025-03-16T08:33:13Z</dc:date>
    <item>
      <title>TAG Emulation: Communication with NFC TagInfo</title>
      <link>https://community.nxp.com/t5/NFC/TAG-Emulation-Communication-with-NFC-TagInfo/m-p/2062521#M12871</link>
      <description>&lt;P&gt;We want to use e.g. NTAG215 for our application. To facilitate debugging,&amp;nbsp;I want to emulate such TAG on my iPhone.&lt;/P&gt;&lt;P&gt;• We got the HCE entitlement from Apple, thus may use the emulation API (CardSession).&lt;/P&gt;&lt;P&gt;• I implemented&amp;nbsp;the flow of Appendix E "Example of Mapping Version 2.0 Command Flow" in the NFC Forum specification.&lt;/P&gt;&lt;P&gt;• I can successfully emulate a TAG with e.g. a URL (&lt;A href="https://apple.com" target="_blank"&gt;https://apple.com&lt;/A&gt;) from my iPhone to another iPhone (with the built-in background NFC reader), which will then open that website, as if it scanned a real NTAG215.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try an Android as reader, neither the built-in background NFC reader nor NXP TagInfo can read my emulated TAG.&lt;/P&gt;&lt;P&gt;So I tried running TagInfo on my reader iPhone, and that also doesn't succeed reading my emulated TAG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the log from my emulation when it successfully transfers the URL to another iPhone (background NFC reader):&lt;/P&gt;&lt;P&gt;readerDetected&lt;BR /&gt;incoming commandApdu: 00a4040007d276000085010100&lt;BR /&gt;APDU_SELECT triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00a4000c02e103&lt;BR /&gt;CAPABILITY_CONTAINER_OK triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00b000000f&lt;BR /&gt;READ_CAPABILITY_CONTAINER triggered. Our Response: READ_CAPABILITY_CONTAINER_RESPONSE&lt;BR /&gt;sending back data: 001120ffffffff0406e104fffe00ff9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00a4000c02e104&lt;BR /&gt;NDEF_SELECT_OK triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00b0000002&lt;BR /&gt;NDEF_READ_BINARY_NLEN triggered. Our Response: length + A_OKAY&lt;BR /&gt;sending back data: 00169000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00b0000216&lt;BR /&gt;NDEF_READ_BINARY triggered. Our Response: data + A_OKAY&lt;BR /&gt;sending back data: d10112550068747470733a2f2f6170706c652e636f6d9000&lt;/P&gt;&lt;P&gt;readerDeselected. cardSession.stopEmulation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the log when the reader iPhone is running TagInfo:&lt;/P&gt;&lt;P&gt;incoming commandApdu: 00a4040007d276000085010100&lt;BR /&gt;APDU_SELECT triggered. Our Response: A_OKAY&lt;BR /&gt;sending back data: 9000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 9060000000&lt;BR /&gt;GET_VERSION triggered. Our Response: GET_VERSION_RESPONSE&lt;BR /&gt;sending back data: 000401010101010e039000&lt;/P&gt;&lt;P&gt;incoming commandApdu: 90af000000&lt;BR /&gt;MORE_INFO triggered. Our Response: APPLICATION_ERROR&lt;BR /&gt;sending back data: 6a88&lt;/P&gt;&lt;P&gt;incoming commandApdu: 90af000000&lt;BR /&gt;MORE_INFO triggered. Our Response: APPLICATION_ERROR&lt;BR /&gt;sending back data: 6a88&lt;/P&gt;&lt;P&gt;readerDeselected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, instead of querying CAPABILITY_CONTAINER_OK, or&amp;nbsp;READ_CAPABILITY_CONTAINER, TagInfo starts with asking&amp;nbsp;GET_VERSION (which is not in the "Mapping Version 2.0 Command Flow") followed by&amp;nbsp;MORE_INFO, to what I have no answer.&lt;/P&gt;&lt;P&gt;TagInfo didn't like my responses, and stopped reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) What should I reply to&amp;nbsp;GET_VERSION?&lt;/P&gt;&lt;P&gt;My current response is:&lt;/P&gt;&lt;P&gt;GET_VERSION_RESPONSE: {&lt;BR /&gt;0x00, // fixed header&lt;BR /&gt;0x04, // vendor ID (04 = NXP Semiconductors)&lt;BR /&gt;0x01, // product type&lt;BR /&gt;0x01, 0x01, // product subtype&lt;BR /&gt;0x01, // major product version&lt;BR /&gt;0x01, // minor product version&lt;BR /&gt;0x0E, // storage size&lt;BR /&gt;0x03, // protocol type: ISO/IEC 14443-3 compliant&lt;BR /&gt;0x90, 0x00, // A_OKAY&lt;BR /&gt;} //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) What&amp;nbsp;should I reply to MORE_INFO?&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;A_ERROR: {&lt;BR /&gt;0x6A, // SW1 Status byte 1 - Command processing status&lt;BR /&gt;0x82, // SW2 Status byte 2 - Command processing qualifier&lt;BR /&gt;} // 6A82 = File not found&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;APPLICATION_ERROR: {&lt;BR /&gt;0x6A, // SW1 Status byte 1 - Command processing status&lt;BR /&gt;0x88, // SW2 Status byte 2 - Command processing qualifier&lt;BR /&gt;} // 6A88 = no application ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for answers,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Mar 2025 08:33:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/TAG-Emulation-Communication-with-NFC-TagInfo/m-p/2062521#M12871</guid>
      <dc:creator>MarcSt</dc:creator>
      <dc:date>2025-03-16T08:33:13Z</dc:date>
    </item>
  </channel>
</rss>

