Add a cluster in a endpoint

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

Add a cluster in a endpoint

790 Views
VincentP
Contributor I

Hi,

 

Im currently using the MC1322x kit of Freescale based on a ARM7. I am using the sensor Node and the network node. One of the aim of the project is to make the nodes communicate via the zigbee protocol to exchange the data of the 3 axis accelerometer sensor (from the sensor node) and send an alarm when a value is matched.

I am using the Beestack provided by Beekit (freescale software). I based the solution on a "Generic App" (accelerometer) and I add 2 clusters to this endpoint on the both Beestack's board:

-1 cluster Alarm ID : 0x0009 INPUT mandatory

-1 cluster Alarm ID : 0x0009 OUTPUT mandatory

 

I upload the solution to the IAR IDE and download it to the boards. But to verify if all the clusters have been add, I checked the EndPointConfig.c  file and the clusters have been well added : 

 

const uint8_t Endpoint1_InputClusterList[4] = {  0x1, 0x0,  /* setpoint */  0x9, 0x0  /* Alarms */};const uint8_t Endpoint1_OutputClusterList[4] = {  0x1, 0x0,  /* setpoint */  0x9, 0x0  /* Alarms */};

 Then I checked the BeeAppInit() function in the BeeApp.c file, but unfortunately, this line : 

  /* what cluster to use */  Copy2Bytes(appDataCluster, endPointList[0].pEndpointDesc->pSimpleDesc->pAppInClusterList);

 shows me that all the cluster are not in the appDataCluster; in fact only the first cluster ID (0x01) is contained in  the variable. (appDataCluster[0]=0x01 and appDataCluster[1]=0x00)

 

Is it the right way to add cluster in a endpoints ? Why I obtain those results ?

Thank you for your help,

 

Regards,

 

Vincent P.

 

 

0 Kudos
4 Replies

542 Views
VincentP
Contributor I

After researsh, it appears that this result is normal.

But I have another question : Where can i find a "user guide" for the cluster Alarms. In fact I would like to know exactly which function I can use (present in the ZCL). Can you help me ? 

Regards

0 Kudos

542 Views
pavel_sadek
NXP Employee
NXP Employee
0 Kudos

542 Views
VincentP
Contributor I

Hi,

Thank you for your link, But I did not find any manual who teach me how to use the function to send data over the air. I simply want to know which function use in the ZCL stack to send command and read/write attributes over the air. Are there specific function to a cluster to do this ? If there is, where can I find the prototype of these functions ? 

Thank you for your answer

0 Kudos

542 Views
VincentP
Contributor I

I have read the book "ZigBee Wireless Networking" of Drew Glisasson and it makes the things easier. But I wanna be sure I have all understand : 

 

Common use : 

 

To send a command we use the function AF_DataRequest(),  then the BeeAppDataIndication() function catch it on the other node and we use the ZCL_InterpretFrame() function to understand the frame, and at this point I have a question. In the book he says that the BeeAppUpdateDevice() function is call by ZCL_InterpretFrame() and this is where all the actions are made. I thought that the ZCL_InterpretFrame() function calls the ZCL_AlarmsCluster() function for example (found in ZCLGenerals.c) and this is were actions are made. This is the case ? What is the right thing ? 

Thanks a lot for your answer

 

Vincent 

0 Kudos