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

BLE adding characteristic doesn´t work

Hi,

I´m trying to add a new, custom TX characteristic to Softdevice. I use example from SDK 16 "UART/Serial Port Emulation over BLE".

How I can do this, is explained here: "https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fble_sdk_app_nus_eval.html&cp=7_1_4_2_2_25_0_0&anchor=adding_prop_ser_and_char"

So I add the following code to "ble_nus.c":

#define test                           0x0005               /**< The UUID of the test Characteristic. */
memset(&add_char_params, 0, sizeof(add_char_params));
add_char_params.uuid = test;
add_char_params.uuid_type = p_nus->uuid_type;
add_char_params.max_len = BLE_NUS_MAX_TX_CHAR_LEN;
add_char_params.init_len = sizeof(uint8_t);
add_char_params.is_var_len = true;
add_char_params.char_props.notify = 1;

add_char_params.read_access = SEC_OPEN;
add_char_params.write_access = SEC_OPEN;
add_char_params.cccd_write_access = SEC_OPEN;

return characteristic_add(p_nus->service_handle, &add_char_params, &p_nus->tx_handles);

But there is no new TX characteristic in nRF connect App. The both other standard characteristics are addet in similar way.

What I´m doing wrong?

Parents Reply Children
No Data
Related