This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

zigbee

hi,

i want to implement zigbee protocol. our requirement is 50 nodes with mesh topology.please suggest us the example code.

Regards,

jagadeesh

Parents
  • hi,

    i have taken three boards. in one board i have dumped light coordinator code. and other two boards i have dumped light switch code.i am using internal clock.there is no network connection.

    // <e> NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver
    //==========================================================
    #ifndef NRFX_CLOCK_ENABLED
    #define NRFX_CLOCK_ENABLED 1
    #endif
    // <o> NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source

    // <0=> RC
    // <1=> XTAL
    // <2=> Synth
    // <131073=> External Low Swing
    // <196609=> External Full Swing

    #ifndef NRFX_CLOCK_CONFIG_LF_SRC
    #define NRFX_CLOCK_CONFIG_LF_SRC 0
    #endif

    // <o> NRFX_CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority

    #ifndef NRFX_CLOCK_CONFIG_IRQ_PRIORITY
    #define NRFX_CLOCK_CONFIG_IRQ_PRIORITY 6
    #endif

    /***********************************/

    NRF_LOG_INFO("Joined network successfully");
    bsp_board_led_on(ZIGBEE_NETWORK_STATE_LED);
    nrf_gpio_pin_set(PAIR_LED);

    /* Check the light device address */
    if (m_device_ctx.bulb_params.short_addr == 0xFFFF)
    {
    zb_err_code = ZB_SCHEDULE_ALARM(find_light_bulb, param, MATCH_DESC_REQ_START_DELAY);
    ZB_ERROR_CHECK(zb_err_code);
    zb_err_code = ZB_SCHEDULE_ALARM(find_light_bulb_timeout, 0, MATCH_DESC_REQ_TIMEOUT);
    ZB_ERROR_CHECK(zb_err_code);
    param = 0; // Do not free buffer - it will be reused by find_light_bulb callback
    }
    }
    else
    {
    NRF_LOG_ERROR("Failed to join network. Status: %d", status);
    bsp_board_led_off(ZIGBEE_NETWORK_STATE_LED);
    nrf_gpio_pin_clear(PAIR_LED);
    zb_err_code = ZB_SCHEDULE_ALARM(light_switch_leave_and_join, 0, ZB_TIME_ONE_SECOND);
    ZB_ERROR_CHECK(zb_err_code);

    /****************************************/

    Regards,

    jagadeesh

Reply
  • hi,

    i have taken three boards. in one board i have dumped light coordinator code. and other two boards i have dumped light switch code.i am using internal clock.there is no network connection.

    // <e> NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver
    //==========================================================
    #ifndef NRFX_CLOCK_ENABLED
    #define NRFX_CLOCK_ENABLED 1
    #endif
    // <o> NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source

    // <0=> RC
    // <1=> XTAL
    // <2=> Synth
    // <131073=> External Low Swing
    // <196609=> External Full Swing

    #ifndef NRFX_CLOCK_CONFIG_LF_SRC
    #define NRFX_CLOCK_CONFIG_LF_SRC 0
    #endif

    // <o> NRFX_CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority

    #ifndef NRFX_CLOCK_CONFIG_IRQ_PRIORITY
    #define NRFX_CLOCK_CONFIG_IRQ_PRIORITY 6
    #endif

    /***********************************/

    NRF_LOG_INFO("Joined network successfully");
    bsp_board_led_on(ZIGBEE_NETWORK_STATE_LED);
    nrf_gpio_pin_set(PAIR_LED);

    /* Check the light device address */
    if (m_device_ctx.bulb_params.short_addr == 0xFFFF)
    {
    zb_err_code = ZB_SCHEDULE_ALARM(find_light_bulb, param, MATCH_DESC_REQ_START_DELAY);
    ZB_ERROR_CHECK(zb_err_code);
    zb_err_code = ZB_SCHEDULE_ALARM(find_light_bulb_timeout, 0, MATCH_DESC_REQ_TIMEOUT);
    ZB_ERROR_CHECK(zb_err_code);
    param = 0; // Do not free buffer - it will be reused by find_light_bulb callback
    }
    }
    else
    {
    NRF_LOG_ERROR("Failed to join network. Status: %d", status);
    bsp_board_led_off(ZIGBEE_NETWORK_STATE_LED);
    nrf_gpio_pin_clear(PAIR_LED);
    zb_err_code = ZB_SCHEDULE_ALARM(light_switch_leave_and_join, 0, ZB_TIME_ONE_SECOND);
    ZB_ERROR_CHECK(zb_err_code);

    /****************************************/

    Regards,

    jagadeesh

Children
Related