Part Number: CC2530
Other Parts Discussed in Thread: CC2531
Hello, I am developing an application that communicates from a host to a CC2530 through UART. I configure it as a coordinator to receive data from security sensors (magnetic door sensor, movement sensor, etc.).
My configuration routine is:
- Reset
- Configure start up options
- Configure as Coordinator
- Start Up (until is coordinator)U
- EP: 01
- AppProfId: 0x0104
- AppDeviceID: 0x0100
- AppDevVer: 00
- LatencyReq: 00
- InClusterNum: 02
- ClusterIN: 0x0000, 0x0006
- OutClusterNum: 02
- ClusterOUT: 0x0000, 0x0006
- Permit Join
By doing this, I am able to receive de AF_INCOMING_MSG from the sensors as they sense some change. I also receive their check-in message with 1 hour period. However, because of my application I need to be able to request their state manually. I understand that I can achieve this with the command AF_DATA_REQUEST but I do not find information of what the Data field should be fill with.
Example of the AF_INCOMING_MSG that I receive when a sensor changes its state:
FE 18 44 81 00 00 06 00 1C 7F 01 01 00 A2 00 50 CB 00 00 00 07 18 2B 0A 00 00 10 00 AF
Being:
ClusterID: 0x0006
Short address: 0x7F1C
Src Ep: 01
Dst Ep: 01
Data: 18 2B 0A 00 00 10 00
I want to be able to trigger this message anytime I want. My current AF_DATA_REQUEST msg is: FE 0F 24 01 1C 7F 01 01 06 00 00 10 0F 05 00 02 00 00 00 57
Meaning I am sending:
- DstAddr: 0x7F1C
- DstEP: 01
- SrcEP: 01
- ClusterID: 0x0006
- TransID: 00
- Options: 0x10 (with ACK)
- Radius: 0x0F
- Len: 05
- Data: 00 02 00 00 00 (do not know what this means??)
But I get these msgs with error:
ZNM-->PC:
FE 01 64 01 00 64
ZNM-->PC:
FE 03 44 80 F0 01 00 36
Moreover, I cannot access the codes because I need to use both default firmwares (coordinator and endpoints).
Could anybody guide me in how to build the AF_DATA_REQUEST msg in order to retrieve information from my sensors? Thank you very much!