History log of /system/bt/btif/src/btif_gatt_util.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
26f8828cdb5f02b0b01bafaccd4ad0b0ba9d57ab 17-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Use handles to identify GATT attributes (1/4)

Bug: 27778668
Change-Id: Id7454450c1ce2164001a1f9ca0b91f18d84e3fd6
/system/bt/btif/src/btif_gatt_util.c
a5090f2c33919f57c82107ec62ce5ec5705e7e21 26-Feb-2016 Prashant Malani <pmalani@google.com> Fix miscellaneous compilation errors

- Move variables within #defines to avoid unused errors.
- Place #define's correctly to avoid unused function errors.
- Correct parameter passed into a function.

Bug: 27336841
Change-Id: I7c2ab24b3bd3725d126c90483473af83b88687a2
/system/bt/btif/src/btif_gatt_util.c
abd70abb5e42c9431df94fe9d2c4a78a0d8d9af9 05-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Replaced osi_getbuf()/osi_freebuf() with osi_malloc()/osi_free()

Removed the alternative buffer allocation osi_getbuf() / osi_freebuf()
and use instead osi_malloc() / osi_free().

Correspondingly, replaced usage of osi_freebuf_and_reset()
with osi_free_and_reset().

Bug: 24914560
Change-Id: I7a9599ba7fa900321f087da684428133eb0ddd6b
/system/bt/btif/src/btif_gatt_util.c
20524d393e8b3bea4c573f7980cd843500b0e6a4 03-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Refactor usage of osi_free() and osi_freebuf()

* Allow to call osi_freebuf(ptr) on NULL pointers. This simplifies
the code: a notable number of "if (foo != NULL)" checks are removed.
* Add new function osi_free_and_reset(p_ptr) that frees the buffer,
and explicitly resets the pointer to NULL.
This prevents unintended usage of free memory.
* Add corresponding function osi_freebuf_and_reset(p_ptr)
* Minor cleanup around usages of osi_free() and osi_freebuf()

Also:
* Removed unused function btif_gattc_cleanup()
* Replaced usage of the following functions with osi_freebuf_and_reset()
- mca_free_buf()
- utl_freebuf()
- btif_hl_free_buf()
* Replaced usage of rc_supported_event_free() with osi_freebuf()
* Replaced usage of btif_hl_get_buf() with osi_getbuf()
* Eliminate some of the osi_get_buf_size() calls

Bug: 22948224
Change-Id: Ife860658b26274da6f228d7353cb0f1531587337
/system/bt/btif/src/btif_gatt_util.c
258c2538e3b62a8cdb403f2730c45d721e5292b4 28-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - moved GKI buffer allocation wrappers to OSI

* Moved the following GKI buffer allocation functions to OSI:
- GKI_getbuf() -> osi_getbuf()
- GKI_freebuf() -> osi_freebuf()
- GKI_get_buf_size() -> osi_get_buf_size()

For now we need the osi_getbuf() / osi_freebuf() allocation wrapper,
because we need to be able to call osi_get_buf_size() on the allocated
buffer.
In the future those should be replaced with osi_malloc() / osi_free().
Currently, the osi_malloc() buffer size internal allocation tracker
does not always track the size, hence we need the osi_getbuf() wrapper.

* Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE

