<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20069/determine-the-end-of-an-nfc-write</link><description>Is there a way to determine the end of an NFC write besides waiting for the NFC_T4T_EVENT_FIELD_OFF event? We want to update the NDEF message from within firmware after data is written but before the NFC_T4T_EVENT_FIELD_OFF event fires. We tried doing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2017 11:15:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20069/determine-the-end-of-an-nfc-write" /><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78125?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 11:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c55ce61a-5fe9-4645-94a2-0ce7cebede48</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Good that your workaround seems to work.&lt;/p&gt;
&lt;p&gt;The only issue I can see with using &lt;code&gt;NFC_T4T_EVENT_NDEF_UPDATED&lt;/code&gt; is that  &lt;code&gt;UpdateNdefMessage&lt;/code&gt; might take long to execute and thus prevent from sending R-APDU  (response to &lt;strong&gt;UpdateBinary&lt;/strong&gt;)  in time. This is because the callback for &lt;code&gt;NFC_T4T_EVENT_NDEF_UPDATED&lt;/code&gt; event is called before sending the proper R-APDU. Other than that, I can&amp;#39;t see why updating the NDEF content like you did originally, would not work, maybe some sniffer log could tell us more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78124?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 20:10:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12493d15-c125-4362-856f-51fcf95ea63d</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;We came up with a work-around.  We configured a hardware timer to fire its interrupt a few milliseconds after the last &lt;code&gt;NFC_T4T_EVENT_NDEF_UPDATED&lt;/code&gt; event, and do all of the NDEF reconfiguration in there.  That solved our problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78126?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 16:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0134404b-bb6d-4a09-992b-479ff20aae3b</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;It&amp;#39;s consistent across phones.  The NFC Tools doesn&amp;#39;t read back the newly written content because the &lt;code&gt;UpdateNdefMessage&lt;/code&gt; function writes over the NDEF buffer within the NFC Type 4 library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78127?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 15:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9bd69b7-ed86-4525-a782-c3d667d3f7f8</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Then to me it looks OK on the nRF52 side. Regarding the phone side - is the error reported consistently on different phones? We have seen some variation between different phones, but generally NFC Tools seemed stable. Can the NFC Tools read back the newly written content even if reported an error on the Write operation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78123?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 14:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e36951f-02d2-474b-8707-51d94f1d0062</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;The NDEF content is set as Read/Write.  We get 2 &lt;code&gt;NFC_T4T_EVENT_NDEF_UPDATED&lt;/code&gt; events every time we write.  The &lt;code&gt;data_length&lt;/code&gt; parameter is 0 on the first write, and is the written NDEF message length on the second write.  The write operation is successful on the nRF52.  However, the application side (we&amp;#39;re using NFC Tools on Android phones) reports back with a generic write error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78122?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 14:50:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b104c5c-3981-468c-9756-f15121f5a9fe</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Let me add a couple of details regarding the &lt;code&gt;NFC_T4T_EVENT_NDEF_UPDATED&lt;/code&gt; event:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;it will only be triggered if the NDEF content was set as Read/Write i.e. using &lt;code&gt;nfc_t4t_ndef_rwpayload_set&lt;/code&gt; - is it how you set it in your application?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;the event is triggered each time the &lt;strong&gt;UPDATE_BINARY&lt;/strong&gt; APDU is received with offset &amp;lt;= 1 (NLEN field)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally, do you get any &lt;code&gt;NFC_T4T_EVENT_NDEF_UPDATED&lt;/code&gt; event, e.g. when the Reader/Writer (PCD) clears the NLEN field? For short messages, some PCD could write NLEN together with the rest of the NDEF content (as part of a single &lt;strong&gt;UPDATE_BINARY&lt;/strong&gt; Command APDU)&lt;/p&gt;
&lt;p&gt;Also, is the write operation successful at all?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78129?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2017 20:40:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43865f63-fe82-42b9-9c7a-514e93968f0e</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;Unfortunately, neither one of those options work.  The RXFRAMEEND event gets fired multiple times during a write, as does HAL_NFC_DATA_RECEIVED, and waiting for the last event (either one) doesn&amp;#39;t work.  I think what we&amp;#39;ll have to do is start a timer on the last &lt;code&gt;NFC_T4T_EVENT_UPDATED&lt;/code&gt; event, and update the NDEF record some timer after that last event.  It&amp;#39;s not a great solution, but it&amp;#39;s a solution...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determine the end of an NFC Write?</title><link>https://devzone.nordicsemi.com/thread/78128?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2017 09:10:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3545d8f4-8d7c-45f5-9ae3-58a6eef17e69</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Perhaps it is possible to use the event &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fnfc.html&amp;amp;cp=2_2_0_41_11&amp;amp;anchor=topic"&gt;EVENTS_RXFRAMEEND&lt;/a&gt; directly from the NFCT peripheral or the event &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.2.0%2Fgroup__nfc__t2t__hal.html&amp;amp;cp=4_0_1_6_5_0_0_2_6&amp;amp;anchor=ggaa4e59db07c8f09400363725a6783fa38a0ad04629addbd7caded5cd137bf6cc19"&gt;HAL_NFC_DATA_RECEIVED&lt;/a&gt;? I have not tested it, but it could be worth a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>