How do you set the Device Information Service to use notify in the char_props?

Using Nordic SDK 17.1

We've enabled the DIS ble service on our nrf52840 based board and can read each characteristic from the service but it takes around 60 millisec for each read to finish (using a custom iOS swift app).

We need to reduce this time and wanted to see if enabling notify on the DIS characteristics would work, but are having trouble testing it.

This is part of our DIS init code:

// Initialize Device Information Service.
    memset(&dis_init, 0, sizeof(dis_init));

    ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, (char *)DEVICE_NAME);
    ble_srv_ascii_to_utf8(&dis_init.model_num_str, (char *)MODEL_NAME);
    ble_srv_ascii_to_utf8(&dis_init.serial_num_str, (char *)blem_get_serial_number());
    ble_srv_ascii_to_utf8(&dis_init.hw_rev_str, (char *)sys_get_hardware_version_string());
    ble_srv_ascii_to_utf8(&dis_init.fw_rev_str, (char *)sys_get_firmware_version_string());
    dis_init.dis_char_rd_sec = SEC_OPEN;

    err_code = ble_dis_init(&dis_init);

Inside the ble_dis.c code I tried to modify the add_char to so that each characteristic had the notification flag set like this:

add_char_params.uuid            = uuid;
add_char_params.max_len         = char_len;
add_char_params.init_len        = char_len;
add_char_params.p_init_value    = p_char_value;
add_char_params.char_props.read = 1;
add_char_params.read_access     = rd_sec;
//here
add_char_params.char_props.notify = 1;

But this didn't work.

What should I do?

Parents Reply Children
No Data
Related