Hello,
I have this function, in the End Device SDK Example of MCUXpresso, to send a dummy write attribute command to a custom attributes arleady created in another node in the network with that Short Address:
BDB_teStatus APP_sendData(bool bWriteAttResponse){
BDB_teStatus eStatus;
if ((sNodeState.eNodeState == E_RUNNING) && (bFailToJoinNode == FALSE))
{
tsZCL_Address sAddress;
sAddress.eAddressMode = E_ZCL_AM_SHORT;
sAddress.uAddress.u16DestinationAddress = 0xAED9;
uint16 u16ClusterId = 0x0b04;
uint16 u16ManId = 0x1037;
uint8 u8SourceEndpoint = 1;
uint8 u8DestEndpoint = 1;
uint8 bServerToClient = FALSE;
uint8 u8SeqNum;
uint8 bManSpecific = TRUE;
uint8 u8NumbAttributes = 2;
uint8 u8ZCLPayload1[] = {0x12, 0x34};
uint8 u8ZCLPayload2[] = {0x56, 0x78};
tsZCL_WriteAttributeRecord pu16AttributeRequestList[2];
pu16AttributeRequestList[0].eAttributeDataType = E_ZCL_INT16;
pu16AttributeRequestList[0].u16AttributeEnum = 0x0b00;
pu16AttributeRequestList[0].pu8AttributeData = u8ZCLPayload1;
pu16AttributeRequestList[1].eAttributeDataType = E_ZCL_INT16;
pu16AttributeRequestList[1].u16AttributeEnum = 0x0a00;
pu16AttributeRequestList[1].pu8AttributeData = u8ZCLPayload2;
if(bWriteAttResponse){
eStatus = eZCL_SendWriteAttributesRequest (u8SourceEndpoint,
u8DestEndpoint,
u16ClusterId,
bServerToClient,
&sAddress,
&u8SeqNum,
u8NumbAttributes,
bManSpecific,
u16ManId,
pu16AttributeRequestList);
}else{
eStatus = eZCL_SendWriteAttributesNoResponseRequest (u8SourceEndpoint,
u8DestEndpoint,
u16ClusterId,
bServerToClient,
&sAddress,
&u8SeqNum,
u8NumbAttributes,
bManSpecific,
u16ManId,
pu16AttributeRequestList);
}
}else{
}
return eStatus;
}
It works fine when I call the function from the button pressed case in the end device task:

as sniffer tool shows:

But if i send the same command from my custom task:
Creating the taks:

Sending from the Custom Task:

It doesn't work anymore and event triggers the watchdog.
What am I missing or which is the correct way to do this??
Thanks