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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,246 次查看
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 解答
1,148 次查看
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 项奖励
回复
6 回复数
1,148 次查看
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

1,148 次查看
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 项奖励
回复
1,148 次查看
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

1,148 次查看
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 项奖励
回复
1,149 次查看
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 项奖励
回复
1,148 次查看
alan5_lin
Contributor III

Hi Mario,

Thanks a lot.