Hello @Janson
Hope you are doing well.
You can try the following:
Add the following portion of code inside APP_u16ZncWriteDataPattern in app_zcl_event_handler.c
case (E_ZCL_CSTRING):
{
uint8 size=*pu8Struct;
*( uint8 * ) pu8Data++ = *pu8Struct++;
memcpy(pu8Data,pu8Struct,size);
break;
}
Locate the following code inside APP_eSendWriteAttributesRequest in app_Znc_cmds.c:
u16offset += APP_u16ZncWriteDataPattern ( &pu8Data [ u16offset ],
pu8AttributeRequestList [ i + 2 ],
&pu8AttributeRequestList [ i + 3 ],
u16Size );
and add the following lines after that:
if (pu8AttributeRequestList[i+2]==E_ZCL_CSTRING)
break;
Try writing a 16 bytes (max) attribute data. Hope it helps.
Regards,
Eduardo.
Hi,
Please, wrap the content of the case in braces { }:
case (E_ZCL_CSTRING):
{
uint8 size=*pu8Struct;
*( uint8 * ) pu8Data++ = *pu8Struct++;
memcpy(pu8Data,pu8Struct,size);
break;
}
Regards,
Eduardo.
Hi,
Please, consider taking a look at the JN-UG-3132 ZigBee3 Cluster Library (from JN5189 SDK > docs > wireless > Zigbee), Chapter 3 ZCL Fundamentals and Features, Section 2.3 Accessing Attributes.
Regards,
Eduardo.