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.

How a router application will know that data is being transferred

Other Parts Discussed in Thread: Z-STACK

Hi,

for our wireless network we need to have a visual indication that data is being transferred wirelessly

I am able to do this with an end device and the coordinator which basically are the originator and consumer of the data being transferred.

however for a router application, i don't know how to determine if data is being passed through it.

so my question is, how can a router application know that data is being pass through it even though it is not the intended receipent of the data?

also, if the router is orphaned (it is the only one in the wireless network) how will the application know?

please advice.

regards,

Grant

  • Hi,

    On Z-Stack  1.4.3-1.2.1, the only way I've found to indicate router activity is to insert my own code in zmac_cb.c. You can add

    code to the switch statement "case MAC_MCPS_DATA_IND:" in the

    function MAC_CbackEvent() to flash a LED or whatever.

     

    The only way I've found to determine if your router is orphaned you need to send a heartbeat message to the

    parent on a regular basis. I'm not happy about doing this as it chews up bandwidth but, again, it's the only way I've found.

    Having no parent is not necessarily an error as with mesh networking you're network will still carry traffic so the

    decission to send heartbeats or not is a tricky one.

     

    I'd be interested in any better ideas

    Cheers, Steve.

     

     

     

     

  • thanks steve,

    the solution i have in mind to determine if a router has been orphaned is the same one that you are suggesting.

    i was hoping that there is some way that i don't have to send periodic ping, but it seems it can't be helped.

    thanks for the suggestions.

    regards,

    Grant

  • If you're a sleepy end device, you normally check your orphan status by doing a data poll on your parent for indirect data transfers. If you fail more than X amount of times, then you would start up an orphan scan to see if the parent is still there. If you're a router, then you normally discover your orphan status when you try and send or route some data to your parent. If the transfer fails, then you would remove the parent from your neighbor list and try to rescan for a new parent. The issue that occurs is that the downstream devices would all need new addresses if you're using tree addressing. Not sure how that is managed in ZStack.