This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352P: Disable Coordinator Default Responses

Part Number: CC1352P
Other Parts Discussed in Thread: Z-STACK

Hello community,


We are working on an application to control Zigbee, using a CC1352 as a coordinator.


We have a Zigbee device to connect it to the coordinator, which during its initial configuration sends 2 messages that are automatically answered by the coordinator. Reply messages are different than they should be. Although these messages are sent automatically by the coordinator, we decided to forward them correctly to see if the end device takes the data it needs and is configured correctly. However, whenever we try to send these messages from the application, the coordinator or Linux server returns "Failure" and the message is not sent to the device.


Our doubts are:
-Can we deactivate these automatic response messages in any way and control them from the application, to ensure that they are sent correctly?
-Deactivating this, will allow us to send those messages and will not return "Failure"?

So that I can explain myself better, I leave you images of the messages

1- Read Attribute Response

Our environment

Original environment

2- Default Response

Our environment

Original environment

Best Regards,

Randy

  • Hi Randy,

    Please clarify, are you use a standalone Zigbee Coordinator or Zigbee Network Processor (ZNP) controlled by a Linux host application?  I'm also unsure as to what your use case intends to accomplish.  The Zstackapi_AfDataReq command contains parameter zstack_afDataReq_t -> zstack_TransOptions_t -> ackRequest which determines the APS ACK.  You can control the ZCL default response with AF_ACK_REQUEST from zcl_registerClusterOptionList, like in the Zigbee Fundamentals SLA.  Although one would typically want the "Disable Default Response" bit set in the ZCL of a Default Response message.

    Regards,
    Ryan

  • Hi, Ryan,
    To clarify, I am using the Z-Stack Linux server on a gateway. I need to connect ZigBee devices from a third party which mostly communicate via private cluster messaging and which are very sensitive to any message they do not receive as they would expect it.

    How can I make the Linux gateway respond to a Read Attributes Request for attribute Model Identifier with a custom string instead of unsupported?
    Another option is to disable these messages that are sent automatically, and create the message using the GW_SEND_ZCL_FRAME_REQ command to build the correct message that the device should receive. Is it possible ?
    BR,
    Randy
  • Hi Randy,

    Thank you for providing more information.  Can you please provide a sniffer log that demonstrates the Read Attribute Request?  Have you added the necessary cluster attribute records to the endpoint on the host ZCL application?  Community members have also provided advice for implementing manufacturer-specific clusters/attributes/commands into Z-Stack.

    Otherwise, it would be possible to modify zclProcessInReadCmd -> zcl_SendReadRsp -> zcl_SendCommand of zcl.c/h from your host application (I assume you've based from the ZIGBEE-LINUX-SENSOR-TO-CLOUD software solution) for your specific use.

    Regards,
    Ryan

  • Hi Ryan,

    About the private clusters we are quite fine. Our problem is actually a standard ZigBee message:

    The device sends a "Read Attributes Request" to the gateway asking for "Attribute 0x0005 Model Identifier". Currently our gateway (yes, it is the lower part of ZIGBEE-LINUX-SENSOR-TO-CLOUD, just with our own layer on tpo of the protobuf communication) answers with "0x86 Unsupported Attribute". Instead we would like it to answer with "0x42 ..." with ... being a custom string.

    Any idea where we can put this string in the server code?

    I also attach the trace

    3187.zigbee.rar

    Relevant packages:

    Current situation with Z-Stack Linux Gateway: 289, 291, 295, 303

    Third party solution: 109, 155

    BR,

    Randy

  • These are the logs Randy is referring to in his post.

    ZigBee sniffer logs.zip

  • Hi Randy, Peter,

    Thank you for providing the sniffer logs, however they only contain successful Read Attribute Responses.  Nevertheless my recommendation is to add your private cluster, attribute ID, and datatype to the gateway_config.tlg (please see the Z-Stack Linux Gateway Developer's Guide for more information) and use GW_WRITE_DEVICE_ATTRIBUTE_REQ from your host application to write the attribute value that you want to be read (refer to the Z-Stack Linux Gateway API document).

    Regards,
    Ryan

  • Hi Ryan,

    I think there is some confusion as in the initial post Randy tried to combine two questions in one which did not really work out. So for the moment please ignore anything about "private clusters" and let us concentrate just on standard ZigBee. Actually the only packets of interesting are numbers 109 and 155 from "third party solution.cubx" which content I have also attached as a picture below.

    Our challenge is that end end device does send a Basic: Read Attributes to the coordinator and not vice versa. So the end device asks the coordinator for Attribute [0x0005] Model Identifier and we need to reply to this message with a Basic: Read Attributes Response containing a string as model identifier. If the device gets the string it expects, it will be happy, if not it will refuse talking to us.

    We have tried to work on that with gateway_config.tlg but, please correct me if wrong, in this we can configure the supported attributes which the coordinator uses for the gateway, not those which and end device can request from the gateway. If this also applies to the opposite direction: where I am supposed to configure the string which will be used for the answer?

    Request send by the end device to the coordinator:

    Desired answer from the coordinator to the end device:

    I hope this is more clear now.

    Regards
    Peter

  • Hi Peter,

    I understand your request and am suggesting that you initialize the attribute inside gateway_config.tlg:

    attr Basic_ModelIdentifier { 0x0000, 0x0005, charstr, 8, rdwr }

    Followed by calling GW_WRITE_DEVICE_ATTRIBUTE_REQ from the gateway application for a local attribute.  You can reference attribute_engine.c/h and the previously mentioned resources.

    Regards,
    Ryan

  • Thank you Ryan for your suggestion. Now the server will not reply anymore "unsupported" but with an empty string. However I could not find where to put that string within the code. Do you have any hint for me?
    BR,
    Randy
  • Hey Randy,

    I'm glad to hear that you are making progress.  The Z-Stack Linux Gateway API document covers run-time attribute changes.  I am not too familiar with the .tlg file which determines the build-time configuration, but its attributes should be capable of configurating after being allocated after the EP is parsed by serverep.c

    Regards,
    Ryan

  • You can try to add a variable srvAttrModelIdentifier with the value you want in serverep.c. Then, add the attribute to gsSrvDefaultZclAttrRecs[] and assign srvAttrModelIdentifier into gsSrvDefaultAttrPtrs[] to make this. You can try to refer to srvAttrOnOff and srvAttrIdentifyTime implementation in serverep.c.

  • Dear YK,

    Thank you so much for your great hint. However my problem is that I still get an empty string as response to the request. Maybe you have an idea what I could have done wrong.

    @@ -309,6 +309,7 @@ CONST int giSrvNumNameValuePairs = sizeof(gaSrvNameValuePairs) / sizeof(srvNameV
     // ZCL Gateway Attributes
     uint8 srvAttrOnOff = 0;
     uint16 srvAttrIdentifyTime = 0;
    +char srvAttrModelIdentifier[8] = "";
    
     
    
     char gszConfigTlgPath[MAX_CONFIG_STRING_LEN] = "";
    
     
    
    @@ -335,6 +336,16 @@ zclAttrRec_t gsSrvDefaultZclAttrRecs[] =
           (ACCESS_CONTROL_READ | ACCESS_CONTROL_WRITE),
           NULL
         }
    +  },
    +
    +  {
    +    ZCL_CLUSTER_ID_GEN_BASIC,
    +    {  // Attribute record
    +      ATTRID_BASIC_MODEL_ID,
    +      ZCL_DATATYPE_CHAR_STR,
    +      (ACCESS_CONTROL_READ | ACCESS_CONTROL_WRITE),
    +      "SAU2AG1"
    +    }
       }
     };
    
     
    
    @@ -343,7 +354,8 @@ zclAttrRec_t gsSrvDefaultZclAttrRecs[] =
     void * gsSrvDefaultAttrPtrs[] =
     {
       &srvAttrOnOff,
    -  &srvAttrIdentifyTime
    +  &srvAttrIdentifyTime,
    +  &srvAttrModelIdentifier
     };

    Thank you so much in advance.

    Regards
    Randy

  • Shouldn’t you give value in srvAttrModelIdentifier[8]?

  • Hi YK and Ryan, Thank you very much for the help, we were able to solve the problem by following your advice.

    BR,

    Randy