Hello, I'm testing an example of a zigby light bulb with a nrf52840 (pca 10056) board.
Here, when I press "BUTNERT 1" on ZED, I want to send the [ON/OFF] status of the current light bulb to ZC.
I was told to use a Here at the next link, so I put it in and used it.
But it was not sent to ZC.
Did you miss anything while developing it?
ZCL Messaging Cluster used it
Code written by me
/* MESSAGE TEST */
static zb_zcl_messaging_display_message_payload_t test_disp;
static void test_light(zb_bufid_t bufid, zb_uint16_t on_off){
zb_uint16_t ZC_short_addr = 0xFFFF;
test_disp.extended_message_control =0x00;
test_disp.message = "HELLO WORLD";
test_disp.message_len = sizeof("HELLO WORLD");
ZB_ZCL_MESSAGING_SEND_DISPLAY_MSG((zb_uint8_t)bufid,ZC_short_addr,ZB_APS_ADDR_MODE_16_ENDP_PRESENT,
(zb_uint8_t)0,(zb_uint8_t)10,&test_disp);
}
static void buttons_handler(bsp_event_t evt)
{
zb_ret_t zb_err_code;
switch(evt)
{
case IDENTIFY_MODE_BSP_EVT:
/* Check if endpoint is in identifying mode, if not put desired endpoint in identifying mode. */
if (m_dev_ctx.identify_attr.identify_time == ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE)
{
NRF_LOG_INFO("Bulb put in identifying mode");
zb_err_code = zb_bdb_finding_binding_target(HA_DIMMABLE_LIGHT_ENDPOINT);
ZB_ERROR_CHECK(zb_err_code);
}
else
{
NRF_LOG_INFO("Cancel F&B target procedure");
zb_bdb_finding_binding_target_cancel();
}
break;
case BSP_EVENT_KEY_0 :
zb_buf_get_out_delayed_ext(test_light,ZB_TRUE,32);
break;
default:
NRF_LOG_INFO("Unhandled BSP Event received: %d", evt);
break;
}
}
Are the coordinators short_addr and ep always 0xFFFF and 0?
thanks