Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 15.2 How to set a value to a HID feature report

Hi All.

In custom report descriptor I try to use this code:

ret_code_t result = sd_ble_gatts_value_set(
                            m_conn_handle,
                            m_hids.feature_rep_array[0].char_handles.value_handle,
                            &value_param);

ret_code is NRF_SUCCESS

but on host while reading feature report I don't se a changed value.

Maybe I'm doing something wrong?

Second question is about "BLE Link context manager".: when to call blcm_link_ctx_get function

a result is pp_ctx_data  by connection handle.

But what is structure of this data ?

Thanks.

  • Hi guys!

    Here are the answers to their own questions.

    I'll start with the second question.
    "BLE Link context manager" is a very cool thing.
    It is simply a map in which the connection handle corresponds to a certain structured data buffer.
    This buffer contains all report values and they can be easily found.
    Moreover, HID API read and write reports data and puts-takes this data in that buffer.

    The answer to the first question (about sd_ble_gatts_value_set): this will not work because the answer is higher :).

Related