<?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>can&amp;#39;t send ipv6</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43794/can-t-send-ipv6</link><description>i&amp;#39;m trying to send ipv6 packet over thread with function otIp6Send. but otIp6Send doesn&amp;#39;t work and return &amp;#39;6&amp;#39; which means &amp;quot;Failed to parse message or arguments.&amp;quot; as openthread errors says. i don&amp;#39;t know why !! i&amp;#39;m using nrf52840. this&amp;#39;s part of my code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Mar 2019 09:47:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43794/can-t-send-ipv6" /><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/178035?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 09:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec874660-a901-4559-9acd-67cc012a219c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It looks from your code that you are using Thread SDK v0.11.0, is this correct? I would strongly recommend that you retry your experiment using &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK-for-Thread-and-Zigbee/Download#infotabs"&gt;nRF5 SDK for Thread and Zigbee v2.0.0&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/172587?ContentTypeID=1</link><pubDate>Sat, 23 Feb 2019 03:20:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9a6ed30-88bc-4b18-b488-7bd47b5d609d</guid><dc:creator>testter2</dc:creator><description>&lt;p&gt;here i&amp;#39;m trying to send multicast message and i got source address from putty with ipaddr command but i still can&amp;#39;t receive packet from my receiving callback&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6521.putty.JPG" /&gt;&lt;br /&gt;this&amp;#39;s the main of client example&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * Copyright (c) 2017 - 2017, Nordic Semiconductor ASA
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
/** @file
 *
 * @defgroup simple_coap_client_example_main main.c
 * @{
 * @ingroup simple_coap_client_example_example
 * @brief Simple CoAP Client Example Application main file.
 *
 * @details This example demonstrates a CoAP client application that enables to control BSP_LED_0
 *          on a board with related Simple CoAP Server application via CoAP messages.
 *
 */

#include &amp;quot;app_timer.h&amp;quot;
#include &amp;quot;bsp_thread.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#include &amp;quot;thread_coap_utils.h&amp;quot;
#include &amp;quot;thread_utils.h&amp;quot;
#include &amp;lt;openthread/openthread.h&amp;gt;

#define IPV6_ADDR_BYTE_LENGTH   16                /**&amp;lt; Length of IPv6 address in bytes. */
#define PAYLOAD_BYTE_LENGTH     4                 /**&amp;lt; Length of test packet payload in bytes. */
#define TEST_RESULTS_LENGTH     16                /**&amp;lt; Length of test results in bytes. */
#define UDP_PORT                40001             /**&amp;lt; Default UDP port of the transmitter. */
#define NUMBER_OF_TEST_PACKETS  1000              /**&amp;lt; Number of test UDP packets to send. */
#define TEST_PACKET_SEND_PERIOD 10                /**&amp;lt; Period between UDP test packets [ms]. */
#define COAP_TOKEN_LENGTH       2                 /**&amp;lt; Length of a CoAP token. */
#define IPV6_MCAST_ADDR_STRING  &amp;quot;FF03::1&amp;quot;         /**&amp;lt; IPv6 multicast address in string format. */

#define HOP_LIMIT 64
#define TRAFFIC_CLASS 0
#define NEXT_HEADER 17
#define ver 6
#define FLOW_LABEL 0

#define PP_HTONL(x) ((((x) &amp;amp; 0x000000ffUL) &amp;lt;&amp;lt; 24) | \
                     (((x) &amp;amp; 0x0000ff00UL) &amp;lt;&amp;lt;  8) | \
                     (((x) &amp;amp; 0x00ff0000UL) &amp;gt;&amp;gt;  8) | \
                     (((x) &amp;amp; 0xff000000UL) &amp;gt;&amp;gt; 24))

uint32_t lwip_htonl(uint32_t n)
{
  return (uint32_t)PP_HTONL(n);
}

