samples/bluetooth: st_ble_sensor: Fixes the button activity notification
This commit fixes the button activity notification not working issue. The right attribute(4) is used for the button service. This has been tested on nucleo_wb55rg and disco_l475_iot1 platforms. Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This commit is contained in:
parent
b09e6fb3c5
commit
4268592dc2
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ static void button_callback(const struct device *gpiob, struct gpio_callback *cb
|
|||
LOG_INF("Button pressed");
|
||||
if (conn) {
|
||||
if (notify_enable) {
|
||||
err = bt_gatt_notify(NULL, &stsensor_svc.attrs[2],
|
||||
err = bt_gatt_notify(NULL, &stsensor_svc.attrs[4],
|
||||
&but_val, sizeof(but_val));
|
||||
if (err) {
|
||||
LOG_ERR("Notify error: %d", err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue