← index #7654PR #6260
Related · high · value 2.348
QUERY · ISSUE

nimble: Indicating a characteristic will also send indications for other characteristics.

openby jimmoopened 2021-08-13updated 2021-08-14
extmod

Related to the send_update arg added to ble.gatts_write in #7564.

The following code on a server (with a connected but unsubscribed client) results in the client receiving an indication for both characteristics.

ble.gatts_write(first_char_handle, "value", True)  # (1)
ble.gatts_write(second_char_handle, "value", False)
ble.gatts_indicate(conn_handle, second_char_handle)   # (2)

I would expect:

  • (1) should not be sent to an unsubscribed client.
  • (2) should only trigger an indication for second_char_handle (regardless of subscription state).

It's not obvious to me that this is being caused by modbluetooth.c / modbluetooth_nimble.c, so might need to investigate in NimBLE (or confirm that this is the expected behaviour). I don't see this for notify, only indicate.

CANDIDATE · PULL REQUEST

modbluetooth: Add event for "indicate acknowledgement".

closedby jimmoopened 2020-07-20updated 2020-07-20
extmod

Added IRQ_GATTS_INDICATE_DONE which will be raised with the status of an gatts_indicate. (Unlike notify, indications require acknowledgement).

Added example to ble_temperature.py and to the multitests in ble_characteristic.py.

Implemented for btstack and nimble, tested in both directions between unix/btstack and pybd/nimble.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied