Some Endpoints (id>2) not getting commands sent to Endpoint 255 and group address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Some Endpoints (id>2) not getting commands sent to Endpoint 255 and group address

4,279 Views
dmsherazi
Contributor IV

I am adding few more endoints to the JN-AN-1247 Control bridge for zigbee 3.0 based on JN5189. 

I am adding ON/OFF Light on the three endpoints 2,3,4 , keeping the 1st endpoint as control bridge.

I would be using the control bridge as a Full_Function_Router device. 

Everything so far is OK except that when I send any command using group id or  Broadcast EP 255  the Endpoint above 2 doesnt recieve it!

So an ON command to EP 255  will result in switiing ON on Ep 1and 2 but not on 3 or 4. Strangely when sent to EP 3 or 4 it will switch on the relevant Light. I am not sure where is the issue and how to get its cause.

 

What I have done so far 

  1. Took AN-JN-1247 as initial device
  2. Configured the ControlBridge_Full.zpscfg to add the new endpoints with input and output clutsres as below
    dostshah_0-1675670205419.png
  3. Modified the Zcl_options.h to reflect the above
Spoiler
/*****************************************************************************
 *
 * MODULE:             ControlBridge
 *
 * COMPONENT:          zcl_options.h
 *
 * AUTHOR:             Faisal Bhaiyat
 *
 * DESCRIPTION:        Options Header for ZigBee Cluster Library functions
 *
 * $HeadURL: https://www.collabnet.nxp.com/svn/lprf_sware/Projects/Zigbee%20Protocol%20Stack/ZPS/Trunk/ControlBridge/Source/ControlBridge/zcl_options.h $
 *
 * $Revision: 54776 $
 *
 * $LastChangedBy: nxp29741 $
 *
 * $LastChangedDate: 2013-06-20 11:50:33 +0100 (Thu, 20 Jun 2013) $
 *
 * $Id: zcl_options.h 54776 2013-06-20 10:50:33Z nxp29741 $
 *
 ****************************************************************************
 *
 * This software is owned by NXP B.V. and/or its supplier and is protected
 * under applicable copyright laws. All rights are reserved. We grant You,
 * and any third parties, a license to use this software solely and
 * exclusively on NXP products [NXP Microcontrollers such as JN5168, JN5164,
 * JN5161, JN5148, JN5142, JN5139].
 * You, and any third parties must reproduce the copyright and warranty notice
 * and any other legend of ownership on each copy or partial copy of the
 * software.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * Copyright NXP B.V. 2012. All rights reserved
 *
 ***************************************************************************/

#ifndef ZCL_OPTIONS_H
#define ZCL_OPTIONS_H

#include <jendefs.h>

/****************************************************************************/
/***        Macro Definitions                                             ***/
/****************************************************************************/
#define ZCL_ALLOW_WILD_CARD_PROFILE
#define CLD_BAS_CMD_RESET_TO_FACTORY_DEFAULTS

/* Set this True to disable non error default responses from clusters */
#define ZCL_DISABLE_DEFAULT_RESPONSES                      (TRUE)
#define ZCL_DISABLE_APS_ACK                                (FALSE)
#define OTA_ACKS_ON                                        (FALSE)
#define OTA_CLIENT_DISABLE_DEFAULT_RESPONSE                (TRUE)




// Total number of group addresses required by all sub-device endpoints on the device
#define GROUPS_REQUIRED                                     ( 16 )
#define CLD_GROUPS_MAX_NUMBER_OF_GROUPS                     ( 16  )
/* Sets the number of endpoints that will be created by the ZCL library */
#define ZCL_NUMBER_OF_ENDPOINTS                             ( 5 )
#define ZCL_NUMBER_DEVICES                                  ( 5 )
#define ZLO_NUMBER_DEVICES                                  (5)

#define ZCL_MANUFACTURER_CODE                               ( 0x1037 )
#define APPLICATION_DEVICE_VERSION                               ( 2 )

/* For GP proxy cluster*/
#define ZCL_NUMBER_OF_APPLICATION_TIMERS                    ( 5 )

