[JN-SW-4170] Which API is for "Read Attributes" Response?

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

[JN-SW-4170] Which API is for "Read Attributes" Response?

Jump to solution
1,019 Views
alan5_lin
Contributor III

Dear Sirs,

According to Chapter 2.2.1.1 of JN-UG-3103 ("Reading a Set of Attributes of a Remote Cluster"), the Destination Node will send "Read Attributes" response to the Source Node.

Where can I find the .c file which handling the response action?

Thanks!

1 Solution
921 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alan,

Please look at the Application Note: JN-AN-1216 Document A.2. Message Characteristics.

The PDF explains how is the packet is formed, so you could look at the B.1. Common Commandsthat described with the message description.

Regards,

Mario

View solution in original post

0 Kudos
Reply
6 Replies
921 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alan,

I hope you are doing great.

Please look at the APP_ZCL_cbEndpointCallback in the app_zcl_event_handler.c file.

 case E_ZCL_CBET_READ_INDIVIDUAL_ATTRIBUTE_RESPONSE:

You will find how the attribute response is handled, and the function is reading out the attribute response.

            if((psEvent->eEventType == E_ZCL_CBET_READ_INDIVIDUAL_ATTRIBUTE_RESPONSE))
                vSL_WriteMessage ( E_SL_MSG_READ_ATTRIBUTE_RESPONSE,
                                   u16Length,
                                   au8LinkTxBuffer );

Regards,

Mario

921 Views
alan5_lin
Contributor III

Dear Mario,

Thanks for your information. It seems behavior on Gateway Node.

How about on Device Node?

Where can I find the .c file which writing the attribute payload into response packet on Device Node?

Thanks!

0 Kudos
Reply
921 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alan,

It is the same, look at the APP_ZCL_cbEndpointCallback function. For example the JN-AN-1219 app_zcl_switch_task.c  file.

        case E_ZCL_CBET_READ_INDIVIDUAL_ATTRIBUTE_RESPONSE:
            DBG_vPrintf(TRACE_SWITCH_TASK, " Read Attrib Rsp %d %02x\n", psEvent->uMessage.sIndividualAttributeResponse.eAttributeStatus,
                *((uint8*)psEvent->uMessage.sIndividualAttributeResponse.pvAttributeData));
            break;

Regards,

Mario

921 Views
alan5_lin
Contributor III

Hi Mario,

I run ZGWUI tool to read attribute of a device node based on JN-AN-1218. Captured picture as below:

ZGWUI_ReadAttrib.jpg

I am interesting in the packet data marked with red block.

Which .c file build up this response packet on Device Node?

How to interpret this packet byte-by-byte?

Thanks!

0 Kudos
Reply
922 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alan,

Please look at the Application Note: JN-AN-1216 Document A.2. Message Characteristics.

The PDF explains how is the packet is formed, so you could look at the B.1. Common Commandsthat described with the message description.

Regards,

Mario

0 Kudos
Reply
921 Views
alan5_lin
Contributor III

Hi Mario,

Thanks a lot.