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

how to get nrfConnect BLE to show ASCII string data for a custom characteristic?

I have a custom characteristic on which I send ASCII strings as notifications similar to NUS.  Is there a way to have the Bluetooth Low Energy app in nrfConnect show the data in human readable format?

I tried setting the p_presentation_format to the ble_add_char_params_t  but it didn't seem to have any affect.

static const ble_gatts_char_pf_t logTxPresentationFormat =
{
.format = BLE_GATT_CPF_FORMAT_UTF8S,
};
static const ble_add_char_params_t logTxCharInit =
{
.uuid = LOG_UUID_TX_CHAR,
.max_len = LOG_MAX_DATA_LEN,
.init_len = 0,
.is_value_user = true, //value maintained in user space
.is_var_len = true,
.char_props.notify = 1,
.p_presentation_format = &logTxPresentationFormat,
.cccd_write_access = SEC_OPEN
};

Parents Reply Children
No Data
Related