#define TL_LEGACY_PROFILE_ID                                ( 0xc05e )
#define TL_LEGACY_DEVICE_ID                                 ( 0x0840 )
#define TL_LEGACY_VERSION_ID                                ( 2 )
#define ZCL_ATTRIBUTE_DISCOVERY_SERVER_SUPPORTED
#define ZCL_ATTRIBUTE_DISCOVERY_CLIENT_SUPPORTED

#define ZCL_ATTRIBUTE_DISCOVERY_EXTENDED_SERVER_SUPPORTED
#define ZCL_ATTRIBUTE_DISCOVERY_EXTENDED_CLIENT_SUPPORTED

#define ZCL_COMMAND_DISCOVERY_SUPPORTED
#define ZCL_COMMAND_RECEIVED_DISCOVERY_SERVER_SUPPORTED
#define ZCL_COMMAND_RECEIVED_DISCOVERY_CLIENT_SUPPORTED
#define ZCL_COMMAND_GENERATED_DISCOVERY_SERVER_SUPPORTED
#define ZCL_COMMAND_GENERATED_DISCOVERY_CLIENT_SUPPORTED

/* Clusters used by this application */
#define CLD_BASIC
#define BASIC_SERVER
#define BASIC_CLIENT

#ifdef FULL_FUNC_DEVICE
#define CLD_ZLL_COMMISSION
#define ZLL_COMMISSION_CLIENT
#define ZLL_COMMISSION_SERVER
#define CLD_ZLL_UTILITY
#define ZLL_UTILITY_SERVER
#define ZLL_UTILITY_CLIENT
#endif


#define CLD_IDENTIFY
#define CLD_IDENTIFY_CMD_TRIGGER_EFFECT
#define IDENTIFY_CLIENT
#define IDENTIFY_SERVER
#define CLD_IDENTIFY_TICKS_PER_SECOND   10
#define CLD_IDENTIFY_SUPPORT_ZLL_ENHANCED_COMMANDS

#define CLD_GROUPS
#define GROUPS_CLIENT
#define GROUPS_SERVER

#define CLD_ONOFF
#define CLD_ONOFF_CMD_OFF_WITH_EFFECT
#define CLD_ONOFF_CMD_ON_WITH_TIMED_OFF
#define ONOFF_CLIENT

#define ONOFF_SERVER
#define CLD_ONOFF_SUPPORT_ZLL_ENHANCED_COMMANDS

#define CLD_LEVEL_CONTROL
#define LEVEL_CONTROL_CLIENT
#define CLD_LEVELCONTROL_TICKS_PER_SECOND                   10

#define CLD_SCENES
#define SCENES_CLIENT

#define CLD_COLOUR_CONTROL
#define COLOUR_CONTROL_CLIENT

#define CLD_IASZONE
#define IASZONE_CLIENT

#define CLD_SIMPLE_METERING
#define SM_CLIENT

#define CLD_DIAGNOSTICS
#define DIAGNOSTICS_CLIENT
#define CLD_DIAGNOSTICS_ATTR_ID_AVERAGE_MAC_RETRY_PER_APS_MESSAGE_SENT
#define CLD_DIAGNOSTICS_ATTR_ID_LAST_MESSAGE_LQI
#define CLD_DIAGNOSTICS_ATTR_ID_LAST_MESSAGE_RSSI


#define CLD_OTA
#define OTA_SERVER
#define OTA_MAX_BLOCK_SIZE                                    64
#define OTA_TIME_INTERVAL_BETWEEN_RETRIES                     5
#define OTA_MAX_IMAGES_PER_ENDPOINT                           1
#define OTA_CLD_ATTR_CURRENT_FILE_VERSION
#define OTA_MAX_CO_PROCESSOR_IMAGES                           1

#define NUM_ENDPOINT_RECORDS                                  20
#define NUM_GROUP_RECORDS                                     16

