| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
By convention, BlueZ code checks for "Gsource id" like variables using:
if (source_id > 0)
...
Also fix the variable type to match that returned by
g_attrib_unregister().
|
|
|
|
|
|
|
| |
If device is removed while there is no connection, scan->attrib will be
NULL, because its reference is managed by attio connect/disconnect
callbacks. This means that on disconnect any resources owned by GAttrib
will be properly destroyed.
|
|
|
|
|
| |
"scan" will be g_free()'d on this same function, so no need to assign 0
to refresh_cb_id.
|
|
|
|
|
|
|
|
|
| |
When discovering descriptors, if there is only a single descriptor, the
start handle will be equal to the end handle. It is valid to issue the
Find Information Request on this case.
Before this fix, notification for Scan Refresh characteristic was never
enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if no callback was given to gatt_write_char(), it was
assumed that a "Write Without Response" (which uses Write Command)
should be used instead of Write Request.
This "shortcut" is unnecessary (there is gatt_write_cmd() for the
situations where Write Without Response is required) and just duplicates
code.
This commit also fixes the few places where gatt_write_cmd() should be
used.
|
|
|
|
|
|
| |
The old name referred to the underlying ATT PDU (Find Information
Request and Find Information Response) and not to the actual GATT
procedure (Discover All Characteristic Descriptors).
|
|
|
|
|
| |
Avoid maintaining an internal list of probed struct scan instances by
making use of btd_service's userdata pointer.
|
|
|
|
|
| |
Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the profile probe mechanism in order to pass the btd_service
instance representing the remote service. This object is bound to a
btd_profile and a btd_device, thus replacing the previous parameters.
The probe callback is allowed to hold a reference to the btd_service
by means of btd_service_ref(), which should be unreferenced during
removal.
Keeping such a reference of the btd_service allows supporting multiple
instances of the same UUID, since the reference can serve as a handle
during the interactions between the profile implementation and the core.
|
|
|
|
|
|
| |
Each instance of btd_profile is associated to one single remote UUID
and therefore the list provided by the callback is redundant and can be
removed.
|
|
|
|
|
| |
The code can be considerably simplified by constraining struct
btd_profile to one single remote UUID.
|
|
|
|
| |
These headers are not public anymore, so need to use "lib/uuid.h".
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8a03376544b046a84301847d1594f6c3674983ff.
The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.
Conflicts:
Makefile.am
Makefile.obexd
profiles/cyclingspeed/cyclingspeed.c
profiles/heartrate/heartrate.c
src/error.c
|
|
|
|
|
|
|
|
|
|
| |
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.
gdbus/ directory is left out, since it would break other projects using
it.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This patch avoids the characteristic discovery for Scan Interval Window
if the attribute value handle was discovered on a previous interaction.
|
|
|
|
|
|
|
| |
This patch implements the update procedure of the scan parameters
when the Scan Server requests. The Scan Refresh characteristic is
used to inform the Scan Client(BlueZ) that the Scan Server requires
the most recent scan settings.
|
|
|
|
|
| |
This patch registers the GAttrib notification handler for Refresh
Characteristic notification.
|
|
|
|
|
| |
This patch discovers the Scan Refresh Characteristic handle and sets
it's Client Characteristic Configuration bit to enable notifications.
|
|
|
|
|
|
| |
This patch adds the handle discovery of the Scan Interval Window
Characteristic and writes the default value (hard-coded in the kernel)
of the scan interval, and scan window in the remote's characteristic.
|
|
|
|
|
|
|
|
| |
This patch add the functions to manage ATTIO callbacks. The current
registration mechanism is not suitable for this service since it needs
to be passive. Scan Parameters should not actively request connections,
it needs to be notified if the connections has been established
requested by other services.
|
|
|
|
|
| |
This patch add the probe and remove callbacks for the GATT Scan
Parameters service.
|
|
This patch adds the Makefile changes and plugin declaration to support
Scan Parameters service. BlueZ will act as Scan Client writting to a Scan
Server the scanning parameters.
|