<?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>CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42117/cli-example-openthread-2-0-0---udp-data-transfer-from-main-c</link><description>Hello! 
 
 We are working with NRF52840 dongles and want to be able to have them relay data over an OpenThread mesh network through UDP automatically. We have found within the OpenThread API a solid Udp.h library with all the Udp functions we need to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Jan 2021 15:13:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42117/cli-example-openthread-2-0-0---udp-data-transfer-from-main-c" /><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/290579?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 15:13:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03c2a7c6-8a66-4d15-b4ae-a8e45915041f</guid><dc:creator>Quinn20</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;I also can&amp;#39;t recieve udp messages. Does anyone have a example code.&lt;/p&gt;
&lt;p&gt;kind regards,&lt;/p&gt;
&lt;p&gt;Quinn van der Schaar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/290225?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 11:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:760e5f3a-a636-40df-8d32-0c22d4ab9e67</guid><dc:creator>Juliann</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have been trying to send and recieve udp messages just like the rest of you. I tried this with the CLI example out of the Nordic SDK (on the nrf52840 dongle). I have tried out the different solutions which where posted on this forum. After some trying I finally got the otUdpSend to return OT_ERROR_NONE however the other nodes do not recieve the udp message.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So&amp;nbsp;my question is are we doing something wrong in the recieve function, because the led never turns on?&lt;/p&gt;
&lt;p&gt;(our second dongle also hast the udpInit function and the send function from Gabridc)&lt;pre class="ui-code" data-mode="c_cpp"&gt;static otUdpSocket *mySocket;

static void udpInit( otUdpSocket *mySocket )
{
    otUdpOpen( thread_ot_instance_get(), mySocket, handleUdpReceive, NULL );
}

