KW41Z ZigBee Questions/msg transfer/code analysis

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

KW41Z ZigBee Questions/msg transfer/code analysis

跳至解决方案
1,236 次查看
gustcool2
Contributor II

Hi

I am studying KW41Z control bridge code.

and I understand how the 'control bridge' receives and parses serial data.

but, I can't understand how the 'control bridge' sends and receives data using ZigBee.

What I want to know,

First, how to transfer message. For example, A board is control bridge, B board is end device.(network joined)

If I send "hello world" from host to A board using UART, A board send "hello world" from A to B using ZigBee. and B board send "hello world" from B to host using UART.

Are there any intuitive example code like this?

Second, I'm analyzing 'ZigBee Control Bridge Code'. but I'm beginner about firmware and rtos. I can't understand ZigBee operation. So how should I study? and What should I look?

thanks

标签 (2)
标记 (3)
0 项奖励
1 解答
1,128 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi JunTae Lee,

Just to confirm, did you run the JN-AN-1216 example?

Do you have a sniffer to capture the packets in the air?

First, Should I define and use a cluster ID?(sAfProfileDataReq.u16ClusterId)

and a profile ID either?(sAfProfileDataReq.u16ProfileId)

Using the ZWGUI you could use a custom cluster.

Second, I can't understand how this function works(APP_eApsProfileDataRequest). could you please explain brief?

and onoff cluster and level cluster use 'eZCL_CustomCommandSend' function. why the raw data option does not use this function(eZCL_CustomCommandSend)?

The on-off cluster has defined the commands and the structures by the ZigBee Spec. Please look at the ZigBee Cluster Library.

Finally, I used raw data option using ZGWUI and checked packet receive in child device.

but It was a simple packet receive debug message. I want to see the Message I send.

Are there other end device example?(I'm using extended light end device example) if not, what should I do?

I recommend using a sniffer for a better debug purpose. Do you have a KW41 dongle?

Regards,

Mario

在原帖中查看解决方案

3 回复数
1,128 次查看
gustcool2
Contributor II

Hi Mario.

Thanks for the useful answer.

I took a look at ZigBee 3.0 Stack.

and looking at the General options in the ZGWUI, the raw data option.

I have a few questions.

the raw data option

case (E_SL_MSG_SEND_RAW_APS_DATA_PACKET):
{
ZPS_tsAfProfileDataReq sAfProfileDataReq;
uint8 u8DataLength;

sAfProfileDataReq.uDstAddr.u16Addr = ZNC_RTN_U16 ( au8LinkRxBuffer, 1 );
sAfProfileDataReq.u16ClusterId = ZNC_RTN_U16 ( au8LinkRxBuffer, 5 );
sAfProfileDataReq.u16ProfileId = ZNC_RTN_U16 ( au8LinkRxBuffer, 7 );
sAfProfileDataReq.eDstAddrMode = au8LinkRxBuffer[0];
sAfProfileDataReq.u8SrcEp = au8LinkRxBuffer[3];
sAfProfileDataReq.u8DstEp = au8LinkRxBuffer[4];
sAfProfileDataReq.eSecurityMode = au8LinkRxBuffer[9];
sAfProfileDataReq.u8Radius = au8LinkRxBuffer[10];
u8DataLength = au8LinkRxBuffer[11];

u8Status = APP_eApsProfileDataRequest ( &sAfProfileDataReq,
&au8LinkRxBuffer[12],
u8DataLength,
&u8SeqNum );
}
break;

First, Should I define and use a cluster ID?(sAfProfileDataReq.u16ClusterId)

and a profile ID either?(sAfProfileDataReq.u16ProfileId)

Second, I can't understand how this function works(APP_eApsProfileDataRequest). could you please explain brief?

and onoff cluster and level cluster use 'eZCL_CustomCommandSend' function. why the raw data option does not use this function(eZCL_CustomCommandSend)?

Finally, I used raw data option using ZGWUI and checked packet receive in child device.

but It was a simple packet receive debug message. I want to see the Message I send.

Are there other end device example?(I'm using extended light end device example) if not, what should I do?

Thank you again.

and have a nice day.

0 项奖励
1,129 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi JunTae Lee,

Just to confirm, did you run the JN-AN-1216 example?

Do you have a sniffer to capture the packets in the air?

First, Should I define and use a cluster ID?(sAfProfileDataReq.u16ClusterId)

and a profile ID either?(sAfProfileDataReq.u16ProfileId)

Using the ZWGUI you could use a custom cluster.

Second, I can't understand how this function works(APP_eApsProfileDataRequest). could you please explain brief?

and onoff cluster and level cluster use 'eZCL_CustomCommandSend' function. why the raw data option does not use this function(eZCL_CustomCommandSend)?

The on-off cluster has defined the commands and the structures by the ZigBee Spec. Please look at the ZigBee Cluster Library.

Finally, I used raw data option using ZGWUI and checked packet receive in child device.

but It was a simple packet receive debug message. I want to see the Message I send.

Are there other end device example?(I'm using extended light end device example) if not, what should I do?

I recommend using a sniffer for a better debug purpose. Do you have a KW41 dongle?

Regards,

Mario

1,128 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi JunTae Lee,

I hope you are doing great.

Sending the hello world like this will not works, the Zigbee protocol works as endpoints and clusters. I recommend to look at the ZigBee 3.0 Stack User Guide Part I: Concept and Operational Information.

If you want to send the hello world like this, you have to create or send this data using a custom cluster.

Look at the General options in the ZGWUI, the raw data option.

Regards,

Mario