This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assign both CoAP client and server roles to a node in nRF_Connect_SDK

Hi,

In nRF_Connect_SDK's OpenThread's Coap_Client sample, I want to implement the role of both client and server on a single node.

Also instead of sending messages to CoAP_Server, I want to send messages to my own CoAP server, whose address I have specified in the application. Following is the application code...

#define BORDER_ROUTER_IP "2001:db8:1:ffff::a00:1"
#define COMMON_RESOURCE "proxy/zenedge"
#define EUID "u=64088dce2d8f7568"
#define PACKET_VERSION "pv=1"
#define BOOTSTRAP "pt=b"

#define BOOTSTRAP_MESSAGE_FORMAT "o=2&i=1&t=1&2=10&o=2&i=2&t=2&2=11&o=2&i=5&t=4&2=11&o=2&i=6&t=5&2=7&o=3&i=4&t=7&2=5&o=3&i=7&t=8&2=12&o=2&i=8&t=3&2=11&o=2&i=11&t=22&2=5&o=2&i=12&t=31&2=11"

/**
 * @brief Bootstrap callback
 * @param aContext Not used
 * @param aMessage coap message
 * @param aMessageInfo Not used
 * @param aError  Error happened during receiving of coap message
 */
void bootStrapCallBack(
        void *aContext,
        otMessage *aMessage,
        const otMessageInfo *aMessageInfo,
        otError aError) {
    uint32_t length = otMessageGetLength(aMessage) - otMessageGetOffset(aMessage);
    uint8_t buff_callback[256];

    if (aError != OT_ERROR_NONE) {
        LOG_INF("(bootstrap call_back) Error receiving coap response message: Error %d: %s\r\n", aError,
                otThreadErrorToString(aError));
    } else {
        if (otCoapMessageGetCode(aMessage) == OT_COAP_CODE_CONTENT) {

            LOG_INF("(bootstrap call_back) Response received successfully\n\r");
            if (length < 256) {
                otMessageRead(aMessage, otMessageGetOffset(aMessage), buff_callback, length);
                LOG_INF("%s\n\r", buff_callback);
            } else {
                LOG_INF("Response length too lengthy\n");
            }
        } else {
            LOG_INF("Response code is %d,  %s\r\n", otCoapMessageGetCode(aMessage),
                    otThreadErrorToString(otCoapMessageGetCode(aMessage)));
        }
    }
    OT_UNUSED_VARIABLE(aContext);
    OT_UNUSED_VARIABLE(aMessageInfo);
}

/**
 * @brief send coap packet for bootstraping
 */
void coap_send_bootstrap_message() {

    char buff[512];
    char *bootstrap_message_payload = NULL;
    sprintf(buff, BOOTSTRAP_MESSAGE_FORMAT);
    bootstrap_message_payload = (char *)malloc(512);
    strcpy(bootstrap_message_payload, buff);

    otMessageInfo message_info;
    otMessage *p_message;
    otError error = OT_ERROR_NONE;
    do {
        p_message = otCoapNewMessage(openthread_get_default_instance(), NULL);

        otCoapMessageInit(p_message, OT_COAP_TYPE_CONFIRMABLE, OT_COAP_CODE_POST);
        otCoapMessageGenerateToken(p_message, 2);
        otCoapMessageAppendUriPathOptions(p_message, COMMON_RESOURCE);
        otCoapMessageAppendUriQueryOption(p_message, EUID);
        otCoapMessageAppendUriQueryOption(p_message, PACKET_VERSION);
        otCoapMessageAppendUriQueryOption(p_message, BOOTSTRAP);
        otCoapMessageSetPayloadMarker(p_message);
        if (p_message == NULL) {
            LOG_INF("Failed to allocate config message for CoAP Request\r\n");
            break;
        }
        error = otMessageAppend(p_message, bootstrap_message_payload, strlen(bootstrap_message_payload));
        if (error != OT_ERROR_NONE) {
            break;
        }
        memset(&message_info, 0, sizeof(message_info));
        message_info.mPeerPort = COAP_PORT;
        otIp6AddressFromString(BORDER_ROUTER_IP, &message_info.mPeerAddr);

        error = otCoapSendRequest(openthread_get_default_instance(), p_message, &message_info, bootStrapCallBack, NULL);

    } while (false);

    if (error != OT_ERROR_NONE && p_message != NULL) {
        LOG_INF("Failed to send config CoAP Request: %d\r\n", error);
        otMessageFree(p_message);
    } else {
        LOG_INF("Packet sent successfully");
    }
    return error;
}