/* Enable reports to be configured on remote servers and responses to be received */
#define ZCL_CONFIGURE_ATTRIBUTE_REPORTING_CLIENT_SUPPORTED
#define ZCL_ATTRIBUTE_REPORTING_CLIENT_SUPPORTED
#define ZCL_READ_ATTRIBUTE_REPORTING_CONFIGURATION_CLIENT_SUPPORTED

/****************************************************************************/
/*             Basic Cluster - Optional Attributes                          */
/*                                                                          */
/* Add the following #define's to your zcl_options.h file to add optional   */
/* attributes to the basic cluster.                                         */
/****************************************************************************/

#define ZCL_ATTRIBUTE_READ_SERVER_SUPPORTED
#define ZCL_ATTRIBUTE_READ_CLIENT_SUPPORTED
#define ZCL_ATTRIBUTE_WRITE_SERVER_SUPPORTED
#define ZCL_ATTRIBUTE_WRITE_CLIENT_SUPPORTED


//#define   CLD_BAS_ATTR_LOCATION_DESCRIPTION
//#define   CLD_BAS_ATTR_PHYSICAL_ENVIRONMENT
//#define   CLD_BAS_ATTR_DEVICE_ENBLED
//#define   CLD_BAS_ATTR_ALARM_MASK

#define CLD_BAS_ATTR_APPLICATION_VERSION
#define CLD_BAS_ATTR_STACK_VERSION
#define CLD_BAS_ATTR_HARDWARE_VERSION
#define CLD_BAS_ATTR_MANUFACTURER_NAME
#define CLD_BAS_ATTR_MODEL_IDENTIFIER
#define CLD_BAS_ATTR_DATE_CODE
#define CLD_BAS_ATTR_SW_BUILD_ID
#define CLD_BAS_ATTR_CONFIG_MODEL_IDENTIFIER

#define CLD_BAS_APP_VERSION             (1)
#define CLD_BAS_STACK_VERSION           (1)
#define CLD_BAS_HARDWARE_VERSION        (1)
#define CLD_BAS_MANUF_NAME_SIZE         (3)
#define CLD_BAS_MODEL_ID_SIZE           (17)
#define CLD_BAS_DATE_SIZE               (8)
#define CLD_BAS_POWER_SOURCE            E_CLD_BAS_PS_BATTERY
#define CLD_BAS_SW_BUILD_SIZE           (9)
#define CLD_BAS_CONFIG_MODEL_ID_SIZE    CLD_BAS_MODEL_ID_SIZE
/*
*//****************************************************************************//*
*//*             Green Power Cluster - Optional Attributes                 *//*
*//*                                                                          *//*
*//* Add the following #define's to your zcl_options.h file to add optional   *//*
*//* attributes to the Green Power cluster.                                          *//*
*//****************************************************************************//*
#ifdef  CLD_GREENPOWER
    #define GP_IEEE_ADDR_SUPPORT
    #define GREENPOWER_END_POINT_ID                 2
    #define GP_NUMBER_OF_TRANSLATION_TABLE_ENTRIES  5
    #define GP_NUMBER_OF_PROXY_SINK_TABLE_ENTRIES       5
    #define CLD_GP_ATTR_ZGPS_COMMISSIONING_WINDOW
    #define CLD_GP_ATTR_ZGP_SHARED_SECURITY_KEY_TYPE
    #define CLD_GP_ATTR_ZGP_SHARED_SECURITY_KEY
    #define CLD_GP_ATTR_ZGP_LINK_KEY
    *//* security level *//*
    #define GP_SECURITY_LEVEL E_GP_ENC_FULL_FC_FULL_MIC
    *//* Possible values are  E_GP_NO_KEY, E_GP_ZIGBEE_NWK_KEY, E_GP_ZGPD_GROUP_KEY,
        E_GP_NWK_KEY_DERIVED_ZGPD_GROUP_KEY, E_GP_OUT_OF_THE_BOX_ZGPD_KEY, E_GP_DERIVED_INDIVIDUAL_ZGPD_KEY*//*
    #define GP_KEYTPE              E_GP_ZGPD_GROUP_KEY
    #define GP_SHARED_KEY  { 0xC0 , 0xC1 , 0xC2 , 0xC3 , 0xC4 , 0xC5 , 0xC6 , 0xC7 , 0xC8 , 0xC9 , 0xCa , 0xCb , 0xCc , 0xCd , 0xCe , 0xCf}
#undef ZCL_NUMBER_OF_ENDPOINTS
#define ZCL_NUMBER_OF_ENDPOINTS                             2
#undef CLD_GROUPS_MAX_NUMBER_OF_GROUPS
#define CLD_GROUPS_MAX_NUMBER_OF_GROUPS                     4
#define GP_MAX_TRANS_ZB_CMD_PAYLOAD_LENGTH                   2
#endif*/