* Added new file include/bt_common.h that can be usee to include
few files that should be included alost everywhere (e.g. bt_target.h"
NOTE: This file might be removed in the future and we should include
everywhere the right set of header files.

* Removed some of the GKI-related references

* Removed file include/gki_target.h

Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/btif/src/btif_gatt_util.c
08393054f0867d0f86a7f9c2eb156e67a86382c7 07-Aug-2015 Marie Janssen <jamuraa@google.com> resolved conflicts for merge of 49a86709 to mnc-dev-plus-aosp

Change-Id: Icd7ec2fd78ac4383da430708a88abaeba9009437
49a86709488e5cfd5e23759da18bf9613e15b04d 08-Jul-2015 Marie Janssen <jamuraa@google.com> build: LOG_TAG consistency, include order, build fixes

Fix the order of includes across a bunch of files, and declare LOG_TAG
at the top of every file in which it is used.

Consistently use bt_ as a LOG_TAG prefix.
Fix issues with LOG macro usage.
Remove unused includes and double-includes (when in related .h)

Add includes as necessary to compile cleanly (problems surfaced by
reordering includes)

Change-Id: Ic55520c8302b06bbc1942c10c448b20844669da6
/system/bt/btif/src/btif_gatt_util.c
9a78e8d25416325308fa700bb38459817eeb5c7a 08-Jul-2015 Marie Janssen <jamuraa@google.com> am 49120dc8: build: Fix LOG_TAG define breakage, macro usage

* commit '49120dc867c7818511b5afec461dfc97d17eef58':
build: Fix LOG_TAG define breakage, macro usage
49120dc867c7818511b5afec461dfc97d17eef58 08-Jul-2015 Marie Janssen <jamuraa@google.com> build: Fix LOG_TAG define breakage, macro usage

Fixes build breakages related to r.android.com/156982

Change-Id: Ib1143c41fe05a17c296226998afdb41a8cb6294a
/system/bt/btif/src/btif_gatt_util.c
d33e39f14834ddfcfad27b9bef5ffb87919a8644 07-Jul-2015 Marie Janssen <jamuraa@google.com> am db554581: build: Update osi log functions, use consistently

* commit 'db554581079863974af8e1289646f5deea6fc044':
build: Update osi log functions, use consistently
db554581079863974af8e1289646f5deea6fc044 26-Jun-2015 Marie Janssen <jamuraa@google.com> build: Update osi log functions, use consistently

Update the LOG_* functions to take a tag argument which makes them more
consistent with the Android Log.*(TAG, s) common syntax and removes
some #define-dependency with osi/include/log.h.

Also update to never use Android log functions directly.

Also contains minor cleanup of some header includes.

Bug: 21569831
Change-Id: If07385cafbea062232ecdbc7c673f908d5ef8921
/system/bt/btif/src/btif_gatt_util.c
4f6c9b4f68d152baf7aa029cbe9b570994584101 10-Jun-2015 Nitin Arora <niarora@codeaurora.org> Use correct transport type while encrypting link

This patch uses the transport type from the GATT event instead
of using the device type stored in NVRAM, to determine the
transport type while encrypting the link. The issue is seen
with dual mode devices, when the connection on LE transport
causes encryption request on the BR/EDR transport

Bug: 21652097
Change-Id: I895756f9c0048b5a559ea00f633b1100109e52b8
/system/bt/btif/src/btif_gatt_util.c
7e92f745d88520a456d0b04bbec58478a193b985 18-May-2015 Chih-Hung Hsieh <chh@google.com> Include gki.h to get correct function declarations.

BUG: 21119653
Change-Id: I8e4caf1946f525ea57fadf003ca3fd7d303976cb
(cherry picked from commit 56350d683a15117b9e80ff3bf3b83671f3a7491a)
/system/bt/btif/src/btif_gatt_util.c
56350d683a15117b9e80ff3bf3b83671f3a7491a 18-May-2015 Chih-Hung Hsieh <chh@google.com> Include gki.h to get correct function declarations.

BUG: 21119653
Change-Id: I8e4caf1946f525ea57fadf003ca3fd7d303976cb
/system/bt/btif/src/btif_gatt_util.c
e87ef6dba42ebaa94c7f0200d9e5223d1259b9d9 01-May-2015 Andre Eisenbach <eisenbach@google.com> Use BTM structures for LE pairink keys and store LTK

The long term key (LTK) was not assigned to the correct struct element
before saving the key to NVRAM.

Change-Id: Icfce82f5b70518e725875771756edde0b9caeb88
/system/bt/btif/src/btif_gatt_util.c
b246a1a750c5a337faaa6033b39e78c8bdd4c2fb 10-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit '4bf68bf020c7fd1aabcdc4b5d8f5fbb8bacdec9d' into merge_work

Change-Id: Ibc6d6e691b7f97611d16f96220346dfd6ffbbf52
f538707fe64c62b1dbb8e4210e4a1bfa0bab2b56 10-Feb-2015 Satya Calloji <satyac@broadcom.com> OnFound/OnLost feature changes based on Google spec v0.90

Bug: 19609671
Change-Id: If9e61b405a141cb77fb65741d08227284cb22ccd
/system/bt/btif/src/btif_gatt_util.c
e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe 31-Mar-2015 Etan Cohen <etancohen@google.com> Merge commit 'f7f839985b3931682363d2ef3b7c5cae55a842ee' into merge

Change-Id: Iaaec1ea0bf3009b7e32a9a60f697631a3f56e889
f8027005333c88a2f097cfd70d15c3d54c7764ae 12-Mar-2015 Chris Manton <cmanton@google.com> Demote, cleanup and extend observed logging
/system/bt/btif/src/btif_gatt_util.c
95b74f252f534ec757aab1fc08e086e02b2cfe8d 12-Mar-2015 Sharvil Nanavati <sharvil@google.com> Use fully qualified path for btcore includes.
/system/bt/btif/src/btif_gatt_util.c
44802768c447ab480d4227b3a852a97d923b816d 24-Dec-2014 Sharvil Nanavati <sharvil@google.com> Add platform-independent logging macros to OSI.

These macros should replace ALOG* and the various trace macros
used throughout bluedroid. This change eliminates all uses of the
ALOG* macros in favor of the new ones.
/system/bt/btif/src/btif_gatt_util.c
794f3b5f126fffc3dd1129a710187591348bbf23 01-Oct-2014 Chris Manton <cmanton@google.com> Removal of bd.[c|h]

Consolidate legacy types into bt_types.h
/system/bt/btif/src/btif_gatt_util.c
8a6a89faa942aed4f176b0c98402d01c8bdd6aa6 20-Aug-2014 Sharvil Nanavati <sharvil@google.com> Introduce btcore, a low-level library to manipulate Bluetooth data types.

This change adds a single module to btcore: bdaddr. The bdaddr module
is reponsible for manipulating and working with Bluetooth addresses.
/system/bt/btif/src/btif_gatt_util.c
11cf5ccd5cd6dd1568bf69e4b6cbc27c95f5026d 11-Dec-2014 Chih-Hung Hsieh <chh@google.com> resolved conflicts for merge of ed0bdd42 to lmp-mr1-dev-plus-aosp

Change-Id: Ife8b72d3688ed78a95ccb8d5e0b60f40e7fec9e9
104e3f238f500cacdb8afaccdc672dfc34eae7ee 12-Nov-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Cleanups needed to make clang happy

This patch removes a slew of unused variables and some unused functions,
fixes some incomplete initializations of structs and an sprintf
parameter mismatching the format string.

Change-Id: I35f22fdccc8350f885cd357d3685b869224fa433
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/system/bt/btif/src/btif_gatt_util.c
86f97eda524568f2d264186844450db5e56dac36 10-Nov-2014 Matthew Xie <mattx@google.com> Use the device type from saved properties instead of assuming default

DUMO device can do both BLE and BREDR operations. It was wrong
to assign BLE or BREDR type to it.
Bug: 18275230

Change-Id: I8d6c17e5157ba29a1af459629de9e2d6f6dc5e99
/system/bt/btif/src/btif_gatt_util.c
5e808468e0667a6a2a8a1e6de80efbc4f42fa0f0 21-Oct-2014 Andre Eisenbach <eisenbach@google.com> LE: Do not remove bond on encryption failure

If the encryption fails during the re-connection process with a
previously paired LE device, the pairing is removed. Thus, a single
connection failure could lead to the device be unpaired.

This patch prevents unpairing when encryption fails.

Additionally, the IRK is restored from NV ram to fix reconnection to
dual-mode devices.

Bug: 18072300
Change-Id: I077a16d0715fdaa07b95b1c664c18bd839754896
/system/bt/btif/src/btif_gatt_util.c
afa6e1abbedaad8fe854b0f43999b8aeb801af91 28-Jun-2014 Matthew Xie <mattx@google.com> resolved conflicts for merge of e8c3d75b to master

Change-Id: I78ef69c4d54a36243620ae14296d3507e3339567
e8c3d75b75493911ebf0f99c83676359657178f7 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: BTIF and APPL.

Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286
/system/bt/btif/src/btif_gatt_util.c
80fcd9447bc862b321f5bd5c507c2f5839e01c24 11-Jun-2014 Matthew Xie <mattx@google.com> am 8b8050ad: am 197a801b: Merge "Bluedroid: Fix UUID unsigned/signed comparison"

* commit '8b8050ad5f2f4fd64766c99378fa0866d89230c6':
Bluedroid: Fix UUID unsigned/signed comparison
8b8050ad5f2f4fd64766c99378fa0866d89230c6 11-Jun-2014 Matthew Xie <mattx@google.com> am 197a801b: Merge "Bluedroid: Fix UUID unsigned/signed comparison"

* commit '197a801bb5f12675d025bf1b7d2cac40924abe77':
Bluedroid: Fix UUID unsigned/signed comparison
7fa4fba6f59f97df00aff07dbe8fb21b114b3c2c 17-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Merge BT 4.1 features

The features include:
- LE Peripheral Mode
- Link Layer topology (LE Central & Peripheral Concurrency)
- Dual Mode Topology (Ability to choose LE transport when connecting with
other Dual Mode devices)
- Fast advertising Interval
- Limited Discovery Time Changes
- GAP Authentication and Lost Bond
- Dual Mode Addressing
- Common Profile and Service Error Code
- 32 bit UUIDs

Change-Id: Ic6701da4cf6aaa390ff2c8816b43157f36b7fb42

Conflicts:
stack/btu/btu_hcif.c
/system/bt/btif/src/btif_gatt_util.c
b203d478f4835f5e35217874a1787e1914328f7c 21-Nov-2013 Andre Eisenbach <andre@broadcom.com> LE: Add controller based advertising filter API (2/2)

Change-Id: I444654bf19a048d5fcef33f79edbf1cdda3d3b62
/system/bt/btif/src/btif_gatt_util.c
f5726daa6c720685cbc0e5250a2a5ee6b4860210 25-Mar-2014 lpoulain <loic.poulain@intel.com> Bluedroid: Fix UUID unsigned/signed comparison

UUID type was never detected as a 16 bits UUID due to a comparison
between signed and unsigned char in uuidType().

Change-Id: I6205ab4c2568f03b4692e0ce8a1dec216f1cdc0e
Signed-off-by: lpoulain <loic.poulain@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
/system/bt/btif/src/btif_gatt_util.c
8fe58875ce67c6e1099e7ba2339dcd2b979491b0 17-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Merge BT 4.1 features

The features include:
- LE Peripheral Mode
- Link Layer topology (LE Central & Peripheral Concurrency)
- Dual Mode Topology (Ability to choose LE transport when connecting with
other Dual Mode devices)
- Fast advertising Interval
- Limited Discovery Time Changes
- GAP Authentication and Lost Bond
- Dual Mode Addressing
- Common Profile and Service Error Code
- 32 bit UUIDs

Change-Id: Ic6701da4cf6aaa390ff2c8816b43157f36b7fb42
/system/bt/btif/src/btif_gatt_util.c
2d75441cc17236564a431c6a5fc4c9e356fb7294 21-Nov-2013 Andre Eisenbach <andre@broadcom.com> LE: Add controller based advertising filter API (2/2)

Change-Id: I444654bf19a048d5fcef33f79edbf1cdda3d3b62
/system/bt/btif/src/btif_gatt_util.c
facc510f94c02440e9004f31110463cd1d367221 18-Mar-2014 Zhihai Xu <zhihaixu@google.com> Workaround IPHONE problem

When we send LL_ENC_REQ to iphone early, iphone didn't send
LL_ENC_RESPONSE back to us, later the iphone will disconnect from us.
The workaround is to send LL_ENC_REQ after receive first ATT read request
from iphone, Iphone will be ready at that time by experiment.

bug:13417692
Change-Id: Ic42dda36b927df260113771152cff67032b22e5f
/system/bt/btif/src/btif_gatt_util.c
b9238669b5ad298980d60540e8019c4b90a866b1 13-Mar-2014 Zhihai Xu <zhihaixu@google.com> treat BTA_BUSY as success to avoid unpair the BLE device

when switch from peripheral mode, both server and client will
call btif_gatt_check_encrypted_link, the first call will start the
encryption. the second call will get callback with BTA_BUSY status,
before encryption complete, which cause unpair with the remote device.
we shouldnot treat BTA_BUSY as error.

bug:13417692
Change-Id: I065432dde2553e8ccee3a14a7b321b85bca8d3ba
/system/bt/btif/src/btif_gatt_util.c
221b822ce1c42f4a51abc384cf09ca09b6180a9c 01-Apr-2014 Zhihai Xu <zhihaixu@google.com> Merge "Workaround IPHONE problem" into klp-modular-dev
5702d5c6197404823f5e594764e2c67cf2416da1 18-Mar-2014 Zhihai Xu <zhihaixu@google.com> Workaround IPHONE problem

When we send LL_ENC_REQ to iphone early, iphone didn't send
LL_ENC_RESPONSE back to us, later the iphone will disconnect from us.
The workaround is to send LL_ENC_REQ after receive first ATT read request
from iphone, Iphone will be ready at that time by experiment.

bug:13417692
Change-Id: Ic42dda36b927df260113771152cff67032b22e5f
/system/bt/btif/src/btif_gatt_util.c
fc3fba5db90f29b072ebecc231245c8f134b594b 13-Mar-2014 Zhihai Xu <zhihaixu@google.com> treat BTA_BUSY as success to avoid unpair the BLE device

when switch from peripheral mode, both server and client will
call btif_gatt_check_encrypted_link, the first call will start the
encryption. the second call will get callback with BTA_BUSY status,
before encryption complete, which cause unpair with the remote device.
we shouldnot treat BTA_BUSY as error.

bug:13417692
Change-Id: I065432dde2553e8ccee3a14a7b321b85bca8d3ba
/system/bt/btif/src/btif_gatt_util.c
306bddadeec993013cfed6bf0e41a1a47a69367c 07-Nov-2013 Andre Eisenbach <andre@broadcom.com> LE: Add devices to the inquiry db before connecting

Ensure that the remote device type is set correctly by reading the
device information from non-volatile storage and (re-)adding it to
the inquiry database before connecting to a remote GATT device.
bug 11573208
Change-Id: Ifa69da3d5871aed5293ea5e611144874b67afe72
/system/bt/btif/src/btif_gatt_util.c
ace8d679f68cfab4c022d00afc7e5daafc74a4fd 12-Jul-2013 Andre Eisenbach <andre@broadcom.com> LE: Check encryption state before starting encryption

Previously, the btif layer kept track of when a link was encrypted using
an internal list to track encryptino callbacks. This change switches to
querying the stack for the actual encryption state, since the btif layer
may not receive all encryption related callbacks.

Bug: BLTH02382147
Change-Id: I426b87d77e9a18531c2d42733a7e736a73bb116f
/system/bt/btif/src/btif_gatt_util.c
5f9c140d094ebf4a269cdc6ae083900bf25f7fae 09-Jul-2013 Andre Eisenbach <andre@broadcom.com> LE: Add instance ID to descriptors (2/4)

If a remote devices offers multiple descriptors with the same UUID, the
instance ID is used to differentiate between them.

Change-Id: I1f3c284d714719fe9fb9cbb297c70a061c62a96d
/system/bt/btif/src/btif_gatt_util.c
6975b4d711142b885af479721cada448952c6b41 06-Aug-2013 Andre Eisenbach <andre@broadcom.com> LE: UPF 45 bug fixes

This change fixes the following issues:
- Second GATT-over-BR/EDR channel cannot be established when there
already is an existing GATT-over-BR/EDR channel
- If encryption fails for an LE connection due to a missing key,
the security state is not being cleared and blocks all further
security processing
- When DM discovery of an LE Peripheral device fails with a
connection timeout, no further discovery requests can be made
- GATT service discovery can get into endless loop when duplicate descriptor
definitions are found on the remote device
- When GATT over BR/EDR fails, BTA does not give a connection
callback to the application initiating the connection
- BR/EDR connection to remote platform does not generate API callbacks
- Stack crash discovered during UPF after remote disconnects
- The host is sending HCI disconnect to invalid HCI handle when
SMP fails because of a connection timeout
- Possible race condition:
If a disconnect is immediately followed by a connection complete,
the connection complete cannot be processed in the BTA GATT state
machine
- Write Complete event is not triggered for Prepare Write requests

Change-Id: I539cdedd68007818ff4f0d0213cee1c913f72d0f

Conflicts:
bta/gatt/bta_gatts_act.c
/system/bt/btif/src/btif_gatt_util.c
e4020c28c8a9dc56f927b03a8ca3a17d9401bc1e 17-May-2013 Andre Eisenbach <andre@broadcom.com> LE: Add NULL pointer check in deep copy function

Adds a NULL pointer check for the GATT read event deep copy function.

Change-Id: Ia8d31e851589612009e1038c11b7b113e5367c6d
/system/bt/btif/src/btif_gatt_util.c
fc4b2f1953dbe60464d0f5ef7daaa10001fbc62f 07-May-2013 Matthew Xie <mattx@google.com> Solve compilation problem when BLE/GATT/SMP features are false

bug 8664724
Change-Id: I582846ccf4b8995f298d8db533488fceb7993ae3
/system/bt/btif/src/btif_gatt_util.c
ca22ac493ab777199084d87b3c7627e7f27555af 13-Feb-2013 Andre Eisenbach <andre@broadcom.com> LE fixes

- Null pointer exception check added.

An exception occurs at the memcpy in the bta_dm_gatt_disc_result.
User removed the battery on Ble device(Smart Nudge) during bonding
and connection. This exception occurs sometimes.
I used Broadcom LE Explorer to reproduce it.

- Fixed disconnect and encryption behaviour

Disconnect will now disconnect the physical link immediately when no
other application is interested in the device anymore. Also, the
connection to a remote device is now dropped if encryption fails.

- Deep copy buffers when transfering context

Certain BTA server event types require a deep copy of the request
data buffers when transfering context. Shallow copy of the pointers
involved may cause a crash when overlapping read and write requests
are received.

- 2nd encryption has not started

need to send encryption complete callback
when the encryption fail due to link drop without a complete event.
Otherwise BTA layer would not be able to clean up the status,
and no further encryption can be started.

Change-Id: If93e0a188e8779830c8991e4193b96dc95e23e5d
/system/bt/btif/src/btif_gatt_util.c
ead3cde4bac0c3e32cd31f149093f004eef8ceeb 06-Feb-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Initial version of BLE support for Bluedroid

Change-Id: I9825a5cef9be2559c34c2a529b211b7d471147cf
/system/bt/btif/src/btif_gatt_util.c