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

Zigbee window covering current endpoint is always zero

Hi, i am developing Zigbee window covering device on nrf connect sdk 1.9.1v which has 2 endpoints, but i am face issue when zigbee command is received and 

device_interface_cb is called and i get the endpoint as zero for both endpoint 1 and 2
void device_interface_cb(zb_uint8_t param)
{

	zb_zcl_device_callback_param_t *device_cb_param = ZB_BUF_GET_PARAM(param, zb_zcl_device_callback_param_t);
	LOG_INF("Zigbee CB endpoint %d", device_cb_param->endpoint);

	device_cb_param->status = RET_OK;
	switch (device_cb_param->device_cb_id)
	{
	case ZB_ZCL_WINDOW_COVERING_UP_OPEN_CB_ID:
	{
		zb_uint8_t lift_percentage_val = 0x00;
		zb_uint8_t tilt_percentage_val = 0x00;
		LOG_INF("open");
		ZVUNUSED(zb_zcl_set_attr_val( device_cb_param->endpoint,
									 ZB_ZCL_CLUSTER_ID_WINDOW_COVERING,
									 ZB_ZCL_CLUSTER_SERVER_ROLE,
									 ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_ID,
									 &lift_percentage_val,
									 ZB_FALSE));

		ZVUNUSED(zb_zcl_set_attr_val( device_cb_param->endpoint,
									 ZB_ZCL_CLUSTER_ID_WINDOW_COVERING,
									 ZB_ZCL_CLUSTER_SERVER_ROLE,
									 ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_ID,
									 &tilt_percentage_val,
									 ZB_FALSE));
		break;
	}
	case ZB_ZCL_WINDOW_COVERING_DOWN_CLOSE_CB_ID:
	{
		LOG_INF("close");
		zb_uint8_t lift_percentage_val = 0x64;
		zb_uint8_t tilt_percentage_val = 0x64;

		ZVUNUSED(zb_zcl_set_attr_val( device_cb_param->endpoint,
									 ZB_ZCL_CLUSTER_ID_WINDOW_COVERING,
									 ZB_ZCL_CLUSTER_SERVER_ROLE,
									 ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_ID,
									 &lift_percentage_val,
									 ZB_FALSE));

		ZVUNUSED(zb_zcl_set_attr_val( device_cb_param->endpoint,
									 ZB_ZCL_CLUSTER_ID_WINDOW_COVERING,
									 ZB_ZCL_CLUSTER_SERVER_ROLE,
									 ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_ID,
									 &tilt_percentage_val,
									 ZB_FALSE));
		break;
	}
	case ZB_ZCL_WINDOW_COVERING_STOP_CB_ID:
		LOG_INF("stop");
		zb_uint8_t lift_percentage_val = 0x32;
		zb_uint8_t tilt_percentage_val = 0x32;

		ZVUNUSED(zb_zcl_set_attr_val( device_cb_param->endpoint,
									 ZB_ZCL_CLUSTER_ID_WINDOW_COVERING,
									 ZB_ZCL_CLUSTER_SERVER_ROLE,
									 ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_ID,
									 &lift_percentage_val,
									 ZB_FALSE));

		ZVUNUSED(zb_zcl_set_attr_val( device_cb_param->endpoint,
									 ZB_ZCL_CLUSTER_ID_WINDOW_COVERING,
									 ZB_ZCL_CLUSTER_SERVER_ROLE,
									 ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_ID,
									 &tilt_percentage_val,
									 ZB_FALSE));
		break;
	default:
		device_cb_param->status = RET_OK;
		break;
	}

}


Parents
  • Hi,

    Nothing apparent in you code you have shared that would indicate what the issue could be.

    So issue might be with the command that is being send or it could be how you declarer endpoints. So here here a couple of things that you can do to further debug. 

    To check if the issue lies within the command used:
     - Do a sniffer log of the commands, can use nRF Sniffer for 802.15.4, then shar the log with us as a pcap file. Make sure that the sniffer is started before the coordinator starts the network so that the sniffer has the network key. 


    Ckeck the endpoint:
    - Using Zigbee shell you can see if both endpoints are on the device. So add a extra device\DK to the network by programming the Zigbee: Shell    and set it up so that it joins the same network as the other devices. Then you can use the zdo active_ep command to se what endpoints are on  the device you have. 

    - Share the code where you declarer the endpoints. 

    Regards,
    Jonathan

Reply
  • Hi,

    Nothing apparent in you code you have shared that would indicate what the issue could be.

    So issue might be with the command that is being send or it could be how you declarer endpoints. So here here a couple of things that you can do to further debug. 

    To check if the issue lies within the command used:
     - Do a sniffer log of the commands, can use nRF Sniffer for 802.15.4, then shar the log with us as a pcap file. Make sure that the sniffer is started before the coordinator starts the network so that the sniffer has the network key. 


    Ckeck the endpoint:
    - Using Zigbee shell you can see if both endpoints are on the device. So add a extra device\DK to the network by programming the Zigbee: Shell    and set it up so that it joins the same network as the other devices. Then you can use the zdo active_ep command to se what endpoints are on  the device you have. 

    - Share the code where you declarer the endpoints. 

    Regards,
    Jonathan

Children
No Data
Related