Hi, I am trying to determine if there is an error in the generated code or if I am not performing the actions correctly. I am trying to Update Characteristic User Description value in Bluetooth Developer Studio generated code.
I am working on a nRF52840 dev kit with SDK v14.0 and my BDS has plugin v1.3.0 sdk14. In BDS I've created a custom service with a few custom characteristics. Each of those I've added the User Description descriptor 0x2901. I've copied the generated output to my experimental/bluetoothds_template project, made the necessary Your_job
modifications, and flashed my device. In the Android app I am able to read/write my characteristic just fine and read the initial User Descriptor just fine.
When I try to update the User Descriptor, I never see change in the android app after reading. In file ble_XX_service.c
setting the init value in ble_XX_service_init
works just fine the lines
ble_add_char_user_desc_t XX_characteristic_user_description;
uint8_t XX_characteristic_user_description_val[] = {'b', 'd', 's' };
In my main I call
ble_ipn_monitor_service_XX_t test;
test.XX_characteristic_user_description.user_description.p_str = ptr_to_my_new_string;
test.XX_characteristic_user_description.user_description.length = size_of_my_new_string;
ble_ipn_monitor_service_XX_characteristic_user_description_set(&m_XX_service, &test.XX_characteristic_user_description);
But I never see the set update take effect. In ble_XX_service.h
are
ble_gatts_char_handles_t XX_handles; /**< Handles related to the testchar characteristic. */
ble_gatts_char_handles_t XX_characteristic_user_description_handles; /**< Handles related to the Characteristic User Description descriptor. */
The generated setup init code uses XX_handles
and the _set function uses XX_characteristic_user_description_handles
but I cannot find where XX_characteristic_user_description_handles
gets properly initialized. I think this is the Bug.
Anyone have experience with this?