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.

RTOS/CC2630: How to set the interval of Beacon Request messages of an End-Device experiencing lost synchronisation with the coordinator or router

Part Number: CC2630

Tool/software: TI-RTOS

Hello!

I use the CC2630 as the end device and the СС2530 as a router and coordinator.

I use Z-Stack Home 1.2.2.

I know how to set BEACON_REQUEST_DELAY in the file f8wConfig.cfg in the ZStackCore - EndDevice project.


How can I change the interval of BEACON_REQUEST messages in a program when an event occurs?

  • BEACON_REQUEST_DELAY is used by the following code in ZDApp_ProcessOSALMsg.
    ZDApp_NetworkInit( (uint16)(BEACON_REQUEST_DELAY
    + ((uint16)(osal_rand()& BEACON_REQ_DELAY_MASK))) );

    I suppose you can claim a variable instead of using BEACON_REQUEST_DELAY in this "ZDApp_NetworkInit..." and then you can change it dynamically when an event occurs.
  • Thanks for the answer.

    1.ZDApp_NetworkInit () is located in ZStack Thread.
      How can I pass a new BEACON_REQUEST_DELAY value through the iCall dispatcher?

    2. After reconnecting to the network, the parameter ZNWK_POLL_RATE = 1000 ms. This parameter I dynamically reconfigure for a specific event. Here is the function

    static void Humid_TempSensor_setPollRate (uint32_t newPollRate)
    {
         zstack_sysConfigWriteReq_t writeReq = {0};

         // Set the new poll rate
         writeReq.has_pollRate = true;
         writeReq.pollRate = newPollRate;

         (void) Zstackapi_sysConfigWriteReq (ztsEntity, & writeReq);
    }

    How do I set PollRate to the value I set before after reconnecting to the network?
  • 1 .I was able to set the PollRate parameter to the desired value after reconnecting to the network. This question is closed.

    2. Continuation of the topic about Bacon Requests.

    a) I need to change the Beacon Request interval time in my CC2630 zstack
    b) Start and stop Beacon Request independently in the program when events occur.
    How can I implement this?

    in the file f8wConfig.cfg I found the parameters:
    / * Rejoin retry backoff silent period timer duration in milliseconds - default 15 minutes according to HA test spec * /
    -DREJOIN_BACKOFF = 900000
    / * Rejoin retry backoff scan timer duration in milliseconds - default 15 minutes according to HA test spec * /
    -DREJOIN_SCAN = 900000

    what do they mean and for what are they needed?
  • 1. Why do you need to change Beacon Request interval (a) and Start and stop Beacon Request independently in the program when events occur(b)?
    2. REJOIN_BACKOFF and REJOIN_SCAN are defined in Zibgee HA profile to save ZED power consumption when ZED loses connection with its parent node and try to rejoin a new parent node. It means ZED would do beacon request for a period of REJOIN_SCAN and then stop for REJOIN_BACKOFF period.
  • 1. I want to save ZED power consumption.
    When the ZED is connected (join) to the network for the first time and the coordinator and the router are turned (power) off, the ZED starts the Beacon Request. The Beacon Request period is 100 ms. How do I change the Beacon Request interval when I first connect (join) to the network? how to stop Beacon Request?

    2.I found the topic e2e.ti.com/.../498206
    I was able to change REJOIN_BACKOFF and REJOIN_SCAN. But these options only to reconnect to the network.
  • Can you help me?

    ZStack' End Device starts to do Beacon Request forever until it find Coordinator.
    1. How to stop Beacon Request if there is no coordinator??
    2. How to start Beacon Request again?
  • Can you help me?


    ZStack' End Device starts to do Beacon Request forever until it find Coordinator.

    1. How to stop Beacon Request if there is no coordinator??

    2. How to start Beacon Request again?
  • I think you can use API Zstart_discovery to control this.

  • 1. I tried the Zstackapi_DevNwkDiscReq function (ICall_EntityID appEntity, zstack_devNwkDiscReq_t * pReq).
    zstack_devNwkDiscReq_t diskReq = {0};
      diskReq.scanChannels = ZNWK_DEFAULT_CHANLIST;
      diskReq.scanDuration = 10;
      appEntity = ztsEntity.
    Sniffer caught 1 beacon request.

    2. If the ZED was not connected to the network End Device starts to do Beacon Request forever until it find Coordinator.
    At the same time, the battery of the device is discharged very quickly.
    Is there really no way to stop the Beacon Request ???

  • If your device doesn't send beacon requests and consumes lots power, you should check it in other direction. For example, do you enable POWER_SAVING to make device enter sleeping mode.
  • 1. When my device does not send beacons requests it goes into sleep mode and consumes 5-6 μA.

    2. There is only one problem:
    If ZED was never connected to the network when it was turned on, ZED starts to do Beacon Request's forever until it find Coordinator.

    If the coordinator is out of range (or turned off), ZED do Beacon Request's forever.

    3. The parameters REJOIN_BACKOFF and REJOIN_SCAN only work if the device has already been connected to the network.
  • If you enable HOLD_AUTO_START and use API API Zstart_discovery to scan network to join when a button is pressed, does it still keep sending beacon request non-stopping?
  • No ZED does not still keep sending beacon request non-stopping.
    ZED send 1 beacon request each time the Zstackapi_DevNwkDiscReq () function is started.
    On the sniffer, I see the answer from the coordinator:
    Beacon: NwkOpen: RC 1: Depth 0: EPID: 00:12:4B:00:0E:4A:BF:75
    Then ZED does not connect to the network. What to do next to connect to the network?
  • You have to enable permit join on your coordinator to allow device to join.
  • 1. I solved the problem.
    I used HOLD_AUTO_START and on an event in my program, I used the Zstackapi_DevNwkDiscReq () function to scan the network for a coordinator. Then, in the function XXX_processZStackMsgs (), I processed the event zstackmsg_CmdIDs_ZDO_NWK_DISC_CNF. In which I started the function Zstackapi_DevStartReq (). Here's the code:

    case zstackmsg_CmdIDs_ZDO_NWK_DISC_CNF:
    {
    zstackmsg_zdoNwkDiscCnf_t *pInd
    = (zstackmsg_zdoNwkDiscCnf_t *)pMsg;
    if (pInd->req.status==0x00) // !!!Network Found!!!
    {
    bool startDev = true; // default to start the ZStack thread

    zstack_devStartReq_t startReq = {0};

    // Start the ZStack Thread
    startReq.startDelay = 0;
    (void)Zstackapi_DevStartReq(ztsEntity, &startReq);
    }
    }
    break;
    After that, the device was connected to the coordinator.

    2. If HOLD_AUTO_START is enabled, after turning ZED off and on, the ZED sends the Beacon Request after the REJOIN_BACKOFF period.

    I think that everything worked as well as I would like.

    Thanks for the help.