In messages-dummy it is not necessary to add parent folder in the
response to folder-lisintg. when tested with some carkit the present
method is not working when navigating to different folders. so removing
it.
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.
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"
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
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.
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.
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.
Instead of doing include per service in a depth-first fashion do it
in breadth-first like its done for primary and secondary since it is
now possible to insert the include handle, not just append at the end,
it is not longer necessary to fetch the attribute in order to have
included handle.
As a bonus this can also speed up the discovery procedure since it will
result in less traffic over the air.
This introduces gatt_db_insert_included which is similar to
gatt_db_service_insert_included but doesn't require the caller to
know the service where the attribute should be inserted.
Add implementation of Includes property in GATT service interface.
Include services are updated after exporting all services, when new service
has been added or service was removed.
This send an unknown command (0xff) to test that no response is sent
since the spec mandates the server to not respond to commands:
BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F page 2179
'If a server receives a command that it does not support, indicated
by the Command Flag of the PDU set to one, then the server shall
ignore the Command.'
This send an unknown request (0xbf) to test if a response is sent since
the spec mandates the server to always respond to all requests it
receives:
BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F page 2173
'A client may send attribute protocol requests to a server, and the
server shall respond to all requests that it receives.'
Although get_op_type does now check for the command mask it must
respond to anything other than ATT_OP_TYPE_CMD since there is no mask
for response opcode.
This is similar to SCO which disable audio dumping by default so only
signalling data is shown:
< ACL Data TX: Handle 256 flags 0x02 dlen 850 #6041 11:32:29.299212
Channel: 451 len 846 [PSM 25 mode 0] {chan 2}
In order to enable decoding control frames packet_monitor needs to check
if the index is set to HCI_DEV_NONE since that will call packet_ctrl_open
which setups the ctrl and assign it a cookie.