void handleUdpReceive( void *aContext, otMessage *aMessage,
                             const otMessageInfo *aMessageInfo    )
{
    OT_UNUSED_VARIABLE(aContext);
    OT_UNUSED_VARIABLE(aMessage);
    OT_UNUSED_VARIABLE(aMessageInfo);

    bsp_board_led_on(2);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Julian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/207500?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 20:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdeec20d-aab6-42dd-9874-8c003a39e752</guid><dc:creator>gabridc</dc:creator><description>&lt;p&gt;(UPDATED 02 September 2019)&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have being used this forum to fix the problem that I had in my code to send UDP message over Thread network. The answers that could read here don&amp;acute;t fix it but after a lot of time reviewing MQTT official example I found my problem, so I write my solution for the future.&lt;/p&gt;
&lt;p&gt;My problem was that when I use otUdpNewMessage(thread_ot_instance_get(), true); function I put NULL as second parameter and after chenge it to &amp;quot;true&amp;quot;,&amp;nbsp; WORKED.&lt;/p&gt;
&lt;p&gt;When I press a button my main code launch this function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;otError acuario_send_temperature_udp_command(void)
{
    otError error = OT_ERROR_NONE;

    otUdpSocket socket;
    otMessage *udp_message = NULL;
    otMessageInfo messageInfo;
    char buf[10] = &amp;quot;Hello&amp;quot;;
    
    memset(&amp;amp;messageInfo, 0, sizeof(messageInfo));

    error = otUdpOpen(thread_ot_instance_get(), &amp;amp;socket, NULL, NULL);

    error = otIp6AddressFromString(&amp;quot;FF03::0001&amp;quot;, &amp;amp;messageInfo.mPeerAddr);
    messageInfo.mPeerPort = (uint16_t)1994;
    messageInfo.mInterfaceId = OT_NETIF_INTERFACE_ID_THREAD;

    /***
    *
    *   THE NEXT LINE IS SO IMPORTANT, THIS FIX MY PROBLEM. The 
    *   second parameter has to be TRUE
    */
    udp_message = otUdpNewMessage(thread_ot_instance_get(), true);
    
    
    
    otMessageAppend(udp_message, buf, (uint16_t)strlen(buf));

    error = otUdpSend(&amp;amp;socket, udp_message, &amp;amp;messageInfo);


    if(error != OT_ERROR_NONE &amp;amp;&amp;amp; udp_message != NULL)
    {
        otMessageFree(udp_message);
    }


    return error;
}


&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank so much I hope to help other people with my solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/171237?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 20:32:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:869ff297-6b25-44f5-921e-908dacb54971</guid><dc:creator>Jonathan.O</dc:creator><description>&lt;p&gt;Hi Giorgio,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The softdevice .hex file we used was the mbr_nrf52_2.3.0_mbr.hex located in the Nordic SDK\components\softdevice\mbr\nrf52840\hex.&lt;/p&gt;
&lt;p&gt;We worked on Linux and used the mergehex tool to merge the app and the softdevice hex into one file. If not mistaken it also exists for Windows, but I&amp;#39;m not sure about that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Good luck and hope this helps!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/171229?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 19:09:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d58e80d0-29fd-40d0-ac8e-5e2b028a3583</guid><dc:creator>Giorgio</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;Thanks for the reply!&lt;/p&gt;
&lt;p&gt;About the Nordic CLI example... Well, good to know!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We will now try with the OT examples from the repo, thank you!&lt;/p&gt;
&lt;p&gt;For the moment, can you confirm that the softdevice .hex that I need to use for the nRF52840 Dongle is located under components/softdevice/s140/hex inside the SDK for Thread and Zigbee? ( the .hex file is called in my case:&amp;nbsp;s140_nrf52_6.1.0_softdevice.hex&lt;/p&gt;
&lt;p&gt;Thanks again, I really appreciate your help!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Giorgio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/171163?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 13:44:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab9c78b4-83cf-4034-86ab-1064160b6ef3</guid><dc:creator>Jonathan.O</dc:creator><description>&lt;p&gt;Hi Giorgio,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you merge the built .hex file with the soft device .hex? When using the Nordic connect tool to upload the .hex file to the dongle, you need to make sure that the connect tool recognises that both the application (your program, like the CLI example) and the soft device are present inside the .hex file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you have this setup then you can put the dongle in bootloader mode (the tiny button facing away from the USB port) and the red led will start to &amp;quot;breathe&amp;quot;. Then connect will recognise the dongle and you can write the .hex file to the dongle.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Afterwards the dongle will reboot and boot up your application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To merge the soft device and your application, you can use the mergehex tool.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Concerning the CLI example from Nordic. It just doesn&amp;#39;t seem to receive the messages that are sent through code instead of manually typing in the commands in the CLI. I would recommend switching to the CLI example inside the OT repo. It supports the same features if you enable them in the makefile but the UDP otFunctions are actually working.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/171147?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 13:16:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cce5e046-cb29-432a-907c-43bfe50e076c</guid><dc:creator>Giorgio</dc:creator><description>&lt;p&gt;Hi Maciej,&lt;/p&gt;
&lt;p&gt;Thanks for your help!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately we are here again... We decided to start from zero.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We downloaded the nRF Thread &amp;amp; Zigbee SDK and clone the OT repo again.&lt;/p&gt;
&lt;p&gt;Then we followed your instructions using the script you provided but this time nothing works... We tried to build the&amp;nbsp;&lt;span&gt;CLI example ( under usb_bootloader folder) as we did before and again Segger Embedded Studio had some dependencies problem that we fixed adding the libraries : 1) libnordicsemi-nrf52840-radio-driver.a 2)&amp;nbsp;libnordicsemi-nrf52840-radio-driver-softdevice.a.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Done that, we compiled and put the .hex file in the nRF52840 Dongle using nRF connect. This time the device is not recognised by the PC and we cannot open the cli as we did before.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What could have gone wrong?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have any complete example code we can look at some repo? That would be fantastic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for you help and support,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Giorgio&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/171069?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 10:06:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ce8ef08-e8cd-4a68-90c6-977b90d8cb15</guid><dc:creator>MBdev</dc:creator><description>&lt;p&gt;Hi Giorgio,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve rebuild OT libraries following this guide &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Thread_SDK/v2-0-0/thread_intro?12#thread_qsg_libraries"&gt;https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Thread_SDK/v2-0-0/thread_intro?12#thread_qsg_libraries&lt;/a&gt; (in case of any problems, look on official OT guide: &lt;a href="https://openthread.io/guides/build"&gt;https://openthread.io/guides/build)&lt;/a&gt;. Only problem I&amp;#39;ve found was that otUdpNewMessage() takes different 2 argument which I&amp;#39;ve changed in MQTT.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve made a script for easy OT libs update, just clone OT repo in the same library that you have SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#!/bin/sh
 
