<?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>MQTT-SN Old data hangs in the buffer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72735/mqtt-sn-old-data-hangs-in-the-buffer</link><description>My problem is with examples of publishing and subscribing at the same time. I crossed them by adding a check for subscription if I did not sign I do this and register the topic id 
 
 1. When I try to send a message from the MQTT client to the sensor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Mar 2021 14:23:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72735/mqtt-sn-old-data-hangs-in-the-buffer" /><item><title>RE: MQTT-SN Old data hangs in the buffer</title><link>https://devzone.nordicsemi.com/thread/299834?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 14:23:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abd975f7-cb4d-41a5-a0dd-741e5c573f09</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I recommend you do one of the following things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Only print as much characters as you have received with the message. The data length of the frame is available at receiving time.&lt;/li&gt;
&lt;li&gt;Separate your messages in the buffer using a null-terminated string &lt;em&gt;&amp;#39;\0&amp;#39;&lt;/em&gt;.&amp;nbsp;A print-function will only print characters until the first null terminator.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>