As per logs, my packet is being sent, but I don't receive any packet on my CoAP Server interface.

can you suggest if I need to enable any specific configuration in prj.conf or anywhere in the code.

Parents
  • Yes I am using IP "2001:db8:1:ffff::a00:1" for your CoAP server.

    My other nodes which are based on nRF_SDK_For_Threda_and_Zigbee, also use the same address and nodes are able to send messages to my CoAP server via border router.

    I am facing this issue in this case only.

    Also, can you explain the 2 crashes I have mentioned?

  • Hi Sigurd,

    I am trying to print the address of my CoAP_Clien node, but I am facing a crash...

    Below is the code snippet:

    static void address_print(const otIp6Address *addr) {
      char ipstr[40];
      snprintf(ipstr, sizeof(ipstr), "%x:%x:%x:%x:%x:%x:%x:%x",
          ((uint8_t *)(addr->mFields.m16 + 0)),
          ((uint8_t *)(addr->mFields.m16 + 1)),
          ((uint8_t *)(addr->mFields.m16 + 2)),
          ((uint8_t *)(addr->mFields.m16 + 3)),
          ((uint8_t *)(addr->mFields.m16 + 4)),
          ((uint8_t *)(addr->mFields.m16 + 5)),
          ((uint8_t *)(addr->mFields.m16 + 6)),
          ((uint8_t *)(addr->mFields.m16 + 7)));
      LOG_INF("%s\r\n", (uint32_t)ipstr);
    }
    
    /**
     * @param openthread instance
     * @action print address of device
     */
    static void addresses_print(otInstance *aInstance) {
      LOG_INF("Inside address print");
      int a = 0;
      for (const otNetifAddress *addr = otIp6GetUnicastAddresses(aInstance); addr; addr = addr->mNext) {
        LOG_INF("Inside for address print: %d", a);
        a++;
        address_print(&addr->mAddress);
      }
    }
    
    static void on_thread_state_changed(uint32_t flags, void *context) {
      LOG_INF("***In on_thread_state_changed ");
    
      struct openthread_context *ot_context = context;
      if (i == 0) {
        i = 1;
        otThreadSetEnabled(ot_context->instance, false);
        otLinkSetExtendedAddress(ot_context->instance, &EUI64);
        otThreadSetEnabled(ot_context->instance, true);
      }
    
      if (flags & OT_CHANGED_THREAD_ROLE) {
        switch (otThreadGetDeviceRole(ot_context->instance)) {
        case OT_DEVICE_ROLE_CHILD:
        case OT_DEVICE_ROLE_ROUTER:
        case OT_DEVICE_ROLE_LEADER:
          LOG_INF("*****Node Role :  ");
          k_work_submit(&on_connect_work);
          LOG_INF("*********Print node address********* ");
          addresses_print(ot_context->instance);
          is_connected = true;
          dk_set_led_on(LIGHT_LED2);
          dk_set_led_off(LIGHT_LED3);
          break;
    
        case OT_DEVICE_ROLE_DISABLED:
        case OT_DEVICE_ROLE_DETACHED:
        default:
          LOG_INF("****Default Role :  ");
          k_work_submit(&on_disconnect_work);
          is_connected = false;
          dk_set_led_on(LIGHT_LED3);
          dk_set_led_off(LIGHT_LED2);
          break;
        }
      }
    }

    Each Time code crashes when it goes inside the "addresses_print" function.

    Below is the crash report:

    [00:00:00.002,685] <inf> ieee802154_nrf5: nRF5 802154 radio initialized
    [00:00:00.106,048] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.106,048] <inf> fs_nvs: alloc wra: 5, d98
    [00:00:00.106,048] <inf> fs_nvs: data wra: 5, 428
    [00:00:00.216,613] <inf> net_l2_openthread: State changed! Flags: 0x101fc300 current role: 0
    [00:00:00.217,010] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  6 2022 11:43:49
    [00:00:00.245,117] <inf> net_l2_openthread: OpenThread already commissioned.
    [00:00:00.245,117] <inf> net_l2_openthread: Network name: fb9d04b4bc8d7a24
    [00:00:00.363,403] <inf> net_l2_openthread: State changed! Flags: 0x0100103d current role: 1
    [00:00:00.369,384] <inf> coap_client: Start CoAP-client sample
    [00:00:00.369,903] <dbg> coap_utils.coap_init: CoAP socket receive thread started
    [00:00:00.369,934] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  6 2022 11:43:49
    [00:00:00.398,071] <inf> net_l2_openthread: OpenThread already commissioned.
    [00:00:00.398,101] <inf> net_l2_openthread: Network name: fb9d04b4bc8d7a24
    [00:00:00.399,261] <inf> net_l2_openthread: State changed! Flags: 0x00000010 current role: 1
    [00:00:00.399,261] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.506,805] <inf> net_l2_openthread: State changed! Flags: 0x1000307f current role: 1
    [00:00:00.507,110] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.507,141] <inf> coap_client_utils: ****Default Role :
    [00:00:00.508,758] <inf> coap_client_utils: MAC Address of the Device: f4 ce 36 64 8 8d
    [00:00:00.508,789] <inf> coap_client_utils:  ce 2d
    [00:00:00.547,393] <inf> net_l2_openthread: State changed! Flags: 0x00003004 current role: 1
    [00:00:00.547,607] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.547,607] <inf> coap_client_utils: ****Default Role :
    [00:00:03.004,425] <inf> net_l2_openthread: State changed! Flags: 0x200012a4 current role: 2
    [00:00:03.004,821] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:03.004,852] <inf> coap_client_utils: *****Node Role :
    [00:00:03.004,852] <inf> coap_client_utils: *********Print node address*********
    [00:00:03.004,852] <inf> coap_client_utils: Inside address print
    [00:00:03.004,882] <inf> coap_client_utils: Inside for address print: 0
    [00:00:03.005,004] <inf> coap_client_utils: Inside for address print: 1
    [00:00:03.014,312] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    --- 10 messages dropped ---
    [00:00:03.014,343] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:03.014,343] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:03.014,343] <err> os: fpscr:  0x4c0244d5
    [00:00:03.014,343] <err> os: Faulting instruction address (r15/pc): 0x00055518
    [00:00:03.014,373] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:03.014,373] <err> os: Current thread: 0x200015b8 (logging)
    [00:00:03.108,428] <err> os: ***** HARD FAULT *****
    [00:00:03.108,428] <err> os:   Fault escalation (see below)
    [00:00:03.108,428] <err> os: ARCH_EXCEPT with reason 4
    
    [00:00:03.108,459] <err> os: r0/a1:  0x00000004  r1/a2:  0x000000d1  r2/a3:  0x00000001
    [00:00:03.108,459] <err> os: r3/a4:  0x00013911 r12/ip:  0x00000000 r14/lr:  0x00007b41
    [00:00:03.108,459] <err> os:  xpsr:  0x4100000b
    [00:00:03.108,459] <err> os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    [00:00:03.108,489] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    [00:00:03.108,520] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:03.108,551] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:03.108,581] <err> os: fpscr:  0x00000011
    [00:00:03.108,581] <err> os: Faulting instruction address (r15/pc): 0x00055518
    [00:00:03.108,612] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:03.108,642] <err> os: Fault during interrupt handling
    
    [00:00:03.108,673] <err> os: Current thread: 0x200015b8 (logging)
    [00:00:03.997,863] <err> fatal_error: Resetting system
    [00:00:00.002,685] <inf> ieee802154_nrf5: nRF5 802154 radio initialized
    

    Can you tell me what's wrong with my address_print function?

    Again this function works perfectly in nRF_SDK_for_Thread_and_Zigbee but crashes in nRF_Connect_SDK.

  • Hi

    My guess is that something is off with your print function.
    OpenThread in Zephyr has a function to convert Ip6 addresses to strings, so it seems to work when I usethat instead:

        const otNetifAddress *unicastAddrs = otIp6GetUnicastAddresses(openthread_get_default_instance());    
        
        for (const otNetifAddress *addr = unicastAddrs; addr; addr = addr->mNext)    
        {    
            char string[OT_IP6_ADDRESS_STRING_SIZE];    
            const otIp6Address  add6 = addr->mAddress;    
            otIp6AddressToString(&add6, string, sizeof(add6));    
            printk("addr: %s\n",string);    
        }    
    //void otIp6AddressToString(const otIp6Address *aAddress, char *aBuffer, uint16_t aSize)  

    Can you compare available IP addressed on the nRF Connect SDK thread devices and nRF5 SDK thread devices?

    Regards,
    Sigurd Hellesvik

  • I have modified my code as per the snippet provided by you.

    Now my code looks like below mentioned...

    /**
     * @param openthread instance
     * @action print address of device
     */
    static void addresses_print(otInstance *aInstance) {
      LOG_INF("Print IPv^ address of node");
      const otNetifAddress *unicastAddrs = otIp6GetUnicastAddresses(openthread_get_default_instance());
    
      for (const otNetifAddress *addr = unicastAddrs; addr; addr = addr->mNext) {
        char string[OT_IP6_ADDRESS_STRING_SIZE];
        const otIp6Address add6 = addr->mAddress;
        otIp6AddressToString(&add6, string, sizeof(add6));
        LOG_INF("addr: %s\n", string);
      }
    }
    int i = 0;
    
    static void on_thread_state_changed(uint32_t flags, void *context) {
      LOG_INF("***In on_thread_state_changed ");
    
      struct openthread_context *ot_context = context;
    
      if (flags & OT_CHANGED_THREAD_ROLE) {
        switch (otThreadGetDeviceRole(ot_context->instance)) {
        case OT_DEVICE_ROLE_CHILD:
        case OT_DEVICE_ROLE_ROUTER:
        case OT_DEVICE_ROLE_LEADER:
          if (i == 0) {
            i = 1;
            otThreadSetEnabled(ot_context->instance, false);
            otLinkSetExtendedAddress(ot_context->instance, &EUI64);
            otThreadSetEnabled(ot_context->instance, true);
          }
          LOG_INF("*****Node Role :  ");
          k_work_submit(&on_connect_work);
          LOG_INF("*********Print node address********* ");
          addresses_print(ot_context->instance);
          is_connected = true;
          dk_set_led_on(LIGHT_LED2);
          dk_set_led_off(LIGHT_LED3);
          break;
    
        case OT_DEVICE_ROLE_DISABLED:
        case OT_DEVICE_ROLE_DETACHED:
        default:
          LOG_INF("****Default Role :  ");
          k_work_submit(&on_disconnect_work);
          is_connected = false;
          dk_set_led_on(LIGHT_LED3);
          dk_set_led_off(LIGHT_LED2);
          break;
        }
      }
    }

    Still, I get the same error. Still, my code crashes. 

    I am not getting any IP address for nRF_Connect_Devices. Attached error log below...

    [00:00:00.002,716] <inf> ieee802154_nrf5: nRF5 802154 radio initialized
    [00:00:00.106,079] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.106,079] <inf> fs_nvs: alloc wra: 0, d58
    [00:00:00.106,079] <inf> fs_nvs: data wra: 0, 4c4
    [00:00:00.118,011] <inf> net_l2_openthread: State changed! Flags: 0x101fc300 current role: 0
    [00:00:00.118,408] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  6 2022 11:43:49
    [00:00:00.121,246] <inf> net_l2_openthread: OpenThread already commissioned.
    [00:00:00.121,276] <inf> net_l2_openthread: Network name: fb9d04b4bc8d7a24
    [00:00:00.188,018] <inf> net_l2_openthread: State changed! Flags: 0x0100103d current role: 1
    [00:00:00.194,091] <inf> coap_client: Start CoAP-client sample
    [00:00:00.194,580] <dbg> coap_utils.coap_init: CoAP socket receive thread started
    [00:00:00.194,610] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  6 2022 11:43:49
    [00:00:00.197,143] <inf> net_l2_openthread: OpenThread already commissioned.
    [00:00:00.197,174] <inf> net_l2_openthread: Network name: fb9d04b4bc8d7a24
    [00:00:00.198,516] <inf> net_l2_openthread: State changed! Flags: 0x00000010 current role: 1
    [00:00:00.198,516] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.198,974] <inf> coap_client_utils: MAC Address of the Device: f4 ce 36 64 8 8d
    [00:00:00.198,974] <inf> coap_client_utils:  ce 2d
    [00:00:00.282,470] <inf> net_l2_openthread: State changed! Flags: 0x00001084 current role: 2
    [00:00:00.283,050] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.290,802] <inf> coap_client_utils: *****Node Role :
    [00:00:00.290,832] <inf> coap_client_utils: *********Print node address*********
    [00:00:00.290,832] <inf> coap_client_utils: Print IPv^ address of node
    [00:00:00.304,443] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    --- 7 messages dropped ---
    [00:00:00.304,443] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:00.304,473] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:00.304,473] <err> os: fpscr:  0x4c42e4d5
    [00:00:00.304,504] <err> os: Faulting instruction address (r15/pc): 0x000554dc
    [00:00:00.304,504] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.304,504] <err> os: Current thread: 0x200015b8 (logging)
    [00:00:00.377,838] <err> os: ***** HARD FAULT *****
    [00:00:00.377,868] <err> os:   Fault escalation (see below)
    [00:00:00.377,868] <err> os: ARCH_EXCEPT with reason 4
    
    [00:00:00.377,868] <err> os: r0/a1:  0x00000004  r1/a2:  0x000000d1  r2/a3:  0x00000001
    [00:00:00.377,899] <err> os: r3/a4:  0x000138d5 r12/ip:  0x00000000 r14/lr:  0x00007b05
    [00:00:00.377,899] <err> os:  xpsr:  0x4100000b
    [00:00:00.377,899] <err> os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    [00:00:00.377,929] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    [00:00:00.377,960] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:00.377,990] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:00.377,990] <err> os: fpscr:  0x00000010
    [00:00:00.378,021] <err> os: Faulting instruction address (r15/pc): 0x000554dc
    [00:00:00.378,051] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.378,051] <err> os: Fault during interrupt handling
    
    [00:00:00.378,082] <err> os: Current thread: 0x200015b8 (logging)
    [00:00:01.267,242] <err> fatal_error: Resetting system
    

    Below is the IP address available on the nRF_SDK thread devices...

    <info> app: fdf3:cf88:3e4e:ad4d:e732:8425:d033:b6e2
    
    <info> app: fdfe:ee41:832:1c64:0:ff:fe00:7c0a
    
    <info> app: fdfe:ee41:832:1c64:37d8:db5e:5adb:a088
    
    <info> app: fe80:0:0:0:7b9f:ccb1:dca1:e627
    

