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.

Router cannot automatically join coordinator after coordinator is turned off and turned back on.

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi,

I am running smart energy sample application using 2 CC2530 devices, one as coordinator/ESP, and the other as router/simple metering device.

Following is the procedure in my experiment:

1. I turned on coordinator, then router. They are connected. This can be seen using the packet sniffer.

2. I turned off the coordinator. I can see the router is sending the following 3 types of frames repeatedly.

a) NWK link status frame,

b) NWK route request frame. I can see the frame has coordinator's IEEE address as its destination IEEE address.

c) APS/SE current summation delivered frame,

Since the coordinator is not alive, the router repeatedly sends these frames.

3. In the last step, I turned on the coordinator again. However, the router can not join the coordinator automatically.

What should be coordinator's response if it sees a "route request" command with its IEEE address from the router?

Should I do anything at the application layer, for example the router issues rejoin command after certain amount of failures, or should this be taken care of in the network layer automatically?

Thanks,

Yiliang

  • Hello !

    Have you compiled you coordinator with NV_RESTORE and NV_INIT ?

    If not your coordinator will increment its PAN ID and the router won't see it.

  • Hi,

    Thanks for the reply! I checked the PAN ID from the coordinator before and after the power cycle. Yes, it indeed changes. However, the behavior is the same after I define NV_RESTORE macro. NV_INIT macro was already there.

    I also notice that after the coordinator powers up again, the coordinator sends a Beacon Request frame, and the router replies with a Beacon frame which has the old PAN ID. However, the coordinator does not use this PAN ID. The new PAN ID used by coordinator can be found in the link status frames it transmits.

    Any other suggestions?

    Thanks!

    Yiliang

  • Hi,

    After more experiments, still no progress. The new PAN ID used by the coordinator is always incremented even after I defined NV_RESTORE.

    I have also seen another thread discussing the similar issue, but there is no final answer posted.

    http://e2e.ti.com/support/low_power_rf/f/158/p/17611/68347.aspx#68347

    Some people suggested that this is a rare situation that should be handled by the router like an error condition.

    But this is the normal operation in my design (I am not sure whether it is the best method, though :)). I have a network of sensors that are waiting to be read. The reading device is the coordinator. Only when the reading device is on, the network will be formed. After the data are read, the reading device will be powered off.

    Any suggestion will be greatly appreciated!

    Thanks!

    Yiliang

  • Hi Yiliang,

    I am using CC2530 + smart energy profile for my application.

    Can u plz let me know how to give command from ESP for the attributes of smart energy  in end device which is a simple metering device.?

    Is it possible that simple meter end device will also act as router?

     Where to modify in the stack for adding user defined command set for interfacing with another module through UART communication?

    Thanks,

    Partha

     

  • Hello Yiliang - I have not seen any mention of what version of Z-Stack is in use. I highly recommend you to download and migrate to the recent 2.3.1 release:

    http://focus.ti.com/docs/toolsw/folders/print/z-stack.html

    If NV_RESTORE is defined and the steps that you describe above are followed (start ZC, start ZR, wait for ZR to join ZC and see a link status message from each, cycle power to the ZC), then the ZC will not send out the beacon request that you observe. Perhaps you are not using the SmartRF05EB, but custom H/W? If so, you need to port all of the HAL to your custom H/W, and for this specific example, the "override NV restore button" (i.e. SW_BYPASS_NV used in ZDApp.c).

  • Hello Partha - please download the Z-Stack 2.3.1 and take a look at the suite of Smart Energy sample applications:

    C:\Texas Instruments\ZStack-CC2530-2.3.1-1.4.0\Projects\zstack\SE\SampleApp

    I suspect that your question about implementing a simple metering device will be answered by the sample code. As for your question about whether an end device will also act as a router: no.

  • Hello Harry,

    Thanks for your reply....

    I gone through sample code of SE profile but found that simple metering can act as router as well as end device. So, I am bit confused  and have few queries..

    1.Can simple meter  router respond to the requested attributes list from ESP.

    2. Can simple meter router be connected to an external meter by SPI or UART  from where it can collect data.

    3.Is there any way to send command through MT or Ztool to the ESP which will further send it to simple meter end device for collecting attribute as i didnot find any such command.

    4. Is there any refference document available where interfacing of end device to some external meter is  explained

    5.Can SE profile of TI is interoperable where our ESP can collect data from some other manufacturer Simple meter end device.

     Thanks,

    Partha

     

  • 1. Yes, but why not just load the sample apps onto your ZigBee development kit boards and do it?

    2. Yes.

    3. Yes - if using MT_AF_DATA_REQUEST / MT_AF_DATA_REQUEST_EXT doesn't work for you, you can always gen-up some very specific behavior using the MT_APP_MSG / MT_APP_RSP exchange ... take a look at the MT API document:

    C:\Texas Instruments\ZStack-CC2530-2.3.1-1.4.0\Documents\Z-Stack Monitor and Test API.pdf

    4. Don't know.

    5. Yes, if the other manufacturer's ZED is SE compliant.

  • Hiyo Partha,

    I just posted an example that could help you in "my files" section. Look in the ZCL manu spec example folder. Search for ZTK. Pay particular attention to the esp_ProcessAppMsg() function. Any message can be "tunneled" out of the application by using the function

    MT_BuildAndSendZToolResponse(((uint8)MT_RPC_CMD_AREQ | (uint8)MT_RPC_SYS_DBG),
                                       MT_DEBUG_MSG, len, txBuf);

    -- Double O