#ifndef lwip_htonl
uint32_t lwip_htonl(uint32_t x);
#endif


 uint32_t* contructip6add (uint16_t pay_len)
{
   static uint32_t header [10];
    header[0]=lwip_htonl((((uint32_t)ver)&amp;lt;&amp;lt;28)|(((uint32_t)TRAFFIC_CLASS)&amp;lt;&amp;lt;20)|FLOW_LABEL);
    header[1]=lwip_htonl((((uint32_t)pay_len)&amp;lt;&amp;lt;16)|(((uint32_t)NEXT_HEADER)&amp;lt;&amp;lt;8)|HOP_LIMIT);
    header[2]=(0xADDEFD);
    header[3]=(0xEFBE);
    header[4]=(0xFF000000);
    header[5]=(0x6400FE);
    header[6]=lwip_htonl(0xFF030000);
    header[7]=lwip_htonl(0x00000000);
    header[8]=lwip_htonl(0x00000000);
    header[9]=lwip_htonl(0x00000001);

    for(uint8_t i=0;i&amp;lt;=9;i++)
     {           
       
       NRF_LOG_INFO(&amp;quot;header[%d]  %x&amp;quot;,i,header[i]);
     }
    return header;
}

void ip_packet_transmit(void)
{
      uint8_t err;
      uint8_t* header5;
    
      header5= (uint8_t*)contructip6add(20);
      NRF_LOG_INFO(&amp;quot;we are here&amp;quot;);
        uint8_t aData [20]={1,0,2,3,1,0,2,3,1,0,2,3,1,0,2,3,1,0,2,3};
        otMessage *amessage;
        amessage=otIp6NewMessage(thread_ot_instance_get(), false);
         

                err=otMessageAppend(amessage, header5, 40);

        if (amessage == NULL) {
         NRF_LOG_INFO(&amp;quot;error &amp;quot;);
    }
       
        err=otMessageAppend(amessage, aData, 20);
             if (err!= OT_ERROR_NONE ) {
         NRF_LOG_INFO(&amp;quot;error&amp;quot;);
    }
       

        err=otIp6Send(thread_ot_instance_get(),amessage);
       if(err!= OT_ERROR_NONE)
       {
          NRF_LOG_INFO(&amp;quot;error code : %d&amp;quot;,err);
       }
       else


         NRF_LOG_INFO(&amp;quot;end&amp;quot;);
 
}



void ot_receive_handler(otMessage *aMessage, void *aContext)
{
    
      NRF_LOG_INFO(&amp;quot;Anwar&amp;quot;);
      uint16_t length;
      length=otMessageGetLength(aMessage);
      uint32_t data_read[length];
           
        uint32_t bytes_read=otMessageRead (aMessage,0,data_read,length);
         NRF_LOG_INFO(&amp;quot;bytes %d&amp;quot;,bytes_read);
       for(uint8_t i=0;i&amp;lt;length;i+=4)
       {
          NRF_LOG_INFO(&amp;quot;data %x&amp;quot;,data_read[i]);
          NRF_LOG_INFO(&amp;quot;data %x&amp;quot;,data_read[i+1]);
          NRF_LOG_INFO(&amp;quot;data %x&amp;quot;,data_read[i+2]);
          NRF_LOG_INFO(&amp;quot;data %x&amp;quot;,data_read[i+3]);
       }


}

void change_rec(void)

      NRF_LOG_INFO(&amp;quot;here 2&amp;quot;);
        otIp6SetReceiveFilterEnabled(thread_ot_instance_get(), true);
    otIp6SetReceiveCallback(thread_ot_instance_get(),ot_receive_handler, NULL);


}


/***************************************************************************************************
 * @section Buttons
 **************************************************************************************************/