/****************************************************************************/
/*             Colour Control Cluster - Optional Attributes                 */
/*                                                                          */
/* Add the following #define's to your zcl_options.h file to add optional   */
/* attributes to the time cluster.                                          */
/****************************************************************************/

/*
 * Colour attributes, Optional in ZCL spec but Mandatory for ZLL
 */
/* Colour information attribute set attribute ID's (5.2.2.2.1) */

#define CLD_COLOURCONTROL_ATTR_CURRENT_HUE
#define CLD_COLOURCONTROL_ATTR_CURRENT_SATURATION
#define CLD_COLOURCONTROL_ATTR_REMAINING_TIME
#define CLD_COLOURCONTROL_ATTR_COLOUR_MODE
#define CLD_COLOURCONTROL_ATTR_COLOUR_TEMPERATURE

//#define  SCENES_SERVER
/* Defined Primaries Information attribute attribute ID's set (5.2.2.2.2) */
#define CLD_COLOURCONTROL_ATTR_NUMBER_OF_PRIMARIES  3

/* Enable Primary (n) X, Y and Intensity attributes */
#define CLD_COLOURCONTROL_ATTR_PRIMARY_1
#define CLD_COLOURCONTROL_ATTR_PRIMARY_2
#define CLD_COLOURCONTROL_ATTR_PRIMARY_3
#define CLD_COLOURCONTROL_ATTR_PRIMARY_4
#define CLD_COLOURCONTROL_ATTR_PRIMARY_5
#define CLD_COLOURCONTROL_ATTR_PRIMARY_6

/* ZLL enhanced attributes */
#define CLD_COLOURCONTROL_ATTR_ENHANCED_CURRENT_HUE
#define CLD_COLOURCONTROL_ATTR_ENHANCED_COLOUR_MODE
#define CLD_COLOURCONTROL_ATTR_COLOUR_LOOP_ACTIVE
#define CLD_COLOURCONTROL_ATTR_COLOUR_LOOP_DIRECTION
#define CLD_COLOURCONTROL_ATTR_COLOUR_LOOP_TIME
#define CLD_COLOURCONTROL_ATTR_COLOUR_LOOP_START_ENHANCED_HUE
#define CLD_COLOURCONTROL_ATTR_COLOUR_LOOP_STORED_ENHANCED_HUE

#define CLD_COLOURCONTROL_ATTR_COLOUR_CAPABILITIES
#define CLD_COLOURCONTROL_ATTR_COLOUR_TEMPERATURE_PHY_MIN
#define CLD_COLOURCONTROL_ATTR_COLOUR_TEMPERATURE_PHY_MAX
#define CLD_COLOURCONTROL_ATTR_COLOUR_TEMPERATURE_MIRED
/* Max & Min Limits for colour temperature */
#define CLD_COLOURCONTROL_COLOUR_TEMPERATURE_PHY_MIN    0x0001
#define CLD_COLOURCONTROL_COLOUR_TEMPERATURE_PHY_MAX    0xfef8

#define CLD_COLOURCONTROL_RED_X     (0.68)
#define CLD_COLOURCONTROL_RED_Y     (0.31)
#define CLD_COLOURCONTROL_GREEN_X   (0.11)
#define CLD_COLOURCONTROL_GREEN_Y   (0.82)
#define CLD_COLOURCONTROL_BLUE_X    (0.13)
#define CLD_COLOURCONTROL_BLUE_Y    (0.04)
#define CLD_COLOURCONTROL_WHITE_X   (0.33)
#define CLD_COLOURCONTROL_WHITE_Y   (0.33)


