<?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>payload len on received topics via MQTTSN and Thread</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67967/payload-len-on-received-topics-via-mqttsn-and-thread</link><description>HI, 
 I am trying to read the payload length of the data coming in a topic via MQTTSN over OpenThread. In the event handler, I am getting the event and trying to get the length from it: 
 
 void mqttsn_evt_handler ( mqttsn_client_t * p_client , mqttsn_event_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Nov 2020 12:47:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67967/payload-len-on-received-topics-via-mqttsn-and-thread" /><item><title>RE: payload len on received topics via MQTTSN and Thread</title><link>https://devzone.nordicsemi.com/thread/278775?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 12:47:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa361afa-e5b0-4324-b128-6ffb477d6106</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I have reported it internally. Unfortunately, there is no ways to provide pull requests for the nRF5 SDKs, this is only possible for nRF Connect SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: payload len on received topics via MQTTSN and Thread</title><link>https://devzone.nordicsemi.com/thread/278688?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 22:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b17d50b5-c4d5-4e38-b65a-83035a3191a1</guid><dc:creator>EdgarGrimberg</dc:creator><description>&lt;p&gt;Thanks J&amp;oslash;rgen!&lt;/p&gt;
&lt;p&gt;Is there a place to make a pull request, or you&amp;#39;re going to take care of it on the next release?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Edgar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: payload len on received topics via MQTTSN and Thread</title><link>https://devzone.nordicsemi.com/thread/278626?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 14:16:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce46a4ba-f028-44f7-8085-e942eeecc8c3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems&amp;nbsp;like the payload length is not assigned to the member of the structure passed to the MQTT-SN event handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can forward the payload length from function publish_handle() in mqttsn_packet_receiver.c by adding the following after line 442:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;evt.event_data.published.packet.len   = payload_len;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This should be the message payload length, and not the full packet length.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>