<?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>Reading NFC record under 4 chars causes weird issues.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80847/reading-nfc-record-under-4-chars-causes-weird-issues</link><description>Hi There, I&amp;#39;m trying to read the NDEF records stored on my NRF52 DK but I&amp;#39;m having some issues when the the NDEF record payload is less than 4 chars. I just get random symbols or large buffer values instead (See terminal output): Code: 
 
 
 Terminal</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Oct 2021 13:47:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80847/reading-nfc-record-under-4-chars-causes-weird-issues" /><item><title>RE: Reading NFC record under 4 chars causes weird issues.</title><link>https://devzone.nordicsemi.com/thread/336006?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 13:47:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ef88e04-ca48-4baa-bc78-3b073985e54b</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It shouldn&amp;#39;t be necessary to remove the header by subtracting 3 as payload_desc-&amp;gt;payload_length variable contains the actual payload length without the header. You also don&amp;#39;t need to add 3 for original_message pointer as it already points at the start of the payload.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The SDK parsing functions should parse it correctly regardless if &amp;quot;record length&amp;quot; field is 4-byte or 1-byte record.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading NFC record under 4 chars causes weird issues.</title><link>https://devzone.nordicsemi.com/thread/335509?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 13:47:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37b9fb3f-9c79-4e62-9900-6d59ae591549</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;I have to discuss this with our developers.&lt;/p&gt;
&lt;p&gt;I will be back with more sometime next week.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading NFC record under 4 chars causes weird issues.</title><link>https://devzone.nordicsemi.com/thread/335120?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 13:19:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a57b015-80c4-4d1e-be70-5649bd777cee</guid><dc:creator>NathHorrigan</dc:creator><description>&lt;p&gt;This is what it looks like for the first two. To me it all looks okay?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/CleanShot-2021_2D00_10_2D00_20-at-14.18.36_4000_2x.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/CleanShot-2021_2D00_10_2D00_20-at-14.18.46_4000_2x.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading NFC record under 4 chars causes weird issues.</title><link>https://devzone.nordicsemi.com/thread/335115?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 13:03:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42ca7794-9cf1-4ca9-ac00-14d0836514d9</guid><dc:creator>NathHorrigan</dc:creator><description>&lt;p&gt;Hi Jared!&lt;br /&gt;&lt;br /&gt;FYI I use VSCode but here is the payload:&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/CleanShot-2021_2D00_10_2D00_20-at-14.03.10_4000_2x.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading NFC record under 4 chars causes weird issues.</title><link>https://devzone.nordicsemi.com/thread/335112?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 12:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c37eddf2-6427-4948-a914-a0f7c9c92c64</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you use the debugger and set a breakpoint in line 29 before you format the payload, and add &lt;span&gt;payload_desc-&amp;gt;payload to &amp;quot;watch&amp;quot; in SES&lt;/span&gt;. How does&amp;nbsp;payload_desc-&amp;gt;payload look like in debug view for the &amp;quot;A&amp;quot; case? Can you see the header + the whole payload?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>