CC2340R5: Some problems encountered when using CC2340R53 as the coordinator

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG,

Hello, during the debugging process of using the CC2340R53 as the coordinator, I encountered some issues. The SDK I used was version 8_40:

1. To initiate network joining, use zb_zdo_mgmt_permit_joining_req. From packet capture, it can be seen that there is a Management Permit Joining Request message in the captured packets, but the node is unable to join the network. I found that the Association Permit in the Beacon packet is 0, which is 0.
I replaced bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING) with this and was able to make the node join the network, but the time was fixed at 180 seconds. I want to be able to define the time myself.

case ZB_BDB_SIGNAL_DEVICE_FIRST_START:
        LOG_COMMON_LN(LOG_DEBUG, "FIRST_START: start steering" );
        buf = zb_buf_get_out();
        if (!buf)
        {
          LOG_COMMON_LN(LOG_DEBUG, "no buffer available" );
          break;
        }

        req_param = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_permit_joining_req_param_t);

        req_param->dest_addr = 0xfffc;
        req_param->permit_duration = 0;//0xff also gave it a try.
        req_param->tc_significance = 1;

        zb_zdo_mgmt_permit_joining_req(buf, permit_joining_cb);

        break;


2. I have set all the channels in the .sysycfg file to be enabled. Additionally, I used the following function to configure the channels. However, when using a sniffer to capture packets, I noticed that the coordinator channel is still set to channel 11.

  zb_set_network_coordinator_role(0x01000000);
  zb_set_bdb_primary_channel_set(0x01000000);
  zb_set_bdb_secondary_channel_set(0x01000000);


3. I used the coordinator to call bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING); to enable a node to join my coordinator's network (the node program is another application). After joining, packet capture showed Device announcement, but about 20 seconds later, packet capture showed the coordinator sending a leave packet, causing the node to leave the network.
I noticed the ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED signal, and both the type and status were 1, that is, the type is ZB_ZDO_AUTHORIZATION_TYPE_R21_TCLK and the status is ZB_ZDO_TCLK_AUTHORIZATION_TIMEOUT. Could the leave be caused by the authentication failure? Are there any solutions?

      case ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED:
      {
        zb_ieee_addr_t ieee_addr;
        zb_zdo_signal_device_authorized_params_t *device_authorized_params = ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, zb_zdo_signal_device_authorized_params_t);
        zb_uint16_t short_addr = device_authorized_params->short_addr;
        zb_ret_t ret = zb_address_ieee_by_short(short_addr, ieee_addr);
        zb_int8_t type = device_authorized_params->authorization_type;
        zb_int8_t status = device_authorized_params->authorization_status;
        atServer_printfln("short addr:%04X, ieee_addr:%02X%02X%02X%02X%02X%02X%02X%02X\r\n type: %d ,status:%d", \
            short_addr,  \
            ieee_addr[7], ieee_addr[6], ieee_addr[5], ieee_addr[4], ieee_addr[3], ieee_addr[2], ieee_addr[1], ieee_addr[0],type,status);

        LOG_COMMON_LN(LOG_DEBUG, "ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED" );
        break;
      }
  • Hello,

    Here is the ZBOSS User's Guide.  Have you considered evaluating the latest F3 SDK v9.14 as well?

    1. The issue explained in the UG: "If destination address equal to device's address, calls nlme-permit_joining.req locally changing permit joining state on device. If called with destination address != local address (can be unicast or broadcast), forces nlme-permit_joining.req call on remote device (devices), but not on a local device keeping local permit joining state unchanged." So you should use dest_addr of the ZC (0x0000) to enable permit join locally.  Permit joining is also enabled during bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING); and ZB_BDBC_MIN_COMMISSIONING_TIME_S from <sdk_install_directory>\source\third_party\zigbee\zboss_r23\include\zb_config_common.h determines the 180s window.

    2. 0x01000000 should be set for only channel 24.  If all channels were set then channel 11 would be the default if the energy detect across all channels were equivalent.  Make sure to factory reset the device or erase all flash memory before re-programming or else the NV information stored my retain the channel 11 setting.

    3. What type of device is the node joiner, and what Zigbee Spec revision is it using?  The Leave is sent because the node joining does not initiate the TCLK update procedure.  "Starting from Zigbee r21 standard every joined device must establish a TCLK during or after joining. That is true for both Zigbee 3.0 and SE profile (while SE uses its own certificate-based protocol, it still establishes the same unique TCLK). TCLK can be used for securing any APS traffic between the device and TC."

    Regards,
    Ryan

  • Hi Ryan
    1、I used zb_set_nvram_erase_at_start(ZB_TRUE);, and then set the channel. However, I still couldn't set the channel to 24.

      zb_set_nvram_erase_at_start(ZB_TRUE);
      zb_set_network_coordinator_role(0x01000000);
      zb_set_bdb_primary_channel_set(0x01000000);
      zb_set_bdb_secondary_channel_set(0x01000000);


    2、Sorry, I don't know exactly which version of Zigbee it is using. However, it is a node that is not in sleep mode and is a terminal device. It is a node device made with CC2652, and the SDK is 6.41.0.17.

  • 1. Using the v8.40 F3 SDK I was able to use "zb_set_network_coordinator_role(0x01000000);" and the coordinator started on channel 24 instead of the default 11 established in SysConfig.  The primary/secondary channel sets shouldn't be necessary.  I tested using a LP-EM-CC2340R5 instead of a R53 but this shouldn't make a difference.  Try to clean and rebuild your code, or evaluate a default example implementation.

    2. F2 SDK v6.41 is certainly using Zigbee 3.0 r22 which is acceptable.  You need to confirm that "requestNewTrustCenterLinkKey" is set to TRUE in the firmware.  F3 SDK v9.14 has an option in SysConfig to change the "Zigbee Pro 3.0 Revision" to "Revision 22" in SysConfig, I don't expect this would make a difference but you may consider evaluating a coordinator example from this SDK version to check whether the CC2652 joins the network.  You can provide a sniffer log if you think it would help provide any clarity

    Regards,
    Ryan

  • Hi Ryan
    1、I found that I set req_param->dest_addr = 0x0000; After that, it was indeed possible to connect the node to the network. However, I noticed that there was no "Management Permit Joining Request" packet in the packet capture records, but it did enable the node to connect to the network.
    2、I found that requesting the new Trust Center Link Key did indeed enable 2652 to connect to the network without disconnecting. This is very helpful. Thank you.
    3、I use zb_set_network_coordinator_role(mask); Setting, I found that it can be used during initialization, but when I use the command to set it, it cannot be set. After setting, do I need to use zb_set_nvram_erase_at_start(ZB_TRUE); to re-erase the information?

  • 1. Using zb_zdo_mgmt_permit_joining_req with the local dest_addr (0x0000) will enable the permit join locally but not broadcast the "Management Permit Joining Request" over the network.  The inverse is true for using a dest_addr of 0xFFFC.  You can use zb_zdo_mgmt_permit_joining_req twice if you want to perform both actions.
    3. zb_set_network_coordinator_role should not be used after initialization.  Once ZBOSS has started, the channel that is selected during Network Formation & Steering should not change on a Zigbee Coordinator.  The only recommended way to change the channel is to restart the device and erase the NV memory before starting ZBOSS.

    Regards,
    Ryan