<?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>nrf52840 CLI UDP mqtt-sn commands</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42308/nrf52840-cli-udp-mqtt-sn-commands</link><description>Hello! 
 My name is Tiago Morais. I&amp;#39;ve started to work with nrf52840 and now I&amp;#39;m having some problems with its CLI. 
 I&amp;#39;m trying to use the nrf52840 dk with openthread and mqtt-sn the examples work fine, but actually I don&amp;#39;t want to keep the mqtt-sn client</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 19 Jan 2019 17:40:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42308/nrf52840-cli-udp-mqtt-sn-commands" /><item><title>RE: nrf52840 CLI UDP mqtt-sn commands</title><link>https://devzone.nordicsemi.com/thread/166644?ContentTypeID=1</link><pubDate>Sat, 19 Jan 2019 17:40:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68d5243e-1025-4ccf-b003-4f179087d58c</guid><dc:creator>Tiago Morais</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the late reply and thanks for your answer!&lt;br /&gt;&lt;br /&gt; the problem I was having was that i wanted to send hex values like {03 01 01} via CLI.&lt;br /&gt; that worked fine, but when i meant to send something like {03 0A&amp;nbsp;01}&amp;nbsp;&lt;br /&gt;The CLI interpreted that &amp;#39;0A&amp;#39; as I had finished the command sending only &amp;#39;03&amp;#39; instead of sending the full {03 0A 01}&lt;/p&gt;
[quote userid="5630" url="~/f/nordic-q-a/42308/nrf52840-cli-udp-mqtt-sn-commands/165632"]1. The &amp;quot;udp send&amp;quot; command is documented in the &lt;a href="https://github.com/openthread/openthread/blob/master/src/cli/README_UDP.md#node-2"&gt;README_UDP.md&lt;/a&gt; file. You need to put space instead of new line before you put a new argument. Pressing enter - producing &amp;#39;\r&amp;#39; or &amp;#39;\n&amp;#39; or &amp;#39;\r\n&amp;#39; - this basically how all command line tools works (enter means - &amp;quot;I finished my command, please execute it&amp;quot;).[/quote]
&lt;p&gt;I was able to find the correct file to adapt the CLI code&amp;nbsp;&lt;a href="https://github.com/openthread/openthread/blob/master/src/cli/cli_uart.cpp"&gt;HERE&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3.&lt;/p&gt;
[quote userid="5630" url="~/f/nordic-q-a/42308/nrf52840-cli-udp-mqtt-sn-commands/165632"]Do you mean that you want to have CLI based MQTT-SN commands? If yes, then i suggest you to take a look on this &lt;a href="https://github.com/openthread/openthread/blob/master/include/openthread/cli.h#L113"&gt;API&lt;/a&gt; to register custom commands. You can&amp;#39;t just use &amp;quot;udp send&amp;quot; command to emulate MQTT-SN behaviour. You would need to map MQTT-SN API to CLI commands.[/quote]
&lt;p&gt;Yeah, I was planning to do something like that, but now I&amp;#39;d like to go further and try to that by implementing the spinel protocol&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 CLI UDP mqtt-sn commands</title><link>https://devzone.nordicsemi.com/thread/165632?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 06:45:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9426db14-8112-4ffc-accf-9d45087d1d6b</guid><dc:creator>Lukasz Duda</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/tiago-morais"&gt;Tiago Morais&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;First of all, thank you for using nRF5 SDK for Thread and Zigbee!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if i understand the nature of the problem, so i will just list couple of thoughts after reading your post.&lt;/p&gt;
&lt;p&gt;1. The &amp;quot;udp send&amp;quot; command is documented in the &lt;a href="https://github.com/openthread/openthread/blob/master/src/cli/README_UDP.md#node-2"&gt;README_UDP.md&lt;/a&gt; file. You need to put space instead of new line before you put a new argument. Pressing enter - producing &amp;#39;\r&amp;#39; or &amp;#39;\n&amp;#39; or &amp;#39;\r\n&amp;#39; - this basically how all command line tools works (enter means - &amp;quot;I finished my command, please execute it&amp;quot;).&lt;/p&gt;
&lt;p&gt;2. You can configure your serial communicator (e.g. Putty) to use any of the mentioned above new line breaks.&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;You said:&lt;/p&gt;
[quote userid="76337" url="~/f/nordic-q-a/42308/nrf52840-cli-udp-mqtt-sn-commands"]I don&amp;#39;t want to keep the mqtt-sn client inside the nrf52840, I&amp;#39;d like to put it in a microcontroler.[/quote]
&lt;p&gt;Do you mean that you want to have CLI based MQTT-SN commands? If yes, then i suggest you to take a look on this &lt;a href="https://github.com/openthread/openthread/blob/master/include/openthread/cli.h#L113"&gt;API&lt;/a&gt; to register custom commands. You can&amp;#39;t just use &amp;quot;udp send&amp;quot; command to emulate MQTT-SN behaviour. You would need to map MQTT-SN API to CLI commands.&lt;/p&gt;
&lt;p&gt;4. Anyway, if i didn&amp;#39;t understand the problem correctly, you can always make some modification to the &lt;a href="https://github.com/openthread/openthread/tree/master/src/cli"&gt;CLI application&lt;/a&gt;&amp;nbsp;and &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Thread_SDK/v2-0-0/thread_intro?12#thread_qsg_libraries"&gt;update OpenThread libraries inside SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Łukasz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>