Help with gatt_server_service_table BLE example needed

netfox
Posts: 8
Joined: Mon Aug 28, 2023 2:18 pm

Help with gatt_server_service_table BLE example needed

Postby netfox » Mon Aug 28, 2023 2:23 pm

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.

netfox
Posts: 8
Joined: Mon Aug 28, 2023 2:18 pm

Re: Help with gatt_server_service_table BLE example needed

Postby netfox » Tue Aug 29, 2023 11:15 am

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);

Who is online

Users browsing this forum: No registered users and 72 guests