We want only the profile that implements a service to be notified of
changes on that service. Before this patch, all the registered event
notifiers are being called.
The Core spec allows to implement Read Long Characteristic Value as a
Read Request, followed by zero or more Read Blob Requests, therefore the
offset parameter is unnecessary and is always 0 for normal use.
This patch fixes end condition for Characteristic Descriptor Discovery.
This sub-procedure is complete when the Error Response is received and
the Error Code is set to Attribute Not Found or the Find Information
Response has an Attribute Handle that is equal to the Ending Handle of
the request.
size_t/ssize_t/off_t/etc are more appropriate for variables denoting
some kind of size than simply using int.
This patch includes a couple of other related changes to avoid gcc
signedness errors resulting from it treating (for whatever reason) const
variables and integer literals as signed.
Extending the function gatt_write_char for support GATT Write Long
Characteristics. MTU is checked and if the payload does not fit,
the prepare and execute write are used to do the transaction.
This patch avoids invalid memory access when decoding ATT read response
PDUs. The ATT_MTU value is a per ATT Bearer value defined by the higher
layer specification.
This patch makes possible to specify LE address type.
After advertising cache was removed from kernel we should always specify
address type for LE link when calling bt_io_connect() as otherwise random
will always be used.
LE address type can be specified either by 'addr-type' or 't' command line
parameter or as additional parameter to 'connect' command in interactive mode.
Possible values are 'public' (default) and 'random'.
In interactive mode, when connection is lost, the prompt used to remain
in "connected" state. This patch fixes that case, by always showing the
actual connection state.
The Characteristic read by UUID GATT procedure is not incremental, i.e.
it returns the entire list in a single Read By Type request. Therefore
it should not be called recursively.
According to the specification the characteristics discover and
characteristics discover by UUID use the same opcode and the result
should be filtered by callback.
This patch puts the new UUID functions into use for GATT-related
code, and adds some convenience functions to ATT API (att.h).
Example GATT server is also changed.
Sub-procedure used to write a Characteristic Value to a server when
the client knows the Characteristic Value Handle and the client does
not need acknowledgement.
Removes "le" parameter of gatt_connect() as well the global variables
used to store the le option. LE is now the default transport, if a PSM
value different than zero is given BR/EDR will be selected
Mode required to allow better GATT procedures control. Some scenarios
require sequential commands without disconnection and delay between
operations. It is also desirable to change some connection parameters
of an active connection.