| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is needed to cover Android API
|
|
|
|
|
| |
Android expose to application api for reliable write. Therefore we need
to add this support to gattrib
|
|
|
|
|
| |
According to Core SPEC, attribute data list must be grouped in elements
of the same size.
|
| |
|
|
|
|
| |
Source buffer for write operations should be immutable.
|
| |
|
|
|
|
|
|
| |
Properties are defined by GATT specification. This patch moves and
renames the defines related to Characteristic properties bits from
attrib/att.h to attrib/gatt.h
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
GATT/ATT use little-endian byte order format for 128-bit UUID. No matter
the system byte order representation, internally the core will handle
128-bit UUID on big-endian format.
|