Age | Commit message (Collapse) | Author |
|
When the connection fails an error should be returned to inform
the user.
This adds a field to store the DBusMessage that caused the error,
so we can send the correct reply.
|
|
The previous behaviour could lead to some problems, as it returned
as soon as possible. To avoid problems we return just after as the
characteristics are discovered, and to save a few round trips we
return the path of all characteristics that belong to this service.
After this method return it will try to read the characteristics
values.
|
|
|
|
|
|
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.
|
|
If callback is not informed, Write Command will be used to execute
a Write Without Response sub-procedure. Error is not returned by the
server no matter the result of the operation.
|
|
|
|
|
|
|
|
Some tests require an arbitrary offset.
|
|
The MTU variable in GAttrib struct was not being used for any operation
so it should be removed.
|
|
Use glib memory allocation functions instead of malloc for attribute
data list in ATT protocol utility functions.
|
|
|
|
|
|
The attr_data_from_string() function will be used in interactive and
usual gatttool so this function was moved to common file utils.c.
|
|
|
|
|
|
|
|
As we want the connection to be closed when the last GAttrib
reference is dropped, we don't need to keep this reference.
|
|
This patch adds support to destroying the GATT connection
when a GATT server doesn't respond for more than 30 seconds.
A function to destroy the GAttrib is introduced and it is used
in the timeout case and when the last GAttrib reference is
dropped.
|
|
Just remove an extra empty line.
|
|
These callbacks will allow profiles to act before an attribute is read
and after it is written, to e.g. update the attribute value to/from an
external source.
Note that by the time the callback is called, the necessary security
checks (attribute permissions, authentication and encryption) were
already performed by the core attribute server.
The callback can optionally return an ATT status code, which will be
sent to the client using an Error Response PDU.
|
|
GATT related SDP records should not be added if "AttributeServer" option
is false in the configuration file. Problem happens only when attribute
plugin is enabled.
|
|
|
|
This patch implements discard of obviously malformed
GATT notification/indication PDUs.
|
|
|
|
Includes the parameters info on help.
|
|
|
|
Add capability to register SDP record for Primary Services.
|
|
|
|
|
|
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
|
|
Since do_connect() is used in both interactive.c and gatttool.c
files, it was moved to a new file that should hold all common functions
|
|
|
|
This wrong include is triggering compiler warning: implicit declaration
of function 'strdup'.
|
|
|
|
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.
|
|
Add option and callbacks for Write Request operation in gatttool.
|
|
The encode/decode functions for Write Response operations were created
to keep consistency with the rest of GATT API.
|
|
Update gatt's listen-mode flag whenever connect_cb() is called again.
|
|
g_slist_concat uses the items from second list directly so they should
not be freed.
|
|
|
|
It is important for the Attribute Server to be aware of and completely
fill response packets up to the full MTU when reading long attributes.
Some remote devices will only request additional (READ_BLOB) data if the
preceding read sent the maximum amount of data.
Incoming connections are identified as L2CAP or LE by pointers to the
Service IO channel the incoming connection was recieved on in the
user_data parameter. L2CAP channels are set to the BR/EDR minimum MTU of
48, and LE channels to the LE payload size of 23.
|
|
The Discover() operation (from DBus API) was registering the same
characteristics after running several times. This can be checked using
test-attrib.
|
|
|
|
The attribute client (attrib/client.c) and gatttool share similar code
to parse the PDU coming from server. This commit moves this common code
to attrib/gatt.c, and simplifies the callbacks implemented by the
clients. The client callbacks are now called just once and get a GSList
of characteristics, instead of the raw PDU.
|
|
The gatt_primary_t typedef was renamed to gatt_cb_t because it will be
used for primary and characteristic callbacks.
|
|
Initial patch to move the shared code related to Discover All Primary
Services and Discover Primary Services by UUID to gatt.c.
|
|
GATT service (like GAP one) should be moved to the core attribute server
because there can be only one instance of it.
There was a "Attribute Opcodes Supported" characteristic inside the GATT
service in attrib/example.c which is not defined by the Core
specification and was removed before moving the code.
|
|
GAP service shall be registered only once, so it makes sense to move it
to the core attribute server code.
The GAP "Device Name" characteristic was always "Example Device" on the
example server. This has been changed to use the Name attribute from
main.conf.
|