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;
}