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.

ZDO's Active Endpoint Request



Hi,

I'm using the CC2480 and wanted to, through a single command to the coordinator, discover all endpoints (and routers-optional) that are in the network. I thought the ZDO_ACTIVE_EP_REQ would resolve my problems, but I'm not getting the correct response. Regardless of the endpoints in the network it always replies with:

ActiveEPCount: 1
ActiveEPList: 1

Am I using this command the wrong way? In the DstAddr and NWKAddrOfInterest fields of the ZDO_ACTIVE_EP_REQ command I'm using the coordinator network address.

Thanks, Pedro

  • Hi psilva,

    Did u solve the above problem?

    As in the data sheet : DstAddr – 2 bytes – Specifies NWK address of the device generating the inquiry .  "DstAddr" this name ll confuse us to use which address here. This is the short address of the device from where u are sending a ZDO_ACTIVE_EP_REQ command .

    NWKAddrOfInterest – 2 – Specifies NWK address of the destination device being queried. This is the short address of the device to which u are requesting.

    It may help u  little.......

    P

  • psilva1203 said:
    I'm using the CC2480 and wanted to, through a single command to the coordinator, discover all endpoints (and routers-optional) that are in the network.

    Yeah, that'd be nice, wouldn't it [:)]

    I think the initial issue is one of nomenclature -- I think you're wanting to discover all of the end devices, rather than endpoints.  Here are the specific definitions, from the ZigBee specification:

    ZigBee end device: an IEEE 802.15.4-2003 RFD or FFD participating in a ZigBee network, which is neither the ZigBee coordinator nor a ZigBee router.

    Endpoint: This is a particular component within a unit. Each ZigBee device may support up to 240 such components.

    The formal definition of "endpoint" in the spec isn't very helpful; what it's basically saying is that an endpoint is a logical application entity (aka "component") running on the ZigBee device, and that there may be up to 240 unique applications per device.

    The ZigBee device application, as defined by the ZigBee Device Profile (ZDP) and implemented on each ZigBee device by the ZigBee Device Objects (ZDO), is a "special application" that resides on endpoint 0.

    What we usually think of as the "user application" (or "user applications") runs on one or more of endpoints 1 to 240, and conforms to an explicit application profile (e.g. Smart Energy or Home Automation), or is "manufacturer-specific".

    Your ZDO_ACTIVE_EP_REQ is effectively asking the coordinator "how many active endpoints do you have, and what are their endpoint addresses?"  The coordinator is telling you "I have one active endpoint, and the endpoint address is 1" (for some reason, the count and list don't include the ZDO).  If you were really interested in the application running on the coordinator's endpoint 1, you could send a ZDP "Simple Descriptor Request" to the coordinator, specifying the coordinator's network address (0x0000) and endpoint 1.  The coordinator would respond with the ZDP "Simple Descriptor Response", which would tell you the Profile Identifier, Device Identifier (specific "role" of this device within the application profile), and input / output clusters.

    In a nutshell, there's no explicit, succinct way to get a list of all devices on the network -- its possible / likely that no single device on the network has such a comprehensive list in any case.

    Probably the simplest way to do what you want (caveat -- I haven't actually done this specific method myself, but I have designed and implemented a somewhat more comprehensive approach):

    1. Send a ZDP IEEE_addr_req to the coordinator (at NWK Address 0x0000), requesting an "Extended Response"
    2. The coordinator sends a ZDP IEEE_addr_resp that includes a list of NWK Addresses of devices associated with the coordinator.
    3. For each ZDP IEEE_addr_resp received, send a ZDP IEEE_addr_req / "Extended Response" to the NWK address of each associated device
    4. If you don't receive an IEEE_addr_resp from a specific device, you can probably assume that its a ZigBee end device (and might've slept straight through your request)

    There are definitely optimizations and alternatives to the above (e.g. utilizing a discovery cache (at least in theory), requiring each device to support the ZDP Mgmt_Lqi_req and parsing neighbor tables, etc.), but that's one general approach.

    Good luck!

    Dave

  •  

    David_Mollerstuen said:
    Send a ZDP IEEE_addr_req to the coordinator (at NWK Address 0x0000), requesting an "Extended Response" .

    Hi,

    Does it mean that, co-ordinator short address ll always be 0x0000??

     

  • Yes; according to the ZigBee spec, the ZigBee Coordinator is always at (16-bit) NWK address 0x0000.  Of course, the (64-bit) EUI64 will be globally unique, as for any other ZigBee node.

    For those with access to the ZigBee spec, I was able to find the "coordinator == NWK address 0x0000" reference in section 3.2.2.3.3; while I had always known that the coordinator had NWK address 0x0000, I didn't know (until now) where in the spec that was codified.

  • Ok, if so thats good!!! Till now i assumed that it 'll be 0x0000. Bcoz every time i checked, i got it as 0x0000. But i didn't see in any document that, co-ordinator short adddress ll be always be 0x0000. Anyhow thanks for giving a confidential answer.

    How to download ZigBee spec document?? I joined the group, later it shows download link ll be sending to the mail id. But i didn't get any link. Pls tell me how to download the document.

    Thanks&Regards,

    Pandit

  • Hello David,

    Thanks very much for your reply.
    It is surely a nomenclature issue, I was confusing the definition End Device with EndPoint. Thanks for clearing that up :D.
    With those definitions in mind, the response I obtained from the coordinator makes sense.

    I'll then try the method you propose to see if I can get better results. 

    Thanks again.

    Pedro

  • Hello P,

    I've just downloaded the ZigBee Spec Document. I just went to the Zigbee site and filled the ZigBee Specification Download Request inquiry and in a matter of minutes they sent me the download link to my email.
    I suggest you try again, maybe with a different email adress this time.

    Pedro 

  • Hi Pedro,

    I got a confirmation but i didn't get any link in that. I'll try once more.

     Its pdf file no!! Can u send me a mail of that zip file.

    My mail id is pandit2008@gmail.com.

     

    Thanks

    Pandit

  • No problem, I'll send it to you.

    Pedro