static void bsp_event_handler(bsp_event_t event)
{
    switch (event)
    {
        case BSP_EVENT_KEY_0:
            thread_coap_utils_unicast_light_request_send(thread_ot_instance_get(), LIGHT_TOGGLE);
            break;

        case BSP_EVENT_KEY_1:
        {
            uint8_t command;
            thread_coap_utils_mcast_light_on_toggle();

            if (thread_coap_utils_mcast_light_on_get())
            {
                command = LIGHT_ON;
            }
            else
            {
                command = LIGHT_OFF;
            }

            thread_coap_utils_multicast_light_request_send(thread_ot_instance_get(),
                                                           command,
                                                           THREAD_COAP_UTILS_MULTICAST_REALM_LOCAL);
            break;
        }

        case BSP_EVENT_KEY_2:
            ip_packet_transmit();
            break;

        case BSP_EVENT_KEY_3:
            thread_coap_utils_provisioning_request_send(thread_ot_instance_get());
            break;

        default:
            return; // no implementation needed
    }
}

/***************************************************************************************************
 * @section Callbacks
 **************************************************************************************************/

static void thread_state_changed_callback(uint32_t flags, void * p_context)
{
    if (flags &amp;amp; OT_CHANGED_THREAD_ROLE)
    {
        switch (otThreadGetDeviceRole(p_context))
        {
            case OT_DEVICE_ROLE_CHILD:
            case OT_DEVICE_ROLE_ROUTER:
            case OT_DEVICE_ROLE_LEADER:
                break;

            case OT_DEVICE_ROLE_DISABLED:
            case OT_DEVICE_ROLE_DETACHED:
            default:
                thread_coap_utils_peer_addr_clear();
                break;
        }
    }

    if (flags &amp;amp; OT_CHANGED_THREAD_PARTITION_ID)
    {
        thread_coap_utils_peer_addr_clear();
    }

    NRF_LOG_INFO(&amp;quot;State changed! Flags: 0x%08x Current role: %d\r\n&amp;quot;,
                 flags,
                 otThreadGetDeviceRole(p_context));
}

/***************************************************************************************************
 * @section Initialization
 **************************************************************************************************/

/**@brief Function for initializing the Thread Board Support Package
 */
static void thread_bsp_init(void)
{
    uint32_t error_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, bsp_event_handler);
    APP_ERROR_CHECK(error_code);

    error_code = bsp_thread_init(thread_ot_instance_get());
    APP_ERROR_CHECK(error_code);
}


/**@brief Function for initializing the Application Timer Module
 */
static void timer_init(void)
{
    uint32_t error_code = app_timer_init();
    APP_ERROR_CHECK(error_code);
}


/**@brief Function for initializing the nrf log module.
 */
static void log_init(void)
{
    ret_code_t err_code = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(err_code);

    NRF_LOG_DEFAULT_BACKENDS_INIT();
}


/**@brief Function for initializing the Thread Stack
 */
static void thread_instance_init(void)
{
    thread_configuration_t thread_configuration =
    {
        .role              = RX_ON_WHEN_IDLE,
        .autocommissioning = true,
    };

    thread_init(&amp;amp;thread_configuration);
    thread_cli_init();
    thread_state_changed_callback_set(thread_state_changed_callback);
}


/**@brief Function for initializing the Constrained Application Protocol Module
 */
static void thread_coap_init(void)
{
    thread_coap_configuration_t thread_coap_configuration =
    {
        .coap_server_enabled               = false,
        .coap_client_enabled               = true,
        .coap_cloud_enabled                = false,
        .configurable_led_blinking_enabled = false,
    };

    thread_coap_utils_init(&amp;amp;thread_coap_configuration);
}

/***************************************************************************************************
 * @section Main
 **************************************************************************************************/

int main(int argc, char * argv[])
{
      bsp_board_led_on(1);
        bsp_board_led_on(0);
    log_init();
    timer_init();

    thread_instance_init();
    thread_coap_init();
    thread_bsp_init();
    

    while (true)
    {
        thread_process();

        if (NRF_LOG_PROCESS() == false)
        {
            thread_sleep();
        }
    }
}

/**
 *@}
 **/&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/172350?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 15:59:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c9b6af8-5d5c-4a57-8deb-8480ceeddb76</guid><dc:creator>testter2</dc:creator><description>&lt;p&gt;i don&amp;#39;t have sniffer so i couldn&amp;#39;t trace packets on air.&lt;/p&gt;
