All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 00/15] core: Use shared/gatt for GATT client role
@ 2014-12-09  0:40 Arman Uguray
  2014-12-09  0:40 ` [PATCH BlueZ 01/15] attrib/gattrib: Add g_attrib_get_att Arman Uguray
                   ` (15 more replies)
  0 siblings, 16 replies; 22+ messages in thread
From: Arman Uguray @ 2014-12-09  0:40 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arman Uguray

This patch set integrates shared/gatt into the core bluetoothd for GATT
client role. This set makes the following changes:

  - Made small fixes and added getters to support legacy code paths.

  - Removed explicit primary and included service discovery logic within
    src/device in favor of initializing a bt_gatt_client. This includes
    deferring service/profile registration until the bt_gatt_client is ready,
    and proper handling for "Service Changed" events using gatt_db's service
    added/removed callbacks. When new services are added during a connection,
    the profiles are explicitly probed. The code still creates and maintains
    instances of struct gatt_primary to support legacy plugins.

  - Introduced gatt-callbacks.h. This defines callbacks that are invoked when
    services are removed, the gatt-client becomes ready, and when the connection
    is closed. These callbacks are similar and parallel to the existing ones
    defined in attio.h and provide an alternate solution for shared/gatt.
    gatt-callbacks.h is not meant to be the long-term solution and these may
    perhaps be better served by new GATT specific functions added to the
    btd_profile/btd_service framework.

  - Rewrote the built-in GAP/GATT profile. It no longer handles the GATT
    service and does no MTU exchange (which was racy and did not belong in a
    profile in the first place) as these are handled by shared/gatt-client.
    Renamed the profile to profiles/gap as it only handles the remote GAP
    service and added handling for the "Device Name" characteristic. The profile
    now uses gatt-callbacks instead of attio and bt_gatt_client/gatt_db instead
    of GAttrib.

Arman Uguray (15):
  attrib/gattrib: Add g_attrib_get_att.
  shared/att: Add bt_att_get_fd.
  attrib: Check if attrib is NULL in functions
  shared/att: cancel_all before calling disconnect cb
  shared/gatt-db: Make accessors work on const ptr
  shared/gatt-db: Add UUID arg to foreach_service
  core: device: Use bt_att_register_disconnect.
  core: device: Use shared/gatt-client for GATT.
  core: Rename device_attach_attrib
  core: Use gatt_db service callbacks
  core: Introduce gatt-callbacks
  profiles/gatt: Don't handle GATT service.
  profiles/gatt: Rename profile to gap.
  profiles/gap: Rewrite using bt_gatt_client.
  profiles/gap: Add Google copyright.

 Makefile.am            |   1 +
 Makefile.plugins       |   4 +-
 attrib/gattrib.c       |  31 ++-
 attrib/gattrib.h       |   3 +
 profiles/gap/gas.c     | 321 +++++++++++++++++++++++++++
 profiles/gatt/gas.c    | 457 --------------------------------------
 src/attrib-server.c    |   2 +-
 src/device.c           | 591 +++++++++++++++++++++++++++++++++++--------------
 src/device.h           |   2 +-
 src/gatt-callbacks.h   |  36 +++
 src/shared/att-types.h |   3 +-
 src/shared/att.c       |  12 +-
 src/shared/att.h       |   1 +
 src/shared/gatt-db.c   |  41 ++--
 src/shared/gatt-db.h   |  28 ++-
 tools/btgatt-client.c  |   9 +-
 tools/btgatt-server.c  |   2 +-
 unit/test-gatt.c       |   4 +-
 18 files changed, 885 insertions(+), 663 deletions(-)
 create mode 100644 profiles/gap/gas.c
 delete mode 100644 profiles/gatt/gas.c
 create mode 100644 src/gatt-callbacks.h

-- 
2.2.0.rc0.207.ga3a616c


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-12-09 15:50 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09  0:40 [PATCH BlueZ 00/15] core: Use shared/gatt for GATT client role Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 01/15] attrib/gattrib: Add g_attrib_get_att Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 02/15] shared/att: Add bt_att_get_fd Arman Uguray
2014-12-09 12:50   ` Luiz Augusto von Dentz
2014-12-09 13:04     ` Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 03/15] attrib: Check if attrib is NULL in functions Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 04/15] shared/att: cancel_all before calling disconnect cb Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 05/15] shared/gatt-db: Make accessors work on const ptr Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 06/15] shared/gatt-db: Add UUID arg to foreach_service Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 07/15] core: device: Use bt_att_register_disconnect Arman Uguray
2014-12-09  8:07   ` Johan Hedberg
2014-12-09 13:12     ` Arman Uguray
2014-12-09 15:50       ` Johan Hedberg
2014-12-09  0:40 ` [PATCH BlueZ 08/15] core: device: Use shared/gatt-client for GATT Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 09/15] core: Rename device_attach_attrib Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 10/15] core: Use gatt_db service callbacks Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 11/15] core: Introduce gatt-callbacks Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 12/15] profiles/gatt: Don't handle GATT service Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 13/15] profiles/gatt: Rename profile to gap Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 14/15] profiles/gap: Rewrite using bt_gatt_client Arman Uguray
2014-12-09  0:40 ` [PATCH BlueZ 15/15] profiles/gap: Add Google copyright Arman Uguray
2014-12-09 12:53 ` [PATCH BlueZ 00/15] core: Use shared/gatt for GATT client role Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.