This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

being discovered service using milti-link peripheral

Hi. i'm using nRF52832, SDK13, S132v4 as multi-link peripheral.

As I know, SDK13 supports multi-link peripheral refering to example "experimental_ble_app_multiperipheral".

But as I tested, when 1 central is connected, other centrals can make connections but can't discover services.

What could be the problem?

here is source code for this case. it is example source code.

static void services_init(void) {

......

err_code = ble_lbs_init(&m_lbs, &init); APP_ERROR_CHECK(err_code);

}

uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) {

......

// Add characteristics.

err_code = button_char_add(p_lbs, p_lbs_init); VERIFY_SUCCESS(err_code); ......

}

static uint32_t button_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) {

......

return sd_ble_gatts_characteristic_add(p_lbs->service_handle, &char_md, &attr_char_value, &p_lbs->button_char_handles);

}

I hope your reply.

  • I think I got the solution by myself. I changed nrf_ble_gatt.h as below.

    #ifndef NRF_BLE_CENTRAL_LINK_COUNT #define NRF_BLE_CENTRAL_LINK_COUNT 0 #endif

    #ifndef NRF_BLE_PERIPHERAL_LINK_COUNT #define NRF_BLE_PERIPHERAL_LINK_COUNT 8 #endif

    #define NRF_BLE_GATT_LINK_COUNT (NRF_BLE_PERIPHERAL_LINK_COUNT + NRF_BLE_CENTRAL_LINK_COUNT)

    NRF_BLE_CENTRAL_LINK_COUNT was 1 and NRF_BLE_PERIPHERAL_LINK_COUNT was also 1.

    So I think we have to change this values to use multi-link. Is it right?

    I hope your reply.

  • Hi,

    It should not be necessary to change anything in nrf_ble_gatt.h. The peripheral link count is defined in main.c as #define PERIPHERAL_LINK_COUNT 4 (line 69). I just tested the example by connecting 2 centrals, and it worked fine.

Related