Manufacturer Specific Attributes

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

Manufacturer Specific Attributes

Jump to solution
1,379 Views
cj_veeneman
Contributor II

Good day!

I have implemented some manufacturer specific attributes according to:
ZigBee Cluster Library (for ZigBee 3.0) User Guide / Appenix E.1

I am attempting to add a configuration variable in the OnOff cluster that will modify OnOff behaviours.

 

zcl_options.h 

#define CLD_ONOFF_ATTR_MAN_SPEC // "enable manufacturer specific attribute(s)
#define CLD_ONOFF_ATTR_MAN_SPEC_CONFIG
#define E_CLD_ONOFF_ATTR_ID_MAN_SPEC_CONFIG 0x10 // attribute ID

OnOff.h

/* On/Off Cluster */
typedef struct
{
...
#ifdef CLD_ONOFF_ATTR_MAN_SPEC_CONFIG
   zuint16 u16Config;
#endif

} tsCLD_OnOff;

OnOff.c


const tsZCL_AttributeDefinition asCLD_OnOffClusterAttributeDefinitions[] = {
...


#ifdef CLD_ONOFF_ATTR_MAN_SPEC_CONFIG
{E_CLD_ONOFF_ATTR_ID_MAN_SPEC_CONFIG, (E_ZCL_AF_RD|E_ZCL_AF_WR|E_ZCL_AF_MS), E_ZCL_UINT16, (uint32)(&((tsCLD_OnOff*)(0))->u16Config),0},
#endif

};

app_zcl_task.c

PRIVATE void APP_vZCL_DeviceSpecific_Init( uint8_t type )
{
...

#ifdef CLD_ONOFF_ATTR_MAN_SPEC_CONFIG
  sBaseDevice.sOnOffServerCluster.u16Config = 0x00;
#endif

}

When I attempt to write a value of 0x03 to Attribute 0x10 of Cluster 0x0006, I see the following error(s):

BDB: APP_vGenCallback [1 1] Pass to ZCL
ZCL_Task endpoint event:1 WRITE Individual attribute for Cluster = 6
AttributeDataType = 255 u16AttributeEnum = 16 eAttributeStatus = 134
EP EVT: Write Individual Attribute Status 00
EP EVT: Write Attributes

AttributeDataType = 255 - is unknown (should be uint16 / 0x21)
u16AttributeEnum = 16 / 0x10 - correct
eAttributeStatus = 134 / 0x86 - E_ZCL_CMDS_UNSUPPORTED_ATTRIBUTE

I'm not sure where I've gone wrong.

Appendix E.1.4 states:

"Add the new attribute to the source (.c) file for the cluster, being careful to add the attribute in the correct sequential position" ...

This is unclear to me.  I've positioned it directly after the mandatory attributes (OFF/ON/TOGGLE) and chose 0x10 as it's > 2 < 0x40 (E_CLD_ONOFF_CMD_OFF_EFFECT) ... 

Attached are grabs of the command and reply from wireshark.

Best regards, and thank you in advance.

Labels (1)
0 Kudos
1 Solution
1,348 Views
cj_veeneman
Contributor II

Hello Mario, thank you for your reply.

I am using AN-1217 v1005.

CLD_ONOFF_ATTR_MAN_SPEC_CONFIG == 0x4004  (I changed it from 0x10)

Turns out the fault was with the output cluster (client) on the remote end.  I had noticed that the manufacturer specific bit was not set and by adding the manufacturer code to the client side I was able to get it working.  My implementation was correct all along.
(what a headache)  But thanks for your reply, I it prompted me to look elsewhere.

Best regards,
Chris

View solution in original post

0 Kudos
2 Replies
1,349 Views
cj_veeneman
Contributor II

Hello Mario, thank you for your reply.

I am using AN-1217 v1005.

CLD_ONOFF_ATTR_MAN_SPEC_CONFIG == 0x4004  (I changed it from 0x10)

Turns out the fault was with the output cluster (client) on the remote end.  I had noticed that the manufacturer specific bit was not set and by adding the manufacturer code to the client side I was able to get it working.  My implementation was correct all along.
(what a headache)  But thanks for your reply, I it prompted me to look elsewhere.

Best regards,
Chris

0 Kudos
1,356 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

I hope you are doing great.

What is the AN that you are adding the Manufacturer Specific Attributes

What is the code that you are assigning to the CLD_ONOFF_ATTR_MAN_SPEC_CONFIG?

Did you try to read out the attribute value?

Regards,

Mario

0 Kudos