Re: How to add "Service Changed Indication"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kenny,

On Sun, Jan 24, 2021 at 12:45 AM Kenny Bian <kennybian@xxxxxxxxx> wrote:
>
> Hello,
>
> We implemented a GATT server on Linux in Python. The code is based on
> the code sample(https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-gatt-server).
> The BlueZ version is 5.48. But we found a problem. The cached data in
> /var/lib/bluetooth caused the mobile app to crash if some
> characteristics are changed. After some research, we found "Under BLE
> standard 'Generic Attribute'(0x1801), there is a Characteristic
> 'Service Changed' (0x2A05) with 'indicate' property", see
> https://github.com/espressif/esp-idf/issues/1777.
>
> The questions we have:
> How to enable the "Service Changed Indication"(0x2A05) in the
> bluetooth? Is there any code example in Python?

If you are registering the services with Bluetoothd then it should
generate the service change automatically:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/gatt-database.c#n1185

When a new service is registered it is indicated here:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/gatt-database.c#n1452


-- 
Luiz Augusto von Dentz



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux