This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zigbee device with custom profile

Hi,

I am trying to receive packets from a device with Zigbee custom profile. Through sniffer, I can see that the device joins the network and sends packets on it but I cannot see them on nordic.

I was trying to use zb_af_set_data_indication(data_indication) but the callback is never triggered for this device, while it works for devices with HA profile.

I also tried to receive packets by defining an endpoint with that custom profile and its clusters but the corresponding callback is never triggered. Again, I am able to see the callback for other end points with HA devices.

How can I receive messages from a device with custom profile?

Best regards.

Laura

Parents
  • Hi Laura,

    Registering the callback zb_af_set_data_indication(data_indication) before zboss_start should make your device receive packets from devices with custom profiles. I will ask our developers if they know of a reason for why this is not happening. 

    Best regards,

    Marte

  • Hi Laura,

    When in your code are you registering your callback with zb_af_set_data_indication(data_indication)? Can you share your implementation of data_indication()?

    Best regards,

    Marte

  • Hi Marte,

    I register the callback just before zboss_start_no_autostart(). This is the callback:

    static zb_uint8_t data_indication(zb_uint8_t bufid)
    {
      zb_uint8_t aps_payload_size = 0;
      zb_uint8_t *aps_payload_ptr = zb_aps_get_aps_payload(bufid, &aps_payload_size);
      zb_apsde_data_indication_t *ind = ZB_BUF_GET_PARAM(bufid, zb_apsde_data_indication_t);
      CDB_PRINT(APP_ZB_DB_PRINT1, "data_indication;Saddr;%04x;cluster;%04x;profile;%04x;size;%d\r\n", \
                ind->src_addr, \
                ind->clusterid, \
                ind->profileid, \
                aps_payload_size);
    
      for (zb_uint8_t i = 0; i < aps_payload_size; ++i)
      {
        CDB_PRINT(APP_ZB_DB_PRINT1, "aps_payload[%hd] == 0x%hx\r\n", i, aps_payload_ptr[i]);
      }
      return ZB_FALSE;
    }
    

    I don't understand the reason of this question since, as I wrote, I can see data_indication prints for other devices which have only HA profile. Anyway, I hope this can help you.

    Best regards

    Laura

  • For me can be useful also a callback that shows all packets sent on the network. Do you have a function like this?

    Since I believe that the callback registered through zb_af_set_data_indication() applies a filter that does not allow me to receive packets from this device.

    Best

    Laura

  • Hi Laura,

    Thank you for providing additional information. 

    Have you registered an endpoint handler of your device with ZB_AF_SET_ENDPOINT_HANDLER? If so, this could cause an issue such as this. Most endpoints created for our examples have HA profile set by default, and commands targeted to this endpoint with some custom profile will not be received. You can try to change the existing endpoint to use custom profile id or create a separate endpoint with custom profile id. Another possibility is to use the wildcard profile id for your custom profile id.

    Best regards,

    Marte

Reply
  • Hi Laura,

    Thank you for providing additional information. 

    Have you registered an endpoint handler of your device with ZB_AF_SET_ENDPOINT_HANDLER? If so, this could cause an issue such as this. Most endpoints created for our examples have HA profile set by default, and commands targeted to this endpoint with some custom profile will not be received. You can try to change the existing endpoint to use custom profile id or create a separate endpoint with custom profile id. Another possibility is to use the wildcard profile id for your custom profile id.

    Best regards,

    Marte

Children
Related