I am trying to modify the Zigbee light switch example to transmit commands to the first bound endpoint, rather than to a bulb address determined by the app logic:
ZB_ZCL_ON_OFF_SEND_REQ(bufid,
bulb_ctx.short_addr,
ZB_APS_ADDR_MODE_BIND_TBL_ID,
0,
LIGHT_SWITCH_ENDPOINT,
ZB_AF_HA_PROFILE_ID,
ZB_ZCL_DISABLE_DEFAULT_RESPONSE,
cmd_id,
NULL);
I do not see this case handled in functions like zb_zcl_finish_and_send_packet_common() so that leads me to suspect that the implementation might not be complete. The only place I ever see it mentioned is in include/zboss_api_aps.h, and only to define the symbol. I do not have access to ZBOSS source code, however, so I can't see if it is used internally.
I used my Zigbee controller to perform the binding and it got a success indication back. However the result of this command is a fatal error:
I: nRF5 802154 radio initialized
*** Booting Zephyr OS build v2.7.99-ncs1 ***
I: Starting ZBOSS Light Switch example
I: ZBOSS Light Switch example started
I: Production configuration is not present or invalid (status: -1)
I: Zigbee stack initialized
I: Joined network successfully on reboot signal (Extended PAN ID: xxxx, PAN ID: xxxx)
I: Send ON/OFF command: 2
E: ZBOSS fatal error occurred
I: nRF5 802154 radio initialized
If it is unsupported, what is the alternative? Can/should I read the binding table from the app?