FLAGS= \
COMMISSIONER=1 \
JOINER=1 \
COAP=1 \
DNS_CLIENT=1 \
MTD_NETDIAG=1 \
BORDER_ROUTER=1 \
MAC_FILTER=1 \
UDP_PROXY=1 \
BORDER_AGENT=1 \
USB=1 \

 
SDK_DIR=`pwd`
cd ../openthread/
OT_DIR=`pwd`
./script/bootstrap
./bootstrap
make -f examples/Makefile-nrf52840 $FLAGS
mv $OT_DIR/output/nrf52840/lib/libopenthread-nrf52840-sdk.a $OT_DIR/output/nrf52840/lib/libopenthread-nrf528 40-sdk-usb.a
mv $OT_DIR/output/nrf52840/lib/libopenthread-nrf52840-softdevice-sdk.a $OT_DIR/output/nrf52840/lib/libopenth read-nrf52840-sdk-softdevice-usb.a
cp $OT_DIR/output/nrf52840/lib/* $SDK_DIR/external/openthread/lib/gcc/
cp -r $OT_DIR/output/include/openthread/* $SDK_DIR/external/openthread/include/openthread/
cp $OT_DIR/examples/platforms/nrf52840/platform-softdevice.h $SDK_DIR/external/openthread/include/openthread /platform/
cp $OT_DIR/examples/platforms/nrf52840/platform-fem.h $SDK_DIR/external/openthread/include/openthread/platfo rm/
cp $OT_DIR/examples/platforms/openthread-system.h $SDK_DIR/external/openthread/include/openthread/platform/&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Maciej Bożyk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/170846?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 11:43:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92295a3c-27d4-48fd-bdf2-7ebc6654964a</guid><dc:creator>Giorgio</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are currently developing an application using the nRF52840 Dongle and we found the same issue. &lt;br /&gt;Udp messages are correctly sent using CLI example ( under usb_bootloader folder) but when we try to modify the code to send the same message nothing happens, even if no errror is encountered by calling OpenThread API.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We decided to rebuild the libraries as you suggested but we encountered some problems including them inside Segger Embedded studio project (we try to modify the same example above).&lt;br /&gt;&lt;br /&gt;Can you provide us with some more information about your procedures? Do you have any code example can we can study to learn and resolve our issues?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: we resolved problems related to dependencies but nothing changed.&lt;/p&gt;
&lt;p&gt;No error during code but UDP messages sent only through CLI, not working by code.&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Thanks in advance! Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/168666?ContentTypeID=1</link><pubDate>Wed, 30 Jan 2019 10:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:decc64ce-0ed4-409f-8d2e-56a987fa8fd4</guid><dc:creator>Kartik@9</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Jonathan.O, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As you mentioned in above comment that,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;This CLI does support the UDP communication from within the code, instead of manually sending messages through the CLI&amp;quot; -&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you please provide example or link of this.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;Thanks,&lt;/div&gt;
&lt;div&gt;Kartik&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/167967?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 14:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfae93a7-1a2d-4d13-bd35-d88c8537ee56</guid><dc:creator>Jonathan.O</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know which problem causes the Nordic CLI Example to not receive the messages. We switched to the OpenThread CLI example that you can build with the nRF52840 (if that is the board you are using) makefile that is available in the official OpenThread github repo. This CLI does support the UDP communication from within the code, instead of manually sending messages through the CLI.&lt;/p&gt;
&lt;p&gt;Hope that helped!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/167685?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 14:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bce1af4d-246f-4ef2-8035-4f742c05e8d9</guid><dc:creator>MBdev</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I also had this problem. I have rebuild openthread libraries (&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.thread_zigbee.v2.0.0/thread_intro.html?cp=4_2_0_1_0_5#thread_qsg_libraries)"&gt;infocenter.nordicsemi.com/.../thread_intro.html&lt;/a&gt; and now udp packets are working. Additionaly, mqtt have now wrong usage of otUdpNewMessage in 2 parameter (don&amp;#39;t remember exactly).&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Maciej Bozyk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/167062?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 11:46:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8000ff1d-8ddc-4f2b-a592-70707b7a975d</guid><dc:creator>MBdev</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m have the same issue, but I&amp;#39;m working on mqttsn_client_subscriber example. I&amp;#39;ve added cli module and it works from cli, but sending udp with code (I connected it to a button) doesn&amp;#39;t - on the same time. I have tried with/without scheduler to call it in the main loop and other different approaches, but nothing helps. I&amp;#39;m unable to send udp outside the cli.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Maciej Bozyk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI Example OpenThread 2.0.0 - UDP data transfer from main.c</title><link>https://devzone.nordicsemi.com/thread/165089?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 09:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae37120-b1bb-4d82-83e5-c781390103df</guid><dc:creator>Jonathan.O</dc:creator><description>&lt;p&gt;UPDATE (11-01-2019):&lt;/p&gt;
&lt;p&gt;We have rewritten some of the code and every step of the UDP process returns OK.&lt;/p&gt;
&lt;p&gt;Sadly, the other nodes do not receive te message.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;void udpSend2(){
    const char buf[100] = &amp;quot;Hallo\0&amp;quot;;
    otMessageInfo messageInfo;
    otInstance *myInstance;
    myInstance = thread_ot_instance_get();
    otUdpSocket mySocket;

    memset(&amp;amp;messageInfo, 0, sizeof(messageInfo));

    otIp6AddressFromString(&amp;quot;ff03::1&amp;quot;, &amp;amp;messageInfo.mPeerAddr);
    messageInfo.mPeerPort = 1994;
    messageInfo.mInterfaceId = OT_NETIF_INTERFACE_ID_THREAD;

    otCliUartOutputFormat(otThreadErrorToString(otUdpOpen(myInstance, &amp;amp;mySocket, NULL, NULL)));

    otMessage *test_Message = otUdpNewMessage(myInstance, NULL);

    otCliUartOutputFormat(otThreadErrorToString(otMessageAppend(test_Message, buf, (uint16_t)strlen(buf))));

	otError errorUdpSend = otUdpSend(&amp;amp;mySocket, test_Message, &amp;amp;messageInfo)
    
    otCliUartOutputFormat(otThreadErrorToString(errorUdpSend));

    otCliUartOutputFormat(&amp;quot;Done\0&amp;quot;);

    otCliUartOutputFormat(otThreadErrorToString(otUdpClose(&amp;amp;mySocket)));
	
	if(errorUdpSend != OT_ERROR_NONE &amp;amp;&amp;amp; test_Message != NULL)
	{
		otMessageFree(test_Message);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We tested the code with the&amp;nbsp;&lt;a href="https://gist.github.com/jwhui/f6aa706e12899722fd50619de3562103#file-cli_udp_example-cpp-L58"&gt;CLI_UDP_Example_Modified&lt;/a&gt;&amp;nbsp;(thanks to Jonathan&amp;nbsp;H u-i)&amp;nbsp;and it worked. The only thing that seems to be different is the way the Instance is handled. Is there a problem with our instance calling or?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jonathan Overes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>