#define CLD_COLOURCONTROL_PRIMARY_1_X           CLD_COLOURCONTROL_RED_X
#define CLD_COLOURCONTROL_PRIMARY_1_Y           CLD_COLOURCONTROL_RED_Y
#define CLD_COLOURCONTROL_PRIMARY_1_INTENSITY   (254 / 3)

#define CLD_COLOURCONTROL_PRIMARY_2_X           CLD_COLOURCONTROL_GREEN_X
#define CLD_COLOURCONTROL_PRIMARY_2_Y           CLD_COLOURCONTROL_GREEN_Y
#define CLD_COLOURCONTROL_PRIMARY_2_INTENSITY   (254 / 3)

#define CLD_COLOURCONTROL_PRIMARY_3_X           CLD_COLOURCONTROL_BLUE_X
#define CLD_COLOURCONTROL_PRIMARY_3_Y           CLD_COLOURCONTROL_BLUE_Y
#define CLD_COLOURCONTROL_PRIMARY_3_INTENSITY   (254 / 3)

#define CLD_COLOURCONTROL_PRIMARY_4_X           (0)
#define CLD_COLOURCONTROL_PRIMARY_4_Y           (0)
#define CLD_COLOURCONTROL_PRIMARY_4_INTENSITY   (0xff)

#define CLD_COLOURCONTROL_PRIMARY_5_X           (0)
#define CLD_COLOURCONTROL_PRIMARY_5_Y           (0)
#define CLD_COLOURCONTROL_PRIMARY_5_INTENSITY   (0xff)

#define CLD_COLOURCONTROL_PRIMARY_6_X           (0)
#define CLD_COLOURCONTROL_PRIMARY_6_Y           (0)
#define CLD_COLOURCONTROL_PRIMARY_6_INTENSITY   (0xff)


#define  CLD_COLOUR_CONTROL_SUPPORT_ZLL_ENHANCED_COMMANDS
#define  CLD_COLOUR_CONTROL_SUPPORT_ZLL_COLOUR_TEMPERATURE_COMMANDS

/* ZLL attribute in on off cluster */
//#define CLD_ONOFF_ATTR_GLOBAL_SCENE_CONTROL
//#define CLD_ONOFF_ATTR_ON_TIME
//#define CLD_ONOFF_ATTR_OFF_WAIT_TIME

#define ZLL_DISABLE_DEFAULT_RESPONSES FALSE
/* WARNING -- Need to setup bugger apdus and fragmentation to enable ASC */
//#define CLD_ASC_LOG
#define CLD_DOOR_LOCK
#define DOOR_LOCK_CLIENT
#define CLD_THERMOSTAT
#define THERMOSTAT_CLIENT
#define CLD_TEMPERATURE_MEASUREMENT
#define TEMPERATURE_MEASUREMENT_CLIENT
#define CLD_RELATIVE_HUMIDITY_MEASUREMENT
#define RELATIVE_HUMIDITY_MEASUREMENT_CLIENT
#define CLD_ILLUMINANCE_MEASUREMENT
#define ILLUMINANCE_MEASUREMENT_CLIENT

//#define CLD_APPLIANCE_STATISTICS
//#define APPLIANCE_STATISTICS_SERVER
//#define APPLIANCE_STATISTICS_CLIENT
#define CLD_SM_ATTR_INSTANTANEOUS_DEMAND
/****************************************************************************/
/***        Type Definitions                                              ***/
/****************************************************************************/

/****************************************************************************/
/***        Exported Functions                                            ***/
/****************************************************************************/
PUBLIC void* psGetDeviceTable(void);
/****************************************************************************/
/***        External Variables                                            ***/
/****************************************************************************/

/****************************************************************************/
/***        END OF FILE                                                   ***/
/****************************************************************************/