Reply
  • I have modified my code as per the snippet provided by you.

    Now my code looks like below mentioned...

    /**
     * @param openthread instance
     * @action print address of device
     */
    static void addresses_print(otInstance *aInstance) {
      LOG_INF("Print IPv^ address of node");
      const otNetifAddress *unicastAddrs = otIp6GetUnicastAddresses(openthread_get_default_instance());
    
      for (const otNetifAddress *addr = unicastAddrs; addr; addr = addr->mNext) {
        char string[OT_IP6_ADDRESS_STRING_SIZE];
        const otIp6Address add6 = addr->mAddress;
        otIp6AddressToString(&add6, string, sizeof(add6));
        LOG_INF("addr: %s\n", string);
      }
    }
    int i = 0;
    
    static void on_thread_state_changed(uint32_t flags, void *context) {
      LOG_INF("***In on_thread_state_changed ");
    
      struct openthread_context *ot_context = context;
    
      if (flags & OT_CHANGED_THREAD_ROLE) {
        switch (otThreadGetDeviceRole(ot_context->instance)) {
        case OT_DEVICE_ROLE_CHILD:
        case OT_DEVICE_ROLE_ROUTER:
        case OT_DEVICE_ROLE_LEADER:
          if (i == 0) {
            i = 1;
            otThreadSetEnabled(ot_context->instance, false);
            otLinkSetExtendedAddress(ot_context->instance, &EUI64);
            otThreadSetEnabled(ot_context->instance, true);
          }
          LOG_INF("*****Node Role :  ");
          k_work_submit(&on_connect_work);
          LOG_INF("*********Print node address********* ");
          addresses_print(ot_context->instance);
          is_connected = true;
          dk_set_led_on(LIGHT_LED2);
          dk_set_led_off(LIGHT_LED3);
          break;
    
        case OT_DEVICE_ROLE_DISABLED:
        case OT_DEVICE_ROLE_DETACHED:
        default:
          LOG_INF("****Default Role :  ");
          k_work_submit(&on_disconnect_work);
          is_connected = false;
          dk_set_led_on(LIGHT_LED3);
          dk_set_led_off(LIGHT_LED2);
          break;
        }
      }
    }

    Still, I get the same error. Still, my code crashes. 

    I am not getting any IP address for nRF_Connect_Devices. Attached error log below...

    [00:00:00.002,716] <inf> ieee802154_nrf5: nRF5 802154 radio initialized
    [00:00:00.106,079] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.106,079] <inf> fs_nvs: alloc wra: 0, d58
    [00:00:00.106,079] <inf> fs_nvs: data wra: 0, 4c4
    [00:00:00.118,011] <inf> net_l2_openthread: State changed! Flags: 0x101fc300 current role: 0
    [00:00:00.118,408] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  6 2022 11:43:49
    [00:00:00.121,246] <inf> net_l2_openthread: OpenThread already commissioned.
    [00:00:00.121,276] <inf> net_l2_openthread: Network name: fb9d04b4bc8d7a24
    [00:00:00.188,018] <inf> net_l2_openthread: State changed! Flags: 0x0100103d current role: 1
    [00:00:00.194,091] <inf> coap_client: Start CoAP-client sample
    [00:00:00.194,580] <dbg> coap_utils.coap_init: CoAP socket receive thread started
    [00:00:00.194,610] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  6 2022 11:43:49
    [00:00:00.197,143] <inf> net_l2_openthread: OpenThread already commissioned.
    [00:00:00.197,174] <inf> net_l2_openthread: Network name: fb9d04b4bc8d7a24
    [00:00:00.198,516] <inf> net_l2_openthread: State changed! Flags: 0x00000010 current role: 1
    [00:00:00.198,516] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.198,974] <inf> coap_client_utils: MAC Address of the Device: f4 ce 36 64 8 8d
    [00:00:00.198,974] <inf> coap_client_utils:  ce 2d
    [00:00:00.282,470] <inf> net_l2_openthread: State changed! Flags: 0x00001084 current role: 2
    [00:00:00.283,050] <inf> coap_client_utils: ***In on_thread_state_changed
    [00:00:00.290,802] <inf> coap_client_utils: *****Node Role :
    [00:00:00.290,832] <inf> coap_client_utils: *********Print node address*********
    [00:00:00.290,832] <inf> coap_client_utils: Print IPv^ address of node
    [00:00:00.304,443] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    --- 7 messages dropped ---
    [00:00:00.304,443] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:00.304,473] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:00.304,473] <err> os: fpscr:  0x4c42e4d5
    [00:00:00.304,504] <err> os: Faulting instruction address (r15/pc): 0x000554dc
    [00:00:00.304,504] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.304,504] <err> os: Current thread: 0x200015b8 (logging)
    [00:00:00.377,838] <err> os: ***** HARD FAULT *****
    [00:00:00.377,868] <err> os:   Fault escalation (see below)
    [00:00:00.377,868] <err> os: ARCH_EXCEPT with reason 4
    
    [00:00:00.377,868] <err> os: r0/a1:  0x00000004  r1/a2:  0x000000d1  r2/a3:  0x00000001
    [00:00:00.377,899] <err> os: r3/a4:  0x000138d5 r12/ip:  0x00000000 r14/lr:  0x00007b05
    [00:00:00.377,899] <err> os:  xpsr:  0x4100000b
    [00:00:00.377,899] <err> os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    [00:00:00.377,929] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    [00:00:00.377,960] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:00.377,990] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:00.377,990] <err> os: fpscr:  0x00000010
    [00:00:00.378,021] <err> os: Faulting instruction address (r15/pc): 0x000554dc
    [00:00:00.378,051] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.378,051] <err> os: Fault during interrupt handling
    
    [00:00:00.378,082] <err> os: Current thread: 0x200015b8 (logging)
    [00:00:01.267,242] <err> fatal_error: Resetting system
    

    Below is the IP address available on the nRF_SDK thread devices...

    <info> app: fdf3:cf88:3e4e:ad4d:e732:8425:d033:b6e2
    
    <info> app: fdfe:ee41:832:1c64:0:ff:fe00:7c0a
    
    <info> app: fdfe:ee41:832:1c64:37d8:db5e:5adb:a088
    
    <info> app: fe80:0:0:0:7b9f:ccb1:dca1:e627
    

Children
No Data
Related