| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This introduces g_attrib_attach_client which can be used to attach a
bt_gatt_client instance to GAttr so it can be used to register
notifications.
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:
warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
[-Wdeprecated-declarations]
g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
|
|
|
|
|
| |
These files are not longer needed since this functionality has been
moved to gatt-db.{c,h}.
|
|
|
|
|
|
|
| |
This fixes the following runtime error:
attrib/gattrib.c:198:2: runtime error: null pointer passed as
argument 2, which is declared to never be null
|
|
|
|
|
|
| |
If the id != 0 that means that a proceedure that needs multiple PDUs is
in progress so use bt_att_resend with its id that way the bt_att id and
gattrib shall always be the same.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
GPL-2.0-or-later : 13
License: GPL-2.0-or-later
attrib/att-database.h
attrib/gattrib.h
attrib/gatttool.h
attrib/gatt-service.c
attrib/interactive.c
attrib/utils.c
attrib/gatt.c
attrib/gattrib.c
attrib/gatt-service.h
attrib/att.c
attrib/gatt.h
attrib/att.h
attrib/gatttool.c
|
|
|
|
|
| |
This enables EATT in the Client Features if the EATT characteristic is
present in the database.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the issues with CSRK tests ext_signed flag has been added to
allow android/gatt handle signed write operations.
This patch fixes following tests:
GAP__TC_SEC_CSIGN_BV_02_C
GAP__TC_SEC_CSIGN_BI_01_C
GAP__TC_SEC_CSIGN_BI_02_C
GAP__TC_SEC_CSIGN_BI_03_C
GAP__TC_SEC_CSIGN_BI_04_C
SM__TC_SIGN_BV_03_C
|
|
|
|
|
| |
If MTU has changed, by bt_gatt_client for example, the code should be
able to figure it out without waiting g_attrib_set_mtu to be called.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Without this patch it is possible to enter infinite loop when
searching included services on remote device. This patch fixes that.
Issue happens when remote device replies with ending handle which is
lower than start handle we use for search
|
|
|
|
|
|
|
|
| |
Without this patch it is possible to enter infinite loop when
searching descriptors on remote device. This patch fixes that.
Issue happens when remote device replies with ending handle which is
lower than start handle we use for search.
|
|
|
|
| |
This is needed for next patch
|
|
|
|
|
|
|
|
|
|
|
| |
Without this patch it is possible to enter infinite loop when searching
characteristics on remote device.
This patch fixes that.
Issue happens when remote device replies with ending handle which is
lower than start handle we use for search.
Found on robustness session on UPF50
|
|
|
|
| |
This will be needed by next patch
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this it is possible to put BlueZ into infinite loop when
doing primary service search on remote device.
Issue happens when remote device replies with ending handle which is
lower than start handle we use for search.
This patch fixes that
Found on robustness session on UPF50
|
| |
|
|
|
|
|
| |
Checks handle value for non-zero as well as >= 0xffff, to avoid
infinite loop and deletion of unspecified attrib handles.
|
|
|
|
|
|
|
| |
The default behavior of GAttrib is to disconnect on unref but patch
0ea75ab4bb3ff96a50785cf2b9860011c49fd7b7 had changed that in order to
fix a warning, this return the old behavior but leaves to bt_att to do
the actual closing.
|
|
|
|
|
|
|
|
|
|
| |
Since bt_att is used internally GAttrib should no longer close the
connection otherwise it cause the following warning:
bluetoothd[31756]: attrib/gattrib.c:g_attrib_unref() 0x610c130: g_attrib_unref=1
bluetoothd[31756]: attrib/gattrib.c:g_attrib_unref() 0x610c130: g_attrib_unref=0
(bluetoothd:31756): GLib-WARNING **: Invalid file descriptor.
|
|
|
|
|
|
| |
With this patch gattrib track all the pending request id's to bt_att.
When doing g_attrib_cancel_all, only those own by gattrib will be
canceled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds means to reuse ATT request id for GATT operations
which might need more then one ATT request for complete GATT operation.
E.g discover primary\included services and discover
characteristics/descriptors
This is needed for the user of gattib, to make sure that ATT request id he
holds is valid during whole GATT operation.
So far, it could happen that gattrib did additional ATT request without
user knowledge which leads to situation that user had outdated ATT
request id.
Note that request id is used by the user for canceling request.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If user provides req_id to the g_attrib_send, he assume that req_id
should be used for transaction.
With this patch, gattrib keeps track on user requested req_id and
actual pending req_id which allow to e.g. cancel correct transaction
when user request it.
Note that for now specific request id is used in attrib/gatt.c for long
write. Next patch will make bigger usage of this but also only in this
helper. We do not expect other attrib clients to use that feature.
|
|
|
|
|
| |
Added the g_attrib_get_att function which returns the underlying bt_att
structure associated with a GAttrib.
|
| |
|
| |
|
|
|
|
|
| |
This patch makes sure that attrib instance will not disappear while
reading characteristic
|
|
|
|
|
| |
This patch adds an early return to attrib/gattrib functions if the
attrib argument is NULL.
|
|
|
|
| |
As described in coding style M10
|
|
|
|
|
|
| |
Using larger buffer than mtu resulted in not sending the message at all
as encode_pdu() in shared/att.c fails when provided data buffer is
larger than current mtu.
|
|
|
|
|
|
|
|
|
|
| |
We were setting only the buffer in gattrib but att was left with the
default value of 23 (LE transport layer defaults). For BREDR transport
layer this may result in using smaller MTU than the minimum allowed
(48).
This was affecting cases when MTU Exchange was not supported by the
remote device and defaults were used.
|
|
|
|
|
|
|
|
| |
This patch implements a version of GAttrib which is backed by
bt_att, which enables the simultaneous use of GAttrib and bt_att.
This should enable smooth transition of profiles from the GAttrib
API to the src/shared bt_att API.
|
|
|
|
|
| |
In prep to use shared stack, this is unused and not functionally
supported by bt_att.
|
|
|
|
|
|
| |
g_attrib_register(..., GATTRIB_ALL_REQS, ...) behavior would previously
include indications, this fixes it to only include requests and
commands.
|
|
|
|
|
| |
This function is only used in one place and encryption is the
responsibility of the channel, not the attribute.
|
|
|
|
|
|
| |
Instead of using the default MTU, use one passed
in by the user, and detect it from the channel when
it is created.
|
|
|
|
|
|
| |
Probing for the MTU using bt_io is problematic for
testing because you cannot impersonate AF_BLUETOOTH sockets
with a socketpair.
|
|
|
|
| |
This function is not used, and also not implemented.
|
| |
|
|
|
|
|
| |
Discover all attributes in given range. In same cases we ommited
last attribute in range.
|
|
|
|
|
|
|
| |
As per spec (BT spec 4.1 Vol[3], Part F, chapter 3.4.5.4) we need to
take opcode, handle and parameters to generate signature.
In order to support it signing is moved to att.c, place where pdu is
encoded
|
|
|
|
| |
Replace spaces with tabs.
|
| |
|
| |
|
|
|
|
|
| |
This function is no longer used since all code is changed to use
gatt_discover_desc instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds gatt_discover_desc() function which performs descriptor
discovery in a manner similar to gatt_discover_char(), i.e. it does
complete discovery procedure and returns list of descriptors found when
finished. For 16-bit UUIDs in addition to string UUID, short UUID is
provided.
It's also possible to specify single descriptor UUID to look for and
discovery procedure is interrupted as soon as UUID is found. This way
no more than one descriptor is returned which is useful when searching
for common descriptors like CCC.
|