#endif /* ZCL_OPTIONS_H */
​​

 

 

 

  • in app_zcl_event_handler
    1.  Add the on_off_light.h include.  
      #include "on_off_light.h"
    2. In event app_zcl_event_handler.c  did the following Initialize the tsCLD_ZllDeviceTable
      tsZLO_ControlBridgeDevice sControlBridge;
      tsZLO_OnOffLightDevice sOnOFFLight1;
      tsZLO_OnOffLightDevice sOnOFFLight2;
      tsZLO_OnOffLightDevice sOnOFFLight3;
      tsZLO_OnOffLightDevice sOnOFFLight4;

      tsCLD_ZllDeviceTable sDeviceTable = {ZLO_NUMBER_DEVICES,
      {{0,
      ZLO_PROFILE_ID,
      CONTROL_BRIDGE_DEVICE_ID,
      CONTROLBRIDGE_ZLO_ENDPOINT,
      APPLICATION_DEVICE_VERSION,
      GROUPS_REQUIRED,
      0
      },

      {0,
      ZLO_PROFILE_ID,
      ZLO_ON_OFF_LIGHT_DEVICE_ID,
      1,
      APPLICATION_DEVICE_VERSION,
      GROUPS_REQUIRED,
      0
      }, {0,
      ZLO_PROFILE_ID,
      ZLO_ON_OFF_LIGHT_DEVICE_ID,
      2,
      APPLICATION_DEVICE_VERSION,
      GROUPS_REQUIRED,
      0
      }, {0,
      ZLO_PROFILE_ID,
      ZLO_ON_OFF_LIGHT_DEVICE_ID,
      3,
      APPLICATION_DEVICE_VERSION,
      GROUPS_REQUIRED,
      0
      }, {0,
      ZLO_PROFILE_ID,
      ZLO_ON_OFF_LIGHT_DEVICE_ID,
      4,
      APPLICATION_DEVICE_VERSION,
      GROUPS_REQUIRED,
      0
      }
      }
      };
      APP_tsAplMacInstallCodeTable sMacInstallCodeTable;
      #ifdef FULL_FUNC_DEVICE
      tsZllEndpointInfoTable sEndpointTable;
      tsZllGroupInfoTable sGroupTable;
      #endif
    3.  Initialize the Endpoints and register them in APP_ZCL_vInitialise()
      /* Register Commission EndPoint */
      eZCL_Status = eApp_ZLO_RegisterEndpoint(&APP_ZCL_cbEndpointCallback);
      if (eZCL_Status != E_ZCL_SUCCESS) {
      vLog_Printf (TRACE_ZB_CONTROLBRIDGE_TASK, LOG_CRIT, "eApp_ZLO_RegisterEndpoint %x\n", eZCL_Status);
      vSL_LogFlush();
      }

      /* Register Light 1 EndPoint */
      eZCL_Status = eZLO_RegisterOnOffLightEndPoint(1,
      &APP_ZCL_cbEndpointCallback,
      &sOnOFFLight1);
      if (eZCL_Status != E_ZCL_SUCCESS) {
      DBG_vPrintf(TRUE, "\n Registering ce App_ZLO_RegisterEndpoint 1 light %xd \n", eZCL_Status);
      }

      /* Register Light 2 EndPoint */
      eZCL_Status = eZLO_RegisterOnOffLightEndPoint(2,
      &APP_ZCL_cbEndpointCallback,
      &sOnOFFLight2);
      if (eZCL_Status != E_ZCL_SUCCESS) {
      DBG_vPrintf(TRUE, "\n Registering ce App_ZLO_RegisterEndpoint 2 light %xd \n", eZCL_Status);
      }


      /* Register Light 3 EndPoint */
      eZCL_Status = eZLO_RegisterOnOffLightEndPoint(3,
      &APP_ZCL_cbEndpointCallback,
      &sOnOFFLight3);
      if (eZCL_Status != E_ZCL_SUCCESS) {
      DBG_vPrintf(TRUE, "\n Registering ce App_ZLO_RegisterEndpoint 3 light %xd \n", eZCL_Status);
      }

      eZCL_Status = eZLO_RegisterOnOffLightEndPoint(4,
      &APP_ZCL_cbEndpointCallback,
      &sOnOFFLight4);
      if (eZCL_Status != E_ZCL_SUCCESS) {
      DBG_vPrintf(TRUE, "\n Registering ce App_ZLO_RegisterEndpoint 4 light %xd \n", eZCL_Status);
      }


      sDeviceTable.asDeviceRecords[0].u64IEEEAddr = ZPS_u64NwkNibGetExtAddr(ZPS_pvAplZdoGetNwkHandle());
      sDeviceTable.asDeviceRecords[1].u64IEEEAddr = ZPS_u64NwkNibGetExtAddr(ZPS_pvAplZdoGetNwkHandle());
      sDeviceTable.asDeviceRecords[2].u64IEEEAddr = ZPS_u64NwkNibGetExtAddr(ZPS_pvAplZdoGetNwkHandle());
      sDeviceTable.asDeviceRecords[3].u64IEEEAddr = ZPS_u64NwkNibGetExtAddr(ZPS_pvAplZdoGetNwkHandle());

      vLog_Printf (TRACE_ZB_CONTROLBRIDGE_TASK, LOG_DEBUG, "\ntsCLD_Groups %d", sizeof(tsCLD_Groups));
      vLog_Printf (TRACE_ZB_CONTROLBRIDGE_TASK, LOG_DEBUG, "\ntsCLD_GroupTableEntry %d", sizeof(tsCLD_GroupTableEntry));
      vAPP_ZCL_DeviceSpecific_Init();

