Commit 5a9709c
committed
bluetooth: lbs: fix button characteristic properties
When CONFIG_BT_LBS_POLL_BUTTON is not set, the Button characteristic
was declared with BT_GATT_CHRC_READ in its properties, advertising
to peers that the characteristic is readable. However, the read
callback and user data are both NULL in this configuration, causing
Zephyr's GATT host to return BT_ATT_ERR_READ_NOT_PERMITTED on any
read attempt.
Remove BT_GATT_CHRC_READ from the #else branch so that only
BT_GATT_CHRC_NOTIFY is advertised when button state polling is
not enabled.
Fixes: KRKNWK-21157
Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>1 parent 7bbd02a commit 5a9709c
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
| 107 | + | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments