Page 1 of 1

Help with gatt_server_service_table BLE example needed

Posted: Mon Aug 28, 2023 2:23 pm
by netfox
Hello,

I'm in the process of transitioning from Arduino to ESP-IDF, and it has proven to be quite a challenge.

I've dedicated the last couple of days to getting BLE up and running.

I stumbled upon the gatt_server_service_table example and I'm attempting to comprehend its workings.

Currently, I have a specific goal in mind: I want to modify the values of characteristics within a new function or even within the app_main function. How can I achieve this? Despite trying various approaches, I've been unable to update the values successfully. I'm at a loss and reaching out here is my final attempt to find a solution.

Re: Help with gatt_server_service_table BLE example needed

Posted: Tue Aug 29, 2023 11:15 am
by netfox
Fixed!
esp_ble_gatts_set_attr_value(heart_rate_handle_table[APP_CHAR_VAL_A], sizeof(nval), nval);
esp_ble_gatts_send_indicate(heart_rate_profile_tab[PROFILE_APP_IDX].gatts_if, 0, heart_rate_handle_table[APP_CHAR_VAL_A], sizeof(nval), nval, false);