GATT Client's subscribe() adds the characteristic itself as subscriber.
Therefore the characteristic has to be removed in unsubscribe(), if it's
the last subscriber. Otherwise the clean up does not work correctly and
the CCCD never is set back to 0 in the remote device.
* Add BaseBumbleException as a "real" root error
* Add several core error classes and properly replace builtin errors
with them
* Add several error classes for specific modules (transport, device)
If characteristic supports Notify and Indicate, the prefer_notify option
will subscribe with Notify if True or Indicate if False.
If characteristic only supports one property, Notify or Indicate, that
mode will be selected, regardless of the prefer_notify setting.
Tested with a characteristic that supports both Notify and Indicate and
verified that prefer_notify sets the desired mode.
[85542e0] fix test
[3748781] add ASAH sink example
[e782e29] add app
[83daa30] wip
[7f138a0] add test
[f732108] allow different address syntax
[9d0bbf8] rename deprecated methods
[eb303d5] add LE CoC support
Subscribe command will enable notify or indicate events from the
characteristic, depending on supported characteristic properties, and
print received values to the output window.
Unsubscribe will stop notify or indicate events.
Rename find_attribute() to find_characteristic() and return a
characteristic for a set of UUIDS, a characteristic for an attribute
handle, or None.
Print read and received values has a hex string.
Add an unsubscribe implementation to gatt_client.py. Reset the CCCD bits
to 0x0000. Remove a matching subsciber, if one is provided. Otherwise
remove all subscribers for a characteristic, since no more notify or
indicates events will be comming.
authored-by: Michael Mogenson <mogenson@google.com>