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

Unable to use API calls "zb_zcl_put_default_reporting_info" from zboss_api_zcl.h

Hi ,

I have made basic binary sensor based on light bulb project,

wanted to add default BIND-TO-Gateway ( Short address 0x000). Gateway is CLI_AGENT .

I am try to add a default bind in for ZR+ZED project ( Light Bulb ) .

using reference from this ticket

 https://devzone.nordicsemi.com/f/nordic-q-a/48175/how-to-configure-attribute-changes-notifications-on-binding-zigbee?ReplyFilter=Answers&ReplySortBy=Answers&ReplySortOrder=Descending

i get compilation generates linker error 

In file included from ../../../../../../../external/zboss/include/zboss_api.h:47,
1>                  from D:\nRF52840_DK\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\components\zigbee\common\zigbee_helpers.h:46,
1>                  from D:\nRF52840_DK\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\components\zigbee\common\zigbee_logger_eprxzcl.c:48:
1> ../../../../../../../external/zboss/include/zboss_api_internal.h:418:5: note: offset of packed bit-field 'age' has changed in GCC 4.4
1> ../../../../../../../external/zboss/include/zboss_api_internal.h:429:1: note: offset of packed bit-field 'transmit_failure_cnt' has changed in GCC 4.4
1> Generating linker script ‘zigbee_light_bulb_pca10056.ld’
1> Linking zigbee_light_bulb_pca10056.elf
1> D:/nRF52840_DK/segger/gcc/arm-none-eabi/bin/ld: Output/Debug/Obj/zigbee_light_bulb_pca10056/main.o: in function `configure_reporting_locally':
1> D:\nRF52840_DK\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\examples\zigbee\light_control\light_bulb/main.c:597: undefined reference to `zb_zcl_remove_default_reporting_info'
Build failed

Tried to add the same function void configure_reporting_locally(void)  to unmodified LIGHTBULB project  with same error .

just out of curiosity i checked other api calls from same header file   

D:\nRF52840_DK\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\external\zboss\include\zboss_api_zcl.h

specifically following within the the ZB_ZCL_DISABLE_REPORTING define .

-------

#if !(defined ZB_ZCL_DISABLE_REPORTING)

void zb_zcl_adjust_reporting_timer(zb_uint8_t param);

void zb_zcl_update_reporting_info(zb_zcl_reporting_info_t *rep_info);

zb_ret_t zb_zcl_put_default_reporting_info(zb_zcl_reporting_info_t* default_rep_info_ptr);

void zb_zcl_remove_default_reporting_info(zb_uint16_t cluster_id, zb_uint8_t cluster_role);

void zb_zcl_mark_report_not_sent(zb_zcl_reporting_info_t *rep_info);

#endif

-------  

//-----can compile and link ok ----
//zb_zcl_adjust_reporting_timer((zb_uint8_t) 10);
//-----can compile and link ok -----
//zb_zcl_update_reporting_info(&rep_info);

// !!!! linker error !!!!!
//
zb_zcl_remove_default_reporting_info(ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL, ZB_ZCL_CLUSTER_SERVER_ROLE);
// !!!! linker error !!!!!
//
zb_zcl_put_default_reporting_info(&rep_info);

// -----can compile and link ok ----- 
//
zb_zcl_mark_report_not_sent(&rep_info);

First 2 function if used in the project will compile and link correctly , next two if used cannot compile the project .  

are their any alternative to these function calls !

Thanks and regards

Parents Reply Children
  • hi,

    if i used the new  api got error ,   

    I cannot see the binding table entry when I query the device from cli command  

    zdo mgmt_bind 0x0A0B  

    <error> app: ERROR 28 [RET_NOT_FOUND] at D:\nRF52840_DK\nRF5_SDK_for_Th
    read_and_Zigbee_v4.1.0_32ce5f8\MyExamples\zigbee\experimental\my_binary_sensor\m
    ain.c:459

    void configure_reporting_locally(void)
    {
      zb_ret_t zb_err_code;
      zb_zcl_reporting_info_t rep_info;
      memset(&rep_info, 0, sizeof(rep_info));
    
      rep_info.direction      = ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT;
      rep_info.ep             = SIMPLE_SENSOR_ENDPOINT;
      rep_info.cluster_id     = ZB_ZCL_CLUSTER_ID_BINARY_INPUT;
      rep_info.cluster_role   = ZB_ZCL_CLUSTER_SERVER_ROLE;
      rep_info.attr_id        = ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID;
      rep_info.dst.profile_id = ZB_AF_HA_PROFILE_ID;
    
      rep_info.u.send_info.min_interval = 0 ;     //
      rep_info.u.send_info.max_interval = 0xFFFF; //
      rep_info.u.send_info.delta.u8     = 1 ;     //
    
      /* Cordinators discription
         src_addr=0x0000 ep=64 profile_id=0x0104 
         app_dev_id=0x5 app_dev_ver=0x0 
         in_clusters=0x0000, 0x0003 
         out_clusters=0x0000, 0x0003, 0x0004 .
       */
    
      rep_info.dst.short_addr = 0x0000 ; //Hex 
      rep_info.dst.endpoint   = 64 ;     //Decimal 
      rep_info.dst.profile_id = ZB_AF_HA_PROFILE_ID ;
    
      zb_err_code = zb_zcl_put_reporting_info(&rep_info,ZB_TRUE);
      if (zb_err_code != RET_OK) 
      {
        ZB_ERROR_CHECK(zb_err_code);
      }
    } 

    what is the return value for this api ?

    How to use this API to add a local binding table entry with report on value change to 0x0000 ep 0x64.

    please share some example  

    Thanks and regards 

Related