Changing Zigbee Profile ID to my Own Custom Profile makes the endpoint handler not trigger.

Pretty much the subject. I have two zigbee devices, one end device, and one Coordinator, they work fine, they connect, and form the network, the end device is able to reach the coordinator and identify. The problem only happens when I try to send cmd and view them on my Coordinator. I also have a sniffer running to confirm what is going on.

my send code: 

    zb_zcl_smartair_message_in_attrs_t  test;
    ZB_ZCL_SET_STRING_VAL(test.message_data,"HELLO", strlen("HELLO")+1);
    zb_uint8_t * ptr;
    zb_addr_u    remote_node = {.addr_short = 0};
    ptr = ZB_ZCL_START_PACKET(bufid);  
    ZB_ZCL_CONSTRUCT_SET_FRAME_CONTROL(
        *ptr,ZB_ZCL_FRAME_TYPE_CLUSTER_SPECIFIC,                                                 
        ZB_ZCL_MANUFACTURER_SPECIFIC,                                         
        ZB_ZCL_FRAME_DIRECTION_TO_SRV,                                            
        ZB_ZCL_DISABLE_DEFAULT_RESPONSE
    );
    ptr++;
    ZB_ZCL_CONSTRUCT_COMMAND_HEADER_EXT(ptr, ZB_ZCL_GET_SEQ_NUM(), ZB_TRUE, 0x11, 0x11);
    ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (ZB_ZCL_ATTR_SMARTAIR_MESSAGE_IN_MESSAGE_DATA));                                    
    ZB_ZCL_PACKET_PUT_DATA8(ptr, (ZB_ZCL_ATTR_TYPE_CHAR_STRING));                                       
    ptr = zb_zcl_put_value_to_packet(ptr, ZB_ZCL_ATTR_TYPE_CHAR_STRING, (zb_uint8_t*)&test.message_data);                
    zb_zcl_finish_and_send_packet(
        bufid,
        ptr,
        &remote_node,
        ZB_APS_ADDR_MODE_16_ENDP_PRESENT,
        1,
        1,
        ZB_SMARTAIR_PROFILE_ID,
        ZB_ZCL_CLUSTER_ID_SMARTAIR_MESSAGE_IN,
        NULL
    );

and I reg my handler on my Coordinator as:

ZB_ZCL_REGISTER_DEVICE_CB(zcl_device_cb);
ZB_AF_REGISTER_DEVICE_CTX(&smartair_controller_ctx); //Reg CTX first !!!!!
ZB_AF_SET_ENDPOINT_HANDLER(SMARTAIR_ZB_ENDPOINT, smartair_endpoint_handler); // Then EP handler
//Just like the Docs say

my handler does nothing, it does: 

LOG_INF("EP Handler Triggered");
return ZB_FALSE;

all I need is to see "EP Handler Triggered" on my Debug logs.

I can see the Packet sent from my End Device on my Wireshark:

and I can also see the ACK back from the Coordinator: 

so the packet is sent fine, and received and also acked back, but the endpoint handler does not trigger.

The fix was to change the profile ID value from my Own custom Profile ID to the HA profile ID (0x0104).

From the Zigbee ZCL specification section 2.6.1.1:

so using custom profile ID with values from this table should cause no problems.

The process of defining my clusters and attributes is standard, nothing new, just defined the attributes, then defined the Cluster list and cluster descriptors, declared endpoint, and device ctx. If additional steps are required to use custom profile IDs then I did not see them on the https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.11.2.0/index.html

I would really appreciate your help.

Parents Reply Children
No Data
Related