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

Benchmark zigbee example has some problems

...\sdk\nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac\examples\multiprotocol\benchmark\zigbee

IDE:  Segger Embedded Studio.

HW: Two 52840 DK,  name them : A & B

PC Cli: Tera term.

Problems:

1. About zigbee. A starts as a coordinate, starts as a route.After joining the network. I use "zcl ping " in A to ping B,.But B occurs an abort.(100%)

2. About ble. A starts a connection to  B.Stop the connection and start the connection again,B will occur an error.(100%)

 

Parents
  • case 2:

    void ble_ping_evt_handle(const ble_evt_t * p_evt)
    {

    switch (p_evt->header.evt_id)
    {
    case BLE_GAP_EVT_CONNECTED:

    if (!m_initialized)
    {
    ble_ping_init();
    }

    break;

    case BLE_GAP_EVT_DISCONNECTED:
    m_initialized = false;

    break;

    default:
    break;
    }
    }

    When BLE_GAP_EVT_DISCONNECTED,m_initialized = false. When connect again, this will cause another ble_ping_init(); 

    Indeed,return NRF_ERROR_NO_MEM.  

    So comment this  line //m_initialized = false;

    And add below code when BLE_GAP_EVT_CONNECTED for BLE_GATTS_EVT_SYS_ATTR_MISSING.

    uint32_t err_code;

    err_code = sd_ble_gatts_sys_attr_set(p_evt->evt.gap_evt.conn_handle, NULL, 0, 0);
    APP_ERROR_CHECK(err_code);

    }

Reply
  • case 2:

    void ble_ping_evt_handle(const ble_evt_t * p_evt)
    {

    switch (p_evt->header.evt_id)
    {
    case BLE_GAP_EVT_CONNECTED:

    if (!m_initialized)
    {
    ble_ping_init();
    }

    break;

    case BLE_GAP_EVT_DISCONNECTED:
    m_initialized = false;

    break;

    default:
    break;
    }
    }

    When BLE_GAP_EVT_DISCONNECTED,m_initialized = false. When connect again, this will cause another ble_ping_init(); 

    Indeed,return NRF_ERROR_NO_MEM.  

    So comment this  line //m_initialized = false;

    And add below code when BLE_GAP_EVT_CONNECTED for BLE_GATTS_EVT_SYS_ATTR_MISSING.

    uint32_t err_code;

    err_code = sd_ble_gatts_sys_attr_set(p_evt->evt.gap_evt.conn_handle, NULL, 0, 0);
    APP_ERROR_CHECK(err_code);

    }

Children
No Data
Related