I am not able to understand why the 255 EP , and group commands dont work here?
Is there any code part in the JN-AN-1247 that is responsibble for this as normally the AN-JN-1247 has two endpoints  (control Bridge and the other GP)?

Can anyone point me to the entry point of / first  function that gets called as soon as the device gets any data related to zigbee commands in ZCL as well

0 Kudos
Reply
14 Replies

4,225 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @dmsherazi

Just to confirm, are you trying to perform a broadcast from one end point (Control Bridge) to several On/Off compatible devices (Lights)?

Could you please confirm that you have read [JN-UG-3131-ZigBee3-Devices] Section 1.4 Device Initialisation and Chapter 3 Lighting and Occupancy Device Types, Section 3.1 On/Off Light?

Also, could you please share your Light End Point properties?

Regards,
Eduardo.

0 Kudos
Reply

4,208 Views
dmsherazi
Contributor IV

 

Thanks for your response @EduardoZamora 

 

>> are you trying to perform a broadcast from one end point (Control Bridge) to several On/Off compatible devices (Lights)?


No. Sending to short/Nw address but selecting 255 as EP wont send command to the Light at EP 3 & 4. Ep 1 and 2 will recieve the command. When sending command to EP 3 and 4 by using destination EP as 3 or 4 will work.

Also when sending a command to group address. 3 & 4 wont get the command!

 

 

>>  Properties of ENDPOINTS

dostshah_1-1675926389782.png

 

 

dostshah_0-1675926339617.png

 

I am attaching the project files for you to check them. I am using the Full Fuction device Without GP  ControlBridge_Full.zpscfg

0 Kudos
Reply

4,195 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

I really appreciate the details.

My apologies, I am having a hard time understanding the scenario and trying to replicate this behavior. Could you please confirm if the following picture represents what you are testing?

EduardoZamora_0-1675966879300.png

Regards,
Eduardo.

 

0 Kudos
Reply

4,174 Views
dmsherazi
Contributor IV

The situation is like this . I have two devices . One loaded with ControlBridge App Note without modifications. This acts as cordinator as well as control bridge.

 

The second One has been modified in the sense that 4 ON/OFF Lights are added to it. One Light is added on Ep1 which has the controlbridge as well. and other lights are on Ep 2 , 3 and 4. This device is set to work as Router Control Bridge.

 

dmsherazi_0-1676185052013.png

 

Situation is like this. When I send any command to the Second CB from the first where destination EP is 255 , ideally All Four Lights should get the command and execute but only EP1 and Ep2 gets it. It should be noted that when I send the same comamnd to each endpoint individually the commands are recived.

 

