14ef59e5a391a6dda7295ebe7d0d7c52875f76b0 |
|
09-Mar-2018 |
Jakub Pawlowski <jpawlowski@google.com> |
Get rid of BTM_IS_PUBLIC_BDA One can't really guess address type based on last bits. Instead, for new devices always assume public address. Test: scan, toggle bluetooth, try connecting to device with public address Bug: 74413120 Change-Id: Id558260798e717c214a5a817cea0c204c5f4858e (cherry-picked from 8c2e78b44727789d641492beeef873b230c7e568)
/system/bt/stack/btm/btm_ble_int_types.h
|
5b790feeeb211c42bf78ca3ae9c26aa30e516765 |
|
18-Sep-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Make copyright headers consistent with Google template; remove "(C)" Test: Comment changes only; still compiles... Change-Id: Id699a8170112f06e4a2c9f2e0f0834d1817ace4e
/system/bt/stack/btm/btm_ble_int_types.h
|
a484a888196ddf8bcbf1ad3226d6451bc735a94b |
|
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/btm/btm_ble_int_types.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/btm/btm_ble_int_types.h
|
8451ad010e26562d4a4c7d0d135c70c4325ee6b5 |
|
19-Dec-2016 |
Emil Lenngren <emil.lenngren@gmail.com> |
Fix BLE white list issues Since Bluetooth 4.2 and errata ESR08 there may not be more than one connection between two LE device addresses. Also the stack assumes there is at maximum one connection to the same address. This patch makes sure there are no connected devices in the white list when a connection attempt is started. Since some (even 4.2) controllers don't handle this correctly, currently this method is used regardless of controller in this patch. When the maximum L2CAP connections were reached and a new connection was established to a device using auto connect, the stack hung and would no longer create new connections until Bluetooth was restarted, since the state change to BLE_CONN_IDLE was forgotten. This patch resets the state correctly, and also never initiates a connection unless there is space to avoid connect-disconnect loop. There were also bugs in the background_connections hash map; memory was not freed when an element was erased and an incorrect hash function which used the pointer to a bd addr instead of the bd addr itself which basically meant that elements were never removed. This patch removes the dynamic memory allocation and uses a correct hash function. There was a bug that might lead to that the white list was filled beyond its maximum, due to the counter was updated on the HCI command complete event, which might run too late. Now the space is instead calculated based on what commands have been sent to the controller. The address type of the address added to the white list must also be tracked, otherwise it might be updated due to a BLE scan, and later the wrong address is removed from the white list. This patch fixes this. (Preferably 49-bit bd addrs should be used as identifier through the whole stack but we're not there yet.) There was a queue of size 10 with pending white list operations. That queue got full if there was initially 10 devices in the white list, then the 10 devices were removed and immediately after 10 other devices were added. This patch removes the queue altogether by instead syncing against the background_connections hash map. Bug: https://code.google.com/p/android/issues/detail?id=219910 Test: stress-testing with a bunch of BLE devices and inspecting HCI log Change-Id: I78de654ffbea5f4962a189caf984f7f2934e8fbe
/system/bt/stack/btm/btm_ble_int_types.h
|
0595ca0018ac9980d1dd7e192301f8494a01f9cb |
|
07-Feb-2017 |
Jakub Pawlowski <jpawlowski@google.com> |
Advertising data handling improvements * use non-hardcoded advertise data size * use cache for keeping non-complete advertising data, waiting either for scan scan response, or secondary channel data. Bug: 30622771 Test: sl4a FilteringTest Change-Id: I689edcb4aee30361df15340029559cd19dac552b
/system/bt/stack/btm/btm_ble_int_types.h
|
83211b0ccceb53586ac651a4d67ded7443b2f222 |
|
07-Dec-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Get rid of selective connection procedure Bug: 30622771 Test: compilation test Change-Id: I1a7e4c49f93f11a350b96ffe7b2e69974ed82f46
/system/bt/stack/btm/btm_ble_int_types.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/btm/btm_ble_int_types.h
|
9462c5dbd610e7b894008cec99f57e082de1abc5 |
|
07-Dec-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Simplify btm_ble_resolve_random_addr Bug: 30622771 Test: manual testing Change-Id: I604d0e909a6fe270e2b413abbdb497d622780261
/system/bt/stack/btm/btm_ble_int_types.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/btm/btm_ble_int_types.h
|
9ca07091a1f07ea201cee0504dab6a1d7073d429 |
|
29-Nov-2016 |
Myles Watson <mylesgw@google.com> |
Reformat long comments before clang-format Test: mma -j32 Change-Id: I86a2a4af9dcd22d675ca1f764bb2c9623d63edcc
/system/bt/stack/btm/btm_ble_int_types.h
|
dc3c1f2afa2d5f311c3ea42bda432089a7f303a4 |
|
28-Sep-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Separate the definition of BTM layer types from control blocks Right now, data types, control blocks, and functions used in the BTM layer are defined in the same header files. This means that if someone wants to write a test that uses those data types, they must also define all control blocks, or compile the whole module. This patch separates the data types from other definitions. Thanks to it, we will be able to write unit tests, once other dependencies get separated. Change-Id: Ibc089e273cc37642fbb8672964b266c20f8d825d
/system/bt/stack/btm/btm_ble_int_types.h
|