~vanvugt/bluez:master

Last commit made on 2017-05-30
Get this branch:
git clone -b master https://git.launchpad.net/~vanvugt/bluez
Only Daniel van Vugt can upload to this branch. If you are Daniel van Vugt please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~vanvugt/bluez

Recent commits

d6c07ec... by Luiz Augusto von Dentz <email address hidden>

shared/gatt-client: Fix removing services with no attributes

If a service has no attributes, like IPSS, just mark it as active and
skip doing any attribute discover.

feade20... by Luiz Augusto von Dentz <email address hidden>

core/device: Fix discarding valid events if the addres is updated

If a device gets paired while connected and that causes
device_update_addr dev->bdaddr gets overwritten with identity address
but some parts of the code may still use the initial address used to
connect so this makes device_addr_type_cmp check both addresses.

e4078df... by Luiz Augusto von Dentz <email address hidden>

core/gatt: Don't return an error if notification is already enabled

In case the client is already subscribed and attempt to register again
just return success as the handling should be the same as success.

f585e7a... by Luiz Augusto von Dentz <email address hidden>

client: Fix using RegisterProfile

RegisterProfile no longer works for registering GattProfile instances
as this functionality has been moved to RegisterApplication.

In order to make this more clear this replaces the (un)register-profile
with (un)register-application and enable ObjectManager, here is an
example how to register for 12345678-1234-5678-1234-56789abcdef1:

[bluetooth]# register-application 12345678-1234-5678-1234-56789abcdef1
Application registered

bluetoothd[8777]: src/gatt-database.c:manager_register_app() Registering application: :1.483:/
bluetoothd[8777]: src/gatt-database.c:proxy_added_cb() Object received: /org/bluez/application, iface: org.bluez.GattProfile1
bluetoothd[8777]: src/gatt-database.c:proxy_added_cb() Object received: /org/bluez/agent, iface: org.bluez.Agent1
bluetoothd[8777]: src/gatt-database.c:profile_add() Added ":1.483/org/bluez/application/12345678-1234-5678-1234-56789abcdef1"
bluetoothd[8777]: src/gatt-database.c:client_ready_cb() GATT application registered: :1.483:/

[bluetooth]# unregister-application
Application unregistered

bluetoothd[8777]: src/gatt-database.c:profile_remove() Removed ":1.483/org/bluez/application/12345678-1234-5678-1234-56789abcdef1"
bluetoothd[8777]: src/gatt-database.c:profile_release() Releasing ":1.483"

6b34bdd... by Luiz Augusto von Dentz <email address hidden>

shared/gatt-client: Fix not removing services that had disappeared

If a service cannot be found in the middle of the database the current
logic don't clear its range leaving it still active which cause upper
layer to believe its attributes are still available.

In order to fix the code now loads existing services into the pending
list and remove the services left at the end of the discovery:

src/device.c:gatt_debug() Primary services found: 2
src/device.c:gatt_debug() start: 0x0001, end: 0x0005, uuid: 00001800-0000-1000-8000-00805f9b34fb
src/device.c:gatt_debug() start: 0x0100, end: 0x0104, uuid: 0000180a-0000-1000-8000-00805f9b34fb
src/device.c:gatt_debug() Secondary service discovery failed. ATT ECODE: 0x0a
src/device.c:gatt_debug() Characteristics found: 2
src/device.c:gatt_debug() start: 0x0101, end: 0x0102, value: 0x0102, props: 0x02, uuid: 00002a24-0000-1
src/device.c:gatt_debug() start: 0x0103, end: 0x0104, value: 0x0104, props: 0x02, uuid: 00002a29-0000-1
src/device.c:gatt_debug() service disappeared: start 0x0006 end 0x000a
src/device.c:gatt_service_removed() start: 0x0006, end: 0x000a

bec7657... by Johan Hedberg <email address hidden>

mgmt-tester: Fix controller version number expectation to be 5.0

14f1c75... by Luiz Augusto von Dentz <email address hidden>

unit/test-gatt: Adjust the PDUs for characteristic discovery

The new behavior of bt_gatt_client is to discovery the characteristics
of the entire range (0x0001-0xffff) not service by service.

a39cd38... by Luiz Augusto von Dentz <email address hidden>

shared/gatt-client: Simplify characteristics discovery

Instead of discovering characteristics per service in a depth-first
fashion do it in breadth-first like its done for primary, secondary and
included.

As a bonus this can also speed up the discovery procedure since it will
result in less traffic over the air.

82c7e03... by Luiz Augusto von Dentz <email address hidden>

shared/gatt-db: Add gatt_db_insert_descriptor

This introduces gatt_db_insert_descriptor which is similar to
gatt_db_service_insert_descriptor but doesn't require the caller to
know the service where the attribute should be inserted.

87abac4... by Luiz Augusto von Dentz <email address hidden>

shared/gatt-db: Add gatt_db_insert_characteristic

This introduces gatt_db_insert_characteristic which is similar to
gatt_db_service_insert_charactersitic but doesn't require the caller to
know the service where the attribute should be inserted.