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

ibeacon example not working ("invalid connection handle")

Using nrf51822's PCA10001EK and trying the included s110 example called ibeacon. Keep hitting error 0x3001 which corresponds to "connection handle" error.

This error is hit during the advertising_init() function when calling ble_advdata_set(). Inside ble_advdata_set, everything is fine until sd_ble_gap_adv_data_set(p_encoded_advdata, len_advdata, p_encoded_srdata, len_srdata) is called. I am not sure what the issue is, as I cannot see what sd_ble_gap_adv_data_set exactly does and I am unfamiliar with what "connection handle" is. The included code should just work right?

Any help is appreciated

  • Replace

    C:\Nordic Semiconductor\nRF51 SDK_v5.2.0.39364\Nordic\nrf51822\Include\s110

    with

    C:\Users\toming\Desktop\nRF51822 Development Kit\s110_nrf51822_5.2.1.zip\s110_nrf51822_5.2.1_API\include\

    Also you might modify similar below API invocation

    static void power_manage(void) { uint32_t err_code = sd_app_event_wait(); APP_ERROR_CHECK(err_code); }

Related