9e030fde05352ec4385d7baf6cc2af89e95e039c |
|
25-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Rename bt_bdaddr_t into RawAddress (3/3) Test: compilation test Change-Id: I4571721a0c6165a66450ee157a53d8d15bfc45d0
/system/bt/stack/gatt/gatt_int.h
|
c2276b06572ab6fc1f900fbb1f41087e77d47e2a |
|
10-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Use bt_bdaddr_t instead of BD_ADDR Test: compilation test, sl4a GattReadTest Change-Id: I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
/system/bt/stack/gatt/gatt_int.h
|
d8be0e590aa1efe1c33a8acfea0d7e14fd1a8030 |
|
09-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Get rid of GATT_TRACE_* logs in favour of base/logging.h Change-Id: Id77d313c5bff5e611441599da351a766d0ce5916
/system/bt/stack/gatt/gatt_int.h
|
ed55662b4885a5247bb499fa887b0e77a8cab881 |
|
03-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Simplify read/write start When read or write is started with insuficcient encryption, and the encryption fails, it will either return immediate error GATT_NO_RESOURCES, or the operation will be enqueued. In case the enqueued operation fails again on the BTM_SetEncryption, no callback will never be called, and no operation error will be returned. The gatt_end_operation will never get called for the CLCB, and it will never be freed, causing memory leak. This patch fixes this by making sure that the call to gatt_security_check_start always consumes the CLCB - either by executing operation, queuing it, or returning error. This also ensures that if BTM_SetEncryption fails, it will always be handled the same way - by calling the callback. Test: manual Change-Id: Ibc20c1101cc7b5b6043e75df93b23a5b24b791e9
/system/bt/stack/gatt/gatt_int.h
|
3dda89880b66b0f04f684d138e7c3dc9a0e61597 |
|
06-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Use std::unordered_set for keeping app_hold_link Change-Id: Ia8a0c9a2264979c1ff89faa5ddf17a83fcb7c7ce
/system/bt/stack/gatt/gatt_int.h
|
e4f42abab339b3329aec07502199e11d3d8b3d80 |
|
31-May-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Get rid of clcb_idx in favour of pointers Test: compilation test Change-Id: Ib2c4b13b85343693e6cff4a94eed49382e3aec00
/system/bt/stack/gatt/gatt_int.h
|
d1a9313471ed5290ca560305978c3107020272c2 |
|
31-May-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
use std::queue for keeping tGATT_CMD_Q Test: compilation Change-Id: I4df9a075d27a306067c48c652f5da1fb156c4a9b
/system/bt/stack/gatt/gatt_int.h
|
7cfd8391f6db2d387ea556ca2b7be0a7e4791e5d |
|
06-Jun-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Refactor tGATT_BG_CONN_DEV * Use list for keeping the devices instead of fixes array, get rid of the in_use field. * Use unordered_set instead of array to keep gatt_if of apps interested in specific device. * the in_use flag was never cleared before, this had the potential to fill the whole array when multiple devices were addred/removed to the whitelist. This issue is fixed now. Test: compilation test Change-Id: Id87c2ae9c5b0ce0887a4fa9be50e34d646d22a13
/system/bt/stack/gatt/gatt_int.h
|
f4c0292c63085cd4d0f5c001974b6503aeaf8ed3 |
|
30-May-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Pass GATT cb's by reference and other style fixes Test: compilation test Change-Id: I410d0d0a0bf49b9f3ca5e034c66fe8e82661cee7
/system/bt/stack/gatt/gatt_int.h
|
eb3ab848f8361d54faa3a997fbecfe48af9de731 |
|
30-May-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Use std::queue for pending_enc_clcb Test: 62188929 Change-Id: Ide07f15c5e5b6bc8b93ac350081b7bef7c7b3938
/system/bt/stack/gatt/gatt_int.h
|
8663a87ea030b8b7cba15772e95019e9ff4ea97f |
|
27-May-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Get rid of unused tGATT_SCCB Test: compilation test Change-Id: I32fee6a93442c8415f7d855c1e4802bceb6fe5ff
/system/bt/stack/gatt/gatt_int.h
|
6395f1547ed6179dcdeed392bd9909d18772fb25 |
|
09-May-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Improve GATT Server database handling. - use references instead of pointers where possible. Thanks to it we can remove some reduntant null checks and simplify the code. - use directly allocated memory instead of own buffers. Thanks to it the stack uses around 12kb less of memory after startup. - use list and vector from std library, instead of some hand-written implementations. This patch is a prerequisite for further server refactoring, that will further reduce the space used, make unit-testing possible, and enable proper handling of PTS GATT tests. Test: sl4a GattReadTest Bug: 38225928 Change-Id: I1620be682259ccb8f0c02754806e355e3f1ad0c1
/system/bt/stack/gatt/gatt_int.h
|
96fb273d92a31204edcf43ab2594a19876d14056 |
|
25-Mar-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Add option to specify initial LE connection PHY (1/3) For whitelist connections we always use all possible PHYs, for direct connection use PHY specified by client. Test: manual Bug: 30622771 Change-Id: I720f134e2800dc3d282135bb7ffbe3882117c680
/system/bt/stack/gatt/gatt_int.h
|
eafd45d08653bb1621c82a2f3cf922a43a0b1bc5 |
|
23-Mar-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Set preferred PHY and read PHY implementation (3/3) Test: manual Bug: 30622771 Change-Id: I4267238a0b5c7bc373ae1846ebd19a716881a4ec
/system/bt/stack/gatt/gatt_int.h
|
ad1e23d50e431fb82ff1b8d3ce02f64ca0c5a940 |
|
10-Dec-2016 |
Jack He <siyuanh@google.com> |
Remove extern "C" from header files Since change 290046, most files in system/bt is compiled as C++ source. Therefore, there is no longer a need for the extern "C" wrapper around includes that export symbols from those sources. The following python script is applied to each file in the directory: front = '#ifdef\s+__cplusplus\s+extern\s+"C"\s+{\s+#endif\s+' back = '#ifdef\s+__cplusplus\s+}\s+#endif' with open(sys.argv[1], "r") as f: data = f.read() data = re.sub(front, "", data) data = re.sub(back, "", data) print data through a shell script: for file in $(find . -name "*.h"); do python remove_cpp_extern_c.py $file > tmp cat tmp > $file rm tmp done with following files not edited: * stack/include/a2dp_* * include/bt_trace.h * embdrv/sbc/* Bug: 33492510 Test: Code compilation, BtFunhausMetricsTest, BtStressTest Change-Id: Iac21cdfb1924b50478dd0b82326e092602cbc9d4
/system/bt/stack/gatt/gatt_int.h
|
911d1ae03efec2d54c3b1b605589d790d1745488 |
|
29-Nov-2016 |
Myles Watson <mylesgw@google.com> |
Apply clang-format to the rest of the tree find * | grep "\.[ch]" | xargs clang-format --style=file -i Test: mma -j32 Change-Id: I6fcc9862bb7bc07c2a367ca58fef2b3cd27a6f05
/system/bt/stack/gatt/gatt_int.h
|
a60c5fdaa2e22bd0a65139353b346f43ca2c6dd7 |
|
15-Nov-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Remove unused GATT_Listen Bug: 30622771 Test: still builds Change-Id: I4003a1241e611c9c1f2a21090ea3ba7530b0643a
/system/bt/stack/gatt/gatt_int.h
|
2e8c421ddce1dae511a39b8e89415e8eb1944bfd |
|
29-Oct-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Remove advertise whitelist functionality Advertise filtering is never used. It is not finished - adding device to whitelist can never succed. It is also making advertising API unification hard. Bug: 30622771 Test: no tests necessary Change-Id: I9df9ea18b265a580c2fcdb28a6d6ce4be43f0a24
/system/bt/stack/gatt/gatt_int.h
|
b2a292b5d8df2f359c38b0787bc01181225a9bc9 |
|
15-Oct-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Renamed most C files to C++: *.c to *.cc Also: - Fixed C++ related compilation errors. - Added missing 'extern "C"' guards in some of the header files. - Added missing LOCAL_CPP_EXTENSION to Android.mk files. - Added-back btif/src/btif_mce.cc and bta/mce/bta_mce_* to btif/Android.mk and bta/Android.mk respectively. - Fixed the alphabetical ordering of the *.cc files in some of the Android.mk files. - Added missing Copyright header to "osi/include/list.h" - Updated "osi/src/wakelock.cc" to use C++ std::string instead of dynamic allocation of C-style strings. Test: code compilation, unit tests, and A2DP streaming Change-Id: Ia2f7215ed9df32775c701b68fc86b09875b942c7
/system/bt/stack/gatt/gatt_int.h
|
37c1b5f8ccf4fc6d5132e07f98f0f40f65d5bfaf |
|
15-Oct-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Removed unused *_DYNAMIC_MEMORY conditional statements Test: compilation from the top-level directory Change-Id: I181e6ae2e71c232ca0dc733dabda5cb0fc2672d8
/system/bt/stack/gatt/gatt_int.h
|
109891d07f7946c69070a01e0ebef56ee3eb7707 |
|
18-Jul-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Make gatt_attr use opportunistic connection This patch creates new connection mode - opportunistic connection. When such connection is made, no call to gatt_update_app_hold_link_status will be made when it's started. This means that connecting and disconnecting in this mode won't trigger disconnect timer. When other, app creates regular connection and then disconnects, the physical connection might get disconnected. Opportunistic connection is used only for code setting CCC right now. Bug: 30186455 Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e
/system/bt/stack/gatt/gatt_int.h
|
d19e0785e662e640191a075eda07acce61c2aeda |
|
15-Jul-2016 |
Marie Janssen <jamuraa@google.com> |
Use standard types, consistent ifdef style everywhere Remove the typedefs in stack/include/bt_types.h Use standard types everywhere. Use standard style for #if statements: - #if (VAR_NAME == TRUE) - #if (VAR_NAME1 == TRUE && VAR_NAME2 == TRUE) Use __func__ instead of __FUNCTION__ Fix some debug statements to use __func__ Update script to be less disruptive to aligned assignment blocks. Change-Id: I8f8f068e6c26ce74fd3b3707e1e31fd0b919cdd0
/system/bt/stack/gatt/gatt_int.h
|
a641b6fa2a25e1b5382945d13c4fa49d36084a78 |
|
26-Mar-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
GATT Server refactoring (4/4) Right now in order to add gatt service, we need to add it piece by piece - each characteristic and descriptor separately. This causes lots of concurrency errors in higher layers. Instead accept whole service definition and start whole service at once. Also, use handles to identify GATT server attributes. It's already done on clinet side. Bug: 27999121 Change-Id: I42c796809423d116fe6755ef8b1c40da270427a5
/system/bt/stack/gatt/gatt_int.h
|
c88b20a599a52228c7b29d03751b7f13868d417a |
|
22-Jun-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
GATT: use one type for all server attributes Right now we have three types, for attributes depending on how long the uuid is. Instead, use one type. Change-Id: I33bb4f3c57b7b1516eda871a77b71661b7ba39ce
/system/bt/stack/gatt/gatt_int.h
|
3d6accfcc0bdc5c7a8713320c9bb069cbf253348 |
|
11-May-2016 |
Bryce Lee <brycelee@google.com> |
Move extern "C" to top of headers and remove tBTA_HF_CLIENT_HDR. Previously, extern "C" was placed in various locations within the header files, sometimes below actual struct declarations. Doing so would lead to alignment issues between C and C++ code. tBTA_HF_CLIENT_HDR was removed from bta_hf_client_api since it was extraneous and empty - leading to alignment issues. Change-Id: Icdd338f1affe4c3a70c7bbd716249be6a16443d2
/system/bt/stack/gatt/gatt_int.h
|
78bcff79e1b1f0efce436b33bdd6da88745bfc8a |
|
05-Dec-2015 |
Pavlin Radoslavov <pavlin@google.com> |
Refactor the Bluetooth timers * Updated the alarm API: - Existing API alarm_new() is modified to take an alarm name as an argument. - New API alarm_new_periodic() is used to create a periodic alarm. - Added new API alarm_is_scheduled() to test whether an alarm is scheduled. - Existing API alarm_set_periodic() is removed: a periodic alarm is created by alarm_new_periodic(). - Added new API alarm_set_on_queue() to set an alarm whose callback is executed on a specific queue. - Added new API alarm_register_processing_queue() and alarm_unregister_processing_queue() to register/unregister a queue and the corresponding thread for alarm processing. - Added corresponding unit tests. * Updated the alarm internals: - Added alarm_info_t for collecting alarm-related information and statistics. - Collect and store alarm-related statistics into alarm_info_t per alarm. - Include the alarm-related statistics and info into the native dumpsys output for Bluetooth. - Once an alarm expires, the alarm execution is scheduled for processing on another internal alarm-specific thread, not on the thread that is maintaining the alarms. - Implemented callback execution ordering guarantee among timers on the same thread with exactly same timeout values. * Refactor some of the usage of alarm_set() and simplify the code by using alarm_set_on_queue() instead. * Removed the non_repeating timers wrapper, and use directly the alarm mechanism / API. * Refactored all timer_entry_t timers and replaced them with alarm_t timers: - Replaced the btu_start_timer() / btu_stop_timer() / btu_start_quick_timer() / btu_stop_quick_timer() / btu_oneshot_alarm() mechanism with alarm_set_on_queue() and alarm_cancel() - Removed the whole mechanism around the BTU_TTYPE_* timers. * Fixed a bug when processing the GATT indication confirmation timer expiration (timer tGATT_TCB.conf_timer: b/26610829). * Renamed and/or split misc. timeout functions, fields, and timers * Renamed time-related constants and changed the values from seconds to milliseconds * Replaced timer tAVDT_CCB.timer_entry with three mutually exclusive timers: idle_ccb_timer, ret_ccb_timer, rsp_ccb_timer The reason we are using three timers, is because in the original code function avdt_ccb_chk_timer() used the timer type in its logic: it would stop the timer only if the type is "idle". * Removed btm_ble_timeout() and replaced it with multiple timeout callback functions (per timer) * Fix the actual value of the global constant BT_1SEC_TIMEOUT and rename it to BT_1SEC_TIMEOUT_MS * Removed btu_cb and associated timers and events, because they are never used. * Removed unused timers, functions, struct and declarations that are not used / needed. Bug: 26611369 Bug: 26610829 Change-Id: I812c8c31710a5daefc58b01fcf35c353768f390f
/system/bt/stack/gatt/gatt_int.h
|
9f1c9ad85759c7663e3bbc494f8e75b2f107da67 |
|
28-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Moved struct TIMER_LIST_ENT to OSI * Moved struct TIMER_LIST_ENT to file osi/include/non_repeating_timer.h and renamed it to timer_entry_t NOTE: This is a short-term solution. timer_entry_t should be removed, and its usage everywhere should be replaced by struct non_repeating_timer_t . * Renamed TIMER_CBACK to timer_callback_t * Renamed TIMER_PARAM_TYPE to timer_param_t Change-Id: I9ca830718bf900195f9c0a513a97f6995322693b
/system/bt/stack/gatt/gatt_int.h
|
1a3844f933bd63c8a381371dabfb35c6a0249e3e |
|
25-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Replaced usage of GKI queue with OSI fixed_queue * Added new functions to OSI: - fixed_queue_init() - fixed_queue_length() - fixed_queue_try_remove_from_queue() - fixed_queue_try_peek_last() * Renamed fixed_queue_try_peek() to fixed_queue_try_peek_first() * Replaced usage of GKI queue functions with OSI fixed_queue functions: - GKI_init_q() -> fixed_queue_new(SIZE_MAX) NOTE: unlike GKI_init_q(), fixed_queue_new() allocates memory / state that needs to be released by calling fixed_queue_free() - GKI_enqueue() -> fixed_queue_enqueue() - GKI_dequeue() -> fixed_queue_try_dequeue() NOTE: fixed_queue_try_dequeue() is non-blocking - GKI_queue_length() -> fixed_queue_length() - GKI_queue_is_empty() -> fixed_queue_is_empty() - GKI_getfirst() -> fixed_queue_try_peek_first() - GKI_getlast() -> fixed_queue_try_peek_last() - GKI_remove_from_queue() -> fixed_queue_try_remove_from_queue() - Queue elements iteration. In the fixed_queue implementation we have to use the underlying list_t mechanism to iterate over the elements. OLD: p = GKI_getfirst(queue); ... while ((p = GKI_getnext(p) != NULL) { ... } NEW: list_t *list = fixed_queue_get_list(queue); for (const list_node_t *node = list_begin(list); node != list_end(list); node = list_next(node)) { p = list_node(node); } * Remove initialization of the GKI module, because it is not needed anymore * Removed unused files in GKI: gki/common/gki_common.h gki/ulinux/gki_int.h gki/ulinux/gki_ulinux.c Change-Id: I3ff9464db75252d6faf7476a9ca67c88e535c51c
/system/bt/stack/gatt/gatt_int.h
|
444a8da807abaf5f9e813ce70c56a79160495fb3 |
|
06-Mar-2015 |
Satya Calloji <satyac@broadcom.com> |
LE Privacy 1.2 and LE secure connections Bug: 19816438 Original author: Chaojing Sun <cjsun@broadcom.com> Change-Id: I5951f4d4e038f8348a62aa6d19b2111bae0b3ecc
/system/bt/stack/gatt/gatt_int.h
|
24933b5b1a06274c47133debac5251a97128a267 |
|
25-Sep-2014 |
June R. Tate-Gans <jtgans@google.com> |
Removing unnecessary BTAPI #defines.
/system/bt/stack/gatt/gatt_int.h
|
49ada1eb9382ce02a0d81b1a7c3065cccf38d09e |
|
21-Feb-2014 |
Chris Manton <cmanton@google.com> |
Release GATT resources upon teardown
/system/bt/stack/gatt/gatt_int.h
|
adc9f28ad418356cb81640059b59eee4d862e6b4 |
|
06-Dec-2014 |
Chaojing Sun <cjsun@broadcom.com> |
LE: Register for service change indication Some bonded remote devices require the client to register for service change indication and actually set the client configuration descriptor before service change indications can be removed. This change add an additional step after device bonding has occured to register for service change indication if possible. Bug: 18173911 Change-Id: I25386faec0d58834ee2b0a9d1db2d2e052311264
/system/bt/stack/gatt/gatt_int.h
|
17b04bd498405f2bb109a85562ebbdcb6bb06e95 |
|
28-Mar-2014 |
Andre Eisenbach <andre@broadcom.com> |
LE: Add notification sent and congestion callbacks (2/4) This change introduces two new callbacks for applications to better handle LE notification flow control and transport congestion. The notification callback is invoked when the remote platform confirms an indication or when a local notification has been passed to the controller. No new notifications should be sent until a callback is received. Congestion callbacks are triggered when a GATT operation cannot be sent to the local Bluetooth controller. Repeatedly calling writeCharacteristic() for example will eventually trigger a congestion callback. Applications cannot send additional data until a further callback is received, indicating that the congestion has cleared up. Also fixes a memory leak issue that can trigger GKI exception for certain GATT operations. Change-Id: Ib470c15ca1f577573a632e9afe4cb9e86680fd8c
/system/bt/stack/gatt/gatt_int.h
|
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/stack/gatt/gatt_int.h
|
5fba60a8761b28adec2704dcbf69376ebde4f19b |
|
06-Feb-2014 |
Zhihai Xu <zhihaixu@google.com> |
resend discovery primary service ATT request with timeout This is to work around the problem with iphone. The iphone didn't respond with our first ATT request (read By group type Request for for primary service). the clockwork/phone host keep waiting for ATT response until disconnection from iphone due to timeout. The workaround is to resend discovery primary service before disconnection from remote device when response timeout happen. This workaround will be better for us to interop with remote BLE device. bug:12895830 Change-Id: I236af8eca9790f2dae7098061c74cec55348ca6d
/system/bt/stack/gatt/gatt_int.h
|
ead3cde4bac0c3e32cd31f149093f004eef8ceeb |
|
06-Feb-2013 |
Ganesh Ganapathi Batta <ganeshg@broadcom.com> |
Initial version of BLE support for Bluedroid Change-Id: I9825a5cef9be2559c34c2a529b211b7d471147cf
/system/bt/stack/gatt/gatt_int.h
|
5738f83aeb59361a0a2eda2460113f6dc9194271 |
|
13-Dec-2012 |
The Android Open Source Project <initial-contribution@android.com> |
Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/stack/gatt/gatt_int.h
|