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.

ZStack router addressing

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi

I'm using a LM3S9D96 + DK-EM2-2520Z hardware's. The 2520Z wireless kit, contains 2 smartrf05bb, 2 cc2530 em, 1cc2520 em and 1 em2 (this one + cc2520 em connect to the 9D96).

I wanted to create a simple network using a tree topology. In the network there is one coordinator and router devices. I probe some led in the router deices(which ones is the cc2530+smartrf05bb), and write some command which ones the routers get change the led state or change the brightness of the led.

I'm using Zstack 2.5.1 and Zigbee Pro.

I wanted to increase the connected router number. In my demo app i store the short address of the routers (which are random), the routers send sensor data to the coordinator and i store the short address from the received sensor packet, but i wanted to remove the sensor data sending .

So my question is that how or where i can determine my routers address? Can i assign short address to the routers static?

Sorry for my bad english :(
Please help me, thanks.

  • You can't assign short address of any devices because it is by Z-Stack. I don't understand what you mean to remove the sensor data sending. If you can describe it more clear, maybe I can find alternative for you.

  • Dear Yikai Chen

    First thank you for your reply.

    My routers is follow the next behaving: once they connect to the zigbee network, they start send sensor data to the coordinator in every 2 seconds.  In the 9D96 DK i have an LCD display, in there i drawn the topology of the network (there is a demo for that), i rewrite this demo code to send commands (these are the led state change commands) to the routers.

    The sensor data is contains temperature and voltage information about the router.

    Some of the next goal is to remove elements from the demo code (both side). So i wanted to stop (and also remove the code) to send these sensor data. But now i can only get the short (router's) address from the received packet in the coordinator side.

    My main goal is that to control the routers led (I wanted to increasethe network routers number) from a website, for that i will using the ethernet module in the 9D96. The IP communication is not a problem, i have experiance in that.

    So my main problem is that how i will know about my routers address (I count more than a hundred's routers), if the Zstack using stohastic addressing? Or how i can determine an routers position in the network, who is father who is his child?

    I have a plus answer: Can we bind the Coordinator to the Routers in Zstack? How i can use the binding table to send my command?


  • 1. how i can determine an routers position in the network, who is father who is his child?

    Please refer to this thread.

    2.  Can we bind the Coordinator to the Routers in Zstack? How i can use the binding table to send my command?

    You can use ZDP_BindReq to bind coordinator and routers. After binding you can use address mode AddrNotPresent to send packets to the binding node.

  • Dear Yikai Chen

    First i thanks your reply again, i posted many problems in this forum, but unless this every thread is unanswered :)

    I read the thread you mentioned, and i have some question. In Cetri comment, he/she mentioned the RTG_GetNextHop().



    "
    1. Call  RTG_GetNextHop() to get the next hop address and put it in the payload instead of parent address. The usage of this function would be as following.

    nextHopAddr = RTG_GetNextHop( DstAddr, SrcAddr, SelfAddr, INVALID_NODE_ADDR, 0);

    Where, DstAddr is the destination address the local device wants to send the message to, the SrcAddr is the source address the message was originated from if the local device is an intermediate router, and SelfAddr is the address of the local device itself. If the local device is the originator, just use INVALID_NODE_ADDR for SrcAddr."

    My questions is the following:
    If the zstack using stohactic addressing mode to assign address to the routers, and i using 1 coordinator with 400 router how i will know the address of the 389th router in the network to send the my led state change command? I only know the coordinator address. With this RTG_GetNextHop() function can i determine the address in my 
    previous example the 389th routers address?

    Imagine that the routers only have one parent and one child, so the network topology is a straight in my example.

    "If you just want to know the topology regardless of routing path, I think using ZDP_MgmtLqiReq() in a recursive way would be the best as DarkSide mentioned."


    How i can using ZDP_MgmtLqiReq() function to discovery the the routers address? I search the function, but its only return a uint8 veriable. What is do this function, i can't see the full implementation of this function?

    I reading about the binding, i have another question about it. In the Binding Table it stores the Endpoint of the devices (source and destination) am i right the binding using the endpoint to connect two devices?
    In my app i use the zb_SendDataRequest() function to send my own packets, but how i use the binding entry to send my command if i don't know the address? is there another function to solve this problem?

    "void zb_SendDataRequest ( uint16 destination, uint16 commandId, uint8 len,

    uint8 *pData, uint8 handle, uint8 txOptions, uint8 radius )"

     

  • There is nobody who can answer me?

  • 1. how i will know the address of the 389th router in the network to send the my led state change command?

    When a router joins network, it will broadcast end node announcement. I would suggest you to keep its short address then. It is hard to trace all of the devices in the network after that.

    2. am i right the binding using the endpoint to connect two devices?

    Except end points information, the binding table also keep short address of device.

    3. how i use the binding entry to send my command if i don't know the address?

    Use ADDRESS_NOT_PRESENT in DestAddressMode in AF_DataRequest and it will fill the destination address for you according to the binding table