&lt;p&gt;i got destination address from coap functions and used it to send in otip6send and it we can&amp;#39;t receive as&amp;nbsp; callback receive function doesn&amp;#39;t be called.&lt;/p&gt;
&lt;p&gt;is there a clear way to determine the destination address ?&lt;/p&gt;
&lt;p&gt;i&amp;#39;ll try to upload examples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/172342?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 15:09:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3fb7b03-c556-4552-a25d-fed068461add</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you sure that the destination address is assigned correctly in the packet? If you could provide a sniffer trace of on-air traffic (you can use our &lt;a href="https://github.com/NordicPlayground/nRF-802.15.4-sniffer"&gt;nRF 802.15.4 sniffer&lt;/a&gt; solution), that would help determine what is happening. If you are not able to do this, please provide full projects for transmitter and receiver side.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/171749?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 21:49:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16a34141-748b-4290-9986-95a017dab0b1</guid><dc:creator>testter2</dc:creator><description>&lt;p&gt;i&amp;#39;m working on thread_simple_coap example with some changes &lt;br /&gt;in server side : we added case for button 2 to set new receiving callback function when receiving&amp;nbsp; an ipv6 packet. and at this function we print received packet.&lt;br /&gt;in client side : we added case for button 2 to send ipv6 with otIp6Send&amp;nbsp;function after we getting addresses from provisioning_response_handler function and construct header as mentioned before&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;main at server side (receiver)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * Copyright (c) 2017 - 2017, Nordic Semiconductor ASA
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 * 
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 * 
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 * 
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 * 
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 */
/** @file
 *
 * @defgroup simple_coap_server_example_main main.c
 * @{
 * @ingroup simple_coap_server_example_example
 * @brief Simple CoAP Server Example Application main file.
 *
 * @details This example demonstrates a CoAP server application that provides resources to control BSP_LED_3
 *          via CoAP messages. It can be controlled by a board with related Simple CoAP Server application.
 */

#include &amp;lt;stdint.h&amp;gt;

#include &amp;quot;app_timer.h&amp;quot;
#include &amp;quot;bsp_thread.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#include &amp;quot;thread_coap_utils.h&amp;quot;
#include &amp;quot;thread_utils.h&amp;quot;

#include &amp;lt;openthread/openthread.h&amp;gt;

void ot_receive_handler(otMessage *aMessage, void *aContext)
{
    
      NRF_LOG_INFO(&amp;quot;packet received&amp;quot;);
}

void change_rec(void)
{
       
        otIp6SetReceiveFilterEnabled(thread_ot_instance_get(), true);
	otIp6SetReceiveCallback(thread_ot_instance_get(),ot_receive_handler, NULL);
}



/***************************************************************************************************
 * @section Buttons
 **************************************************************************************************/

static void bsp_event_handler(bsp_event_t event)
{
    switch(event)
    {

         case BSP_EVENT_KEY_2:
            change_rec();
            break;

        case BSP_EVENT_KEY_3:
            thread_coap_utils_provisioning_enable(true);
            break;

        default:
            return;
    }
}

/***************************************************************************************************
 * @section Callbacks
 **************************************************************************************************/

static void thread_state_changed_callback(uint32_t flags, void * p_context)
{
    if (flags &amp;amp; OT_CHANGED_THREAD_ROLE)
    {
        switch (otThreadGetDeviceRole(p_context))
        {
            case OT_DEVICE_ROLE_CHILD:
            case OT_DEVICE_ROLE_ROUTER:
            case OT_DEVICE_ROLE_LEADER:
                break;

            case OT_DEVICE_ROLE_DISABLED:
            case OT_DEVICE_ROLE_DETACHED:
            default:
                thread_coap_utils_provisioning_enable(false);
                break;
        }
    }
    NRF_LOG_INFO(&amp;quot;State changed! Flags: 0x%08x Current role: %d\r\n&amp;quot;,
                 flags,
                 otThreadGetDeviceRole(p_context));

}

/***************************************************************************************************
 * @section Initialization
 **************************************************************************************************/

