<?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>Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66271/thread-mqtt-sn-example-publish-and-subscribe-can-not-combine-operations</link><description>Hi Nordic Team: 
 
 1. I use this example &amp;quot; Thread MQTT-SN Example &amp;quot;. 
 after i compile the code than i do the step below 
 1.Build the example according to the instructions in Building examples. 2.Turn the MQTT-SN gateway on according to the instructions</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Jul 2021 13:09:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66271/thread-mqtt-sn-example-publish-and-subscribe-can-not-combine-operations" /><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/320918?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 13:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b7e5c24-dd04-4d16-83f4-1651270dbbe0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Please post your second issue in a new ticket, as it does not seem related to the topic of this thread. Then we will help you out and look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/319657?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 15:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd42deb7-df04-48b0-a4b4-98a244deca79</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I think that is only required to change it if you modify the Mesh-Local Prefix for the network. If you use the default in the precommissioned examples (fdde:ad00:beef), it should work without modifications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/272459?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 09:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cac7d14c-1fac-4d8b-9755-845733ae2efa</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Rick"]but it still will display &amp;quot;message could not be processed&amp;quot; error.[/quote]
&lt;p&gt;Yes, since the GW search uses a broadcast address, this message will be received by all nodes. You can suppress the message by handling the event in message_handle in mqttsn_packet_receiver.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case MQTTSN_SEARCHGW:
    NRF_LOG_INFO(&amp;quot;Another Thread device searched for MQTT-SN GW, ignore and return success&amp;quot;);
    err_code = NRF_SUCCESS;
    break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This message type is sent by the client, and should only need to be handled by the gateway.&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><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/271621?ContentTypeID=1</link><pubDate>Sat, 26 Sep 2020 02:02:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65c3f286-e601-490c-966b-ce6d68879f52</guid><dc:creator>Rick</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi J&amp;oslash;rgen,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your help!&lt;/p&gt;
&lt;p&gt;I can work of MQTT from your example.&lt;/p&gt;
&lt;p&gt;but it still will display &amp;quot;message could not be processed&amp;quot; error.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Rick.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/271152?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 15:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6569eacf-2a35-42f7-8368-6192a04a0553</guid><dc:creator>Rick</dc:creator><description>&lt;p&gt;Hi J&amp;oslash;rgen,&lt;br /&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;1. Can this combined example support two devices at the same time?&lt;br /&gt;If using only one device, it can work, but using two devices, it will display &amp;quot;message could not be processed&amp;quot; error.&lt;br /&gt;this is my step.&lt;br /&gt;a) device A subscribe to the topic of device B publish&lt;br /&gt;b) device B subscribe to the topic of device A publish&lt;br /&gt;c) device A Press button 2 to search for GW.&lt;br /&gt;d) device B Press button 2 to search for GW.&lt;br /&gt;e) device A will display &amp;quot;message could not be processed&amp;quot; error&lt;br /&gt;Pls kindly help advise how to solve it?&lt;/p&gt;
&lt;p&gt;2. you say &amp;quot;I tested this on my end, and I am seeing the same behavior. I believe that the unhandled event message happens because the second board is in a state where it does not expect to receive this event when the first board does a Gateway search. The examples are most likely not written with multiple publishers in mind.&amp;quot; from &amp;quot;Thread Border Router networking fail&amp;quot;, now I just search for GW, it display &amp;quot;message could not be processed&amp;quot; error.&lt;br /&gt;Pls kindly help advise how to solve it?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Rick.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/271146?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 14:52:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8615a2bd-bc5d-437b-a60b-79ad4ac2692c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Here is a combined example that supports both publishing and subscribing to topics (modified in mqttsn_client_subscriber).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Press button 2 to search for GW.&lt;/li&gt;
&lt;li&gt;Press button 3 to connect to the GW.&lt;/li&gt;
&lt;li&gt;Press button 4 to subscribe to the topic.&lt;/li&gt;
&lt;li&gt;Press button 1 to publish to the topic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-37cb78ddbbe94fcb83195179e7a1e6a2/main.c"&gt;devzone.nordicsemi.com/.../main.c&lt;/a&gt;&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><item><title>RE: Thread MQTT-SN Example publish and subscribe can not combine operations</title><link>https://devzone.nordicsemi.com/thread/271142?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 14:40:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a0e586a-e96b-40be-a425-fe930326e3d0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tested with one subscriber and one publisher client, and followed the steps in the example. This works well and I&amp;#39;m able to subscribe to topics on one of the devices and publish from another device. I&amp;#39;m still seeing the &amp;quot;message could not be processed&amp;quot; error, but this does not affect the functionality.&lt;/p&gt;
&lt;p&gt;The example is only written for a single publisher and subscriber.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will look into if it is possible to merge the publisher and subscriber examples to run on a single board.&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>