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.

setting Beacon Request interval time in CC2650 zigbee

Other Parts Discussed in Thread: CC2650, CC2531, CC2538

hi all,

we need setting  Beacon Request interval time in my CC2650 zstack.

we need build a mobile device for our product that will be level and re-join network.

so , that will need function to  

change the beacon request time

start and stop beacon request.

i see follow  follow post about this,that is change the f8wConfig.cfg(that only for CC2531/CC2538 device)

and the interval time only 255 mSec,

e2e.ti.com/.../271126

f8wConfig.cfg

/* Mask for the random beacon request delay. This value is masked with the
* return from osal_rand() to get a random delay time for each joining cycle.
* This random value is added to DBEACON_REQUEST_DELAY. For example, a value
* of 0x00FF will be a beacon request delay of 0 to 255 milliseconds.
*/
-DBEACON_REQ_DELAY_MASK=0x00FF

SDK:

zstack_home_1_02_02a_44539

  • You can study

    /* 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
  • hi all , 

    thank your help.

    i reference your suggest . 

    //set the rejoin backoff and scan

    static void zswWriteParameters(void)
    {
    zstack_sysConfigWriteReq_t writeReq = {0};
    uint8_t extendedPANID[] = ZNWK_CONFIG_EXTENDED_PAN_ID;
    // HA specifies no Multicast, use group broadcast
    writeReq.has_nwkUseMultiCast = true;
    writeReq.nwkUseMultiCast = false;
    // Update the Default Channel List, defined in znwk_config.h
    writeReq.has_chanList = true;
    writeReq.chanList = ZNWK_DEFAULT_CHANLIST;
    // Update the Extended PAN ID, defined in znwk_config.h
    writeReq.has_extendedPANID = true;
    memcpy(&(writeReq.extendedPANID), extendedPANID,
    EXTADDR_LEN);
    // Update the config PAN ID, defined in znwk_config.h
    writeReq.has_panID = true;
    writeReq.panID = ZNWK_CONFIG_PAN_ID;
    #if defined(__SK301)
    writeReq.has_rejoinBackoffDuration = true;
    writeReq.rejoinBackoffDuration = 90000;

    writeReq.has_rejoinScanDuration = true;
    writeReq.rejoinScanDuration = 3000;
    #endif
    (void)Zstackapi_sysConfigWriteReq(zswEntity, &writeReq);
    }

    //and to  start beacon request

    static void keyaction(uint8_t key)
    {

    zstack_sysResetReq_t restReq;

    if(savedState!=zstack_DevState_DEV_END_DEVICE)
    {
    Board_Led_control(SK301_RED_LED,
    board_led_state_BLINK);
    //wait some time to
    if(key==KEY_RIGHT)
    {
    restReq.type = zstack_ResetTypes_DEVICE;
    restReq.newNwkState = false;
    (void)Zstackapi_sysResetReq(zswEntity, &restReq);
    }
    }

    }

  • hi ,
    thank you suggest, i do it as follow code:

    //set rejoin back off and scan
    static void zswWriteParameters(void)
    {
    zstack_sysConfigWriteReq_t writeReq = {0};
    uint8_t extendedPANID[] = ZNWK_CONFIG_EXTENDED_PAN_ID;
    // HA specifies no Multicast, use group broadcast
    writeReq.has_nwkUseMultiCast = true;
    writeReq.nwkUseMultiCast = false;
    // Update the Default Channel List, defined in znwk_config.h
    writeReq.has_chanList = true;
    writeReq.chanList = ZNWK_DEFAULT_CHANLIST;
    // Update the Extended PAN ID, defined in znwk_config.h
    writeReq.has_extendedPANID = true;
    memcpy(&(writeReq.extendedPANID), extendedPANID,
    EXTADDR_LEN);
    // Update the config PAN ID, defined in znwk_config.h
    writeReq.has_panID = true;
    writeReq.panID = ZNWK_CONFIG_PAN_ID;
    #if defined(__SK301)
    writeReq.has_rejoinBackoffDuration = true;
    writeReq.rejoinBackoffDuration = 90000;

    writeReq.has_rejoinScanDuration = true;
    writeReq.rejoinScanDuration = 3000;
    #endif
    (void)Zstackapi_sysConfigWriteReq(zswEntity, &writeReq);
    }


    //to start beacon request
    static void keyaction(uint8_t key)
    {
    zstack_sysResetReq_t restReq;

    if(savedState!=zstack_DevState_DEV_END_DEVICE)
    {
    Board_Led_control(SK301_RED_LED,
    board_led_state_BLINK);
    //wait some time to
    if(key==KEY_RIGHT)
    {
    restReq.type = zstack_ResetTypes_DEVICE;
    restReq.newNwkState = false;
    (void)Zstackapi_sysResetReq(zswEntity, &restReq);
    }
    }
    }
  • So, does it work now?
  • hi yikai,
    yes, i seem it work correctly.
    have any question about my code or view?
  • The code looks fine.