Further more its worth mentioning that sending the command to broadcast endpoit on any other 3 or 4 gun light will work as expected

0 Kudos
Reply

4,155 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Are you using the ZGWUI tool to communicate with the Control Bridge + Lights device? If so, could you please share the log?

Also, would it be possible for you to catch this event with a sniffer? This information would be very helpful.

Regards,
Eduardo.

0 Kudos
Reply

4,134 Views
dmsherazi
Contributor IV


 HI @EduardoZamora :

For development purposes I am using the ZGWUI for both the controlbridge and the router with lights. 

I have  recorded a screencast showing the scenario.

The issue in short is that all endpoints (1,2,3&4) responds when I send command to a specified endpoint (where destination endpoint is 1,2,3 or 4). but when the destination endpoint is 255 (0xFF) in the command then only endpoint 1 and 2 will get that and not 3 & 4.


https://drive.google.com/file/d/1F7SniPYPbJbznODkKo0EAwKjxO70wP0R/preview 

0 Kudos
Reply

4,111 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Could you please try adding Basic cluster to the Light End Points? This cluster is mandatory for all ZigBee devices [JN-UG-3132 ZigBee3 Cluster Library, Chapter 8 Basic Cluster].

You can find mandatory clusters for each End Point in SDK folder > docs > wireless > Zigbee > JN-UG-3131 ZigBee3 Devices, Chapter 3 Lighting and Occupancy Device Types.

Regards,
Eduardo.

0 Kudos
Reply

4,062 Views
dmsherazi
Contributor IV
I already added it , and its the same - No improvemnets. Can you explain how the broadcast endpoint is handled at the stack level?
0 Kudos
Reply

3,946 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Please, take a look at JN-UG-3130 Zigbee3 Stack, Section 3.4 Application level concepts. Also, please consider reading the following information.

  • JN-UG-3130 Zigbee3 Stack, Section 6.2.2 Finding compatible endpoints.
  • JN-UG-3131 Zigbee3 Devices, Section 1.3 Shared Devices Structure, Figure 2. Please, take a look at the entire Chapter 1 of this User Guide.
  • JN-UG-3132 Zigbee3 Cluster Library, Section 2.3 Accessing Attributes.

I apologize for insisting, but would it be possible for you to capture this event with a sniffer? This information would be very helpful.

Regards,
Eduardo.

0 Kudos
Reply

3,873 Views
dmsherazi
Contributor IV

I tried to use the KPAA utility with wireshark here are the sniffed packets. When I send a toggle command to EP255 only 1 and 2 gets it and 3 doesnt 

 

I have gon through these chapters that you mentioned and couldnt still solve the issue.

I found that eZCL_SearchForClusterEntry() gives E_ZCL_ERR_CLUSTER_NOT_FOUND. I found that when I was trying to send an on/off command from this device.

Although as mentioned above the clusters are added in .zpcfg file. and the endpoint is registered uising the eZLO_RegisterOnOffLightEndPoint functionon ep 1,2,3,4 so why would the serach for cluster on the endpoints fail? is there any other step to register /add the cluster on the endpoint?

 

@EduardoZamora  I aslo came accorss PRIVATE bool_t g_bIgnoreBroadcast [ 1 ] = {TRUE,}; in the zps_gen.c but couldnt find any resource explaining it. Can you please explain that variable as well

0 Kudos
Reply

3,805 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi @dmsherazi

I truly apologize for the delay on my response.

I am still checking this issue. Please give me some time and I will reply to you as soon as possible.

Regards,
Eduardo.

3,821 Views
dmsherazi
Contributor IV

@EduardoZamora Kindly look at this please!

0 Kudos
Reply

3,586 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @dmsherazi,

This case will be followed in the internal ticket.

Regards,
Eduardo.

0 Kudos
Reply

4,259 Views
dmsherazi
Contributor IV

@EduardoZamora  
@mario_castaneda 

Please Help!

0 Kudos
Reply