/**@brief Function for initializing the Application Timer Module.
 */
static void timer_init(void)
{
    uint32_t error_code = app_timer_init();
    APP_ERROR_CHECK(error_code);
}


/**@brief Function for initializing the nrf log module.
 */
static void log_init(void)
{
    ret_code_t err_code = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(err_code);

    NRF_LOG_DEFAULT_BACKENDS_INIT();
}


/**@brief Function for initializing the Thread Board Support Package.
 */
static void thread_bsp_init(void)
{
    uint32_t error_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, bsp_event_handler);
    APP_ERROR_CHECK(error_code);

    error_code = bsp_thread_init(thread_ot_instance_get());
    APP_ERROR_CHECK(error_code);
}


/**@brief Function for initializing the Thread Stack.
 */
static void thread_instance_init(void)
{
    thread_configuration_t thread_configuration =
    {
        .role                  = RX_ON_WHEN_IDLE,
        .autocommissioning     = true,
        .poll_period           = 2500,
        .default_child_timeout = 10,
    };

    thread_init(&amp;amp;thread_configuration);
    thread_cli_init();
    thread_state_changed_callback_set(thread_state_changed_callback);
}


/**@brief Function for initializing the Constrained Application Protocol Module.
 */
static void thread_coap_init(void)
{
    thread_coap_configuration_t thread_coap_configuration =
    {
        .coap_server_enabled               = true,
        .coap_client_enabled               = false,
        .coap_cloud_enabled                = false,
        .configurable_led_blinking_enabled = false,
    };

    thread_coap_utils_init(&amp;amp;thread_coap_configuration);
}

/***************************************************************************************************
 * @section Main
 **************************************************************************************************/

int main(int argc, char * argv[])
{
      
  
    log_init();
    timer_init();

    // Initialize Thread CoAP utils.
    thread_coap_utils_led_timer_init();
    thread_coap_utils_provisioning_timer_init();
    thread_coap_utils_led_timer_start();

    // Initialize the Thread stack.
    thread_instance_init();
    thread_coap_init();
    thread_bsp_init();

    while (true)
    {
        thread_process();
    if (NRF_LOG_PROCESS() == false)
        {
            thread_sleep();

        }
    }
}

/**
 *@}
 **/
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/171742?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 21:00:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d8f280-064a-4b50-b750-2b75a288a023</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Can you post the code for the receiver? Have you checked with a sniffer is the packets are transmitted on-air?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/171724?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 18:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3e820b2-97c6-4fba-8b05-28f9530d430e</guid><dc:creator>testter2</dc:creator><description>&lt;p&gt;the problem was that header constructed in wrong way.&lt;/p&gt;
&lt;p&gt;but now after editing the code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[0]=lwip_htonl((((uint32_t)ver)&amp;lt;&amp;lt;28)|(((uint32_t)TRAFFIC_CLASS)&amp;lt;&amp;lt;20)|FLOW_LABEL);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[1]=lwip_htonl((((uint32_t)pay_len)&amp;lt;&amp;lt;16)|(((uint32_t)NEXT_HEADER)&amp;lt;&amp;lt;8)|HOP_LIMIT);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[2]=(src[0]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[3]=(src[1]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[4]=(src[2]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[5]=(src[3]); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[6]=(dest[0]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[7]=(dest[1]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[8]=(dest[2]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header[9]=(dest[3]);&lt;br /&gt;&lt;br /&gt;i got no error from function otIp6Send . but i still can&amp;#39;t receive the data from receiver as the receiver code doesn&amp;#39;t get into my callback receiver function although when sending over coap ,receiver code get into my callback receive function without any problems&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: can't send ipv6</title><link>https://devzone.nordicsemi.com/thread/171713?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 16:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08c08db4-1e98-443b-8f50-70303de6497a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you tried filling the message buffer with static data? The header array in&amp;nbsp;&lt;span&gt;contructip6add&amp;nbsp;will be out of scope when you&amp;nbsp;use the pointer to it (header5) in&amp;nbsp;otMessageAppend().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>