This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530 Sample Light Custom firmware

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi,

Im developing in Z-stack API with the CC2530 and i had tested the Sample Light and Sample Switch HA-profiles that comes with the sample applications and I have a few questions about:

1- How can i get through the cordinator of the network, the number of device ids of the end devices connected in my mesh network?

2- And if i want to add more switches like the Sample Switch(End Devices) is just i program the others EDs or i need to create a new endpoint?

3-How can i use the zcl library to read some data from a sensor connected in my ED?

Att. Ânderson I. Silva

  • Anderson,

        Thank you for using TI ZigBee. See my answers below:

    Anderson Ignacio da Silva said:

    1- How can i get through the cordinator of the network, the number of device ids of the end devices connected in my mesh network?

    You should broadcast a ZDO_MGMT_LQI_REQUEST. See section 3.1.6.3 ZDP_MgmtLqiReq() of C:\Texas Instruments\Z-Stack Home 1.2.0\Documents\API\Z-Stack API.pdf

    Anderson Ignacio da Silva said:

    2- And if i want to add more switches like the Sample Switch(End Devices) is just i program the others EDs or i need to create a new endpoint?

    Do you want more physical devices on the network or more Switch EndPoints on a single device? I think you are asking if the EP number needs to change on different physical devices, i.e. do you need a unique SAMPLESWITCH_ENDPOINT. In which case the answer is no, you do not. Each EndPoint is uniquely addressed by the Nwk Addr + Endpoint, and as each physical device will have a different Nwk Addr the Nwk Addr + Endpoint combination will be unique. So you do not need to change the SAMPLESWITCH_ENDPOINT define.

    Anderson Ignacio da Silva said:

    3-How can i use the zcl library to read some data from a sensor connected in my ED?

    Please see C:\Texas Instruments\Z-Stack Home 1.1.0\Components\stack\zcl\zcl_ms.h for all the measurement and sensing API's, clusters and attribute ID's. Changing the EZMode clusters ID’s will allow you to bind to different clusters other than on/off:

    ezModeData.numActiveInClusters = 0;

    ezModeData.pActiveInClusterIDs = NULL;

    ezModeData.numActiveOutClusters = 1; // active output cluster

    ezModeData.pActiveOutClusterIDs = clusterIDs;

    Once easy mode binding is complete sending read/write attr or ZCL commands to the following addr will send to the "bound" device.

    // Set destination address to indirect

    zclReferenceThermostat_DstAddr.addrMode = (afAddrMode_t)AddrNotPresent;

    zclReferenceThermostat_DstAddr.endPoint = 0;

    zclReferenceThermostat_DstAddr.addr.shortAddr = 0;

    You can test this on SampleSwitch by doing a read attr of the on/off cluster attribute. See C:\Texas Instruments\Z-Stack Home 1.1.0\Documents\API\ Z-Stack ZCL API.pdf section “3.3 Send Read” for details on how to read an attribute.

    Regards, TC.