Age | Commit message (Collapse) | Author |
|
Use proper defines for the ATT CID and PSM. The values are really ATT
and not GATT specific so move them from gatt.h to att.h.
|
|
btd_device_add_service is no longer necessary if the object paths for
the primary services can be returned during the registration.
|
|
This patch registers the object paths for primary services exported
through SDP. PSM, start and end handle information are available in
the Protocol Descriptor List.
|
|
When the connect_cb() takes too long to be called the event_loop goes to
idle state and executes the callback too early
|
|
This patch is required until the MTU kernel patch is integrated. Without
it the kernel returns zero for basic rate OMTU.
|
|
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.
|
|
The attrib plugin is deprecated and it is not used anymore. Remove it
and all related configuration. Note that GATT utility (gatttool)
configuration item was moved to Makefile.tools and it is compiled when
--enable-tools is used in configure.
|
|
|
|
The GATT example server was in the same plugin as the GATT client.
Moving it to a separate plugin will allow to easily disable it.
|
|
In some cases, when the device is already connected there's no need
to create another GAttrib instance.
This will allow the Attrib client to use the connection already
estabilished, this will be very useful when we support more
LE profiles.
|
|
Now that Attrib client is being moved to the core, there's no
need to have explicit _init and _exit methods.
This also means that we need to pass the DBusConnection explicitly
to the registration method.
|
|
Now that the GATT client functionality is being moved to the
core we need to register the interface when the device is created.
|
|
|
|
|
|
|
|
Prior to this commit, there were local buffers inside GATT functions.
Now, a single buffer is used, to make sure the MTU limit is respected.
|
|
The new buffer is allocated in g_attrib_new() and it will be used to
send/receive PDUs. The buffer size is the MTU read from L2CAP channel
limited to ATT_MAX_MTU. Functions to handle the buffer size were also
created.
|
|
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.
|
|
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.
|
|
|