How to read endddvice's attribute value

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

How to read endddvice's attribute value

761 Views
18341265598
Contributor II

hello everyone:

    The SDK I used is jn-sw-4168, and the Application Template I used is ZigBee PRO Application Template for JN516x (jn-an-1184). Now, at the coordinate end, send data to the enddevice end through ZPS_eAplAfUnicastAckDataReq interface,and receive data normally at the enddevice.But while reading enddevice's custom attribute data with eZCL_SendReadAttributesRequest interface did not return the data, and no generation E_ZCL_CBET_READ_INDIVIDUAL_ATTRIBUTE_RESPONSE or E_ZCL_CBET_READ_ATTRIBUTES_RESPONSE events

The function that reads the attribute data is (at coordinate) :

pastedImage_2.png

The services on the enddevice side are my own defined and register.

 

The log information at coordinator is :

pastedImage_5.png

the log information at enddevice is : 

pastedImage_4.png

Could you please tell me what caused the failure of my above operation?

Where is the relevant demo code?

Attached is my code, thank you!

0 Kudos
3 Replies

574 Views
ovidiu_usturoi
NXP Employee
NXP Employee

Hi, 

From your code seems that you added a custom cluster with Id = 0x1234. Is this cluster set accordingly on the remote device (like server or client functionality,  endpoint ...)? Also a sniffer capture will be useful for this scenario.

My recommendation is to check the read attribute command for a common cluster (let say Basic Cluster = 0x0000) and if it is working for this, means that you have a problem in setting the new cluster on the remote device.

Regards,

Ovidiu 

0 Kudos

574 Views
18341265598
Contributor II

This is my read attribute log (at coordinate):

pastedImage_2.png

This is my read attribute log (at router):

pastedImage_1.png

this is my code:

pastedImage_3.png

pastedImage_4.png

my sdk is JN-SW-4170,my app template is JN-AN-1217-Zigbee-3-0-Base-Device

thanks!!

0 Kudos

574 Views
18341265598
Contributor II

1. Do I need to perform service discovery operations before I can read and write attributes?

2. Any demo related to reading and writing?

0 Kudos