OSDN Git Service

android-x86/system-bt.git
8 years agoGATT: use one type for all server attributes
Jakub Pawlowski [Wed, 22 Jun 2016 00:55:55 +0000 (00:55 +0000)]
GATT: use one type for all server attributes
am: c88b20a599

Change-Id: I56b557fa9e13ca95e375ead0ad298357f6e5f564

8 years agoGATT: use one type for all server attributes
Jakub Pawlowski [Tue, 21 Jun 2016 23:16:09 +0000 (16:16 -0700)]
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

8 years agoMerge \"Remove unused \"cmn_ble_vsc_cb\"; causing extended scan to not start\"
IHLHO KIM [Mon, 20 Jun 2016 22:56:34 +0000 (22:56 +0000)]
Merge \"Remove unused \"cmn_ble_vsc_cb\"; causing extended scan to not start\"
am: 844c999757

Change-Id: Id948c9a86af0dab86fd936753df5ea4172fe77cb

8 years agoMerge "Remove unused "cmn_ble_vsc_cb"; causing extended scan to not start"
Treehugger Robot [Mon, 20 Jun 2016 22:53:14 +0000 (22:53 +0000)]
Merge "Remove unused "cmn_ble_vsc_cb"; causing extended scan to not start"

8 years agoVectors as parameters to GATT (1/3)
Jakub Pawlowski [Mon, 20 Jun 2016 22:37:32 +0000 (22:37 +0000)]
Vectors as parameters to GATT (1/3)
am: 16102de086

Change-Id: Iddbc25e849a4c53c608694dab06ffd48a3fb01e3

8 years agoVectors as parameters to GATT (1/3)
Jakub Pawlowski [Tue, 31 May 2016 20:14:13 +0000 (13:14 -0700)]
Vectors as parameters to GATT (1/3)

Bug: 29005882
Bug: 28485365
Change-Id: I0a5041073a39977c4fbc29879c383fa6720da641

8 years agoRemove unused "cmn_ble_vsc_cb"; causing extended scan to not start
IHLHO KIM [Wed, 15 Jun 2016 05:27:53 +0000 (05:27 +0000)]
Remove unused "cmn_ble_vsc_cb"; causing extended scan to not start

The local variable "cmn_ble_vsc_cb" is referenced instead of btm_cb.
This causes generic LE scans to be used even though the controller
supports extended scans.

Change-Id: I8b1d817d4d04ee3a8db4285998b5a1916d046ccc

8 years agobta: use standard types
Marie Janssen [Mon, 20 Jun 2016 20:50:11 +0000 (20:50 +0000)]
bta: use standard types
am: e9e58ced19

Change-Id: Ie6be3d3ca5b0995c85becd1ef351d11deb773169

8 years agobta: use standard types
Marie Janssen [Fri, 17 Jun 2016 21:12:17 +0000 (14:12 -0700)]
bta: use standard types

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__

Change-Id: Ib86de4de9f14529ecaa4f71597260e3b5785360b

8 years agoVectors as parameters to GATT write/indicate (1/3)
Jakub Pawlowski [Mon, 20 Jun 2016 18:05:39 +0000 (18:05 +0000)]
Vectors as parameters to GATT write/indicate (1/3)
am: ec79baaaed

Change-Id: I5a9e1abb17e06945a13c4afd883f439befc64424

8 years agoUse vector instead of C arrays in bta_gatt_api
Jakub Pawlowski [Mon, 20 Jun 2016 18:05:38 +0000 (18:05 +0000)]
Use vector instead of C arrays in bta_gatt_api
am: 26ecec06be

Change-Id: I04cb40c4ae5c61f548a4878cee6a3084950392a3

8 years agoVectors as parameters to GATT write/indicate (1/3)
Jakub Pawlowski [Fri, 27 May 2016 22:48:03 +0000 (15:48 -0700)]
Vectors as parameters to GATT write/indicate (1/3)

This changes are covered in test cases:
GattReadTest.*
GattWriteTest.*

Bug: 29005882
Bug: 28485365
Change-Id: I1409e6ead22ff691190f9ea4c3ffe2267bd3bf33

8 years agoUse vector instead of C arrays in bta_gatt_api
Jakub Pawlowski [Fri, 27 May 2016 16:42:21 +0000 (09:42 -0700)]
Use vector instead of C arrays in bta_gatt_api

This changes are covered in test cases:
GattReadTest.*
GattWriteTest.*

Bug: 28485365
Change-Id: I0bb098b4d5e991ed53d3276ac6f7174723c59444

8 years agoAVRCP: rename constant AVRC_CTLR_INCLUDED
Marie Janssen [Fri, 17 Jun 2016 21:53:41 +0000 (21:53 +0000)]
AVRCP: rename constant AVRC_CTLR_INCLUDED
am: c6d93ada03

Change-Id: I11790e7488120b63a9c2080f5db358a099194ff9

8 years agoAVRCP: rename constant AVRC_CTLR_INCLUDED
Marie Janssen [Fri, 17 Jun 2016 20:13:21 +0000 (13:13 -0700)]
AVRCP: rename constant AVRC_CTLR_INCLUDED

Typo fixed to AVRC_CTRL_INCLUDED

Change-Id: Ib0ac11916bf6e856ae2d3cfb842bd0b8fef56008

8 years agoHOGP: Clear pending operations for a given device on connect
Jakub Pawlowski [Fri, 17 Jun 2016 19:27:24 +0000 (19:27 +0000)]
HOGP: Clear pending operations for a given device on connect
am: 7c172b7df7

Change-Id: I53fc3a6b886fa522c7b2495fbf3b66e8f7f43751

8 years agoHOGP: Preffer write command over write requests
Jakub Pawlowski [Fri, 17 Jun 2016 19:27:24 +0000 (19:27 +0000)]
HOGP: Preffer write command over write requests
am: 4f76028680

Change-Id: Ia836d6252e7bfdbadcebcc46655eb50e68e4eb8d

8 years agoMerge \"BTIF: remove unnecessary \'extern \"C\"\'\"
Jakub Pawlowski [Fri, 17 Jun 2016 19:22:33 +0000 (19:22 +0000)]
Merge \"BTIF: remove unnecessary \'extern \"C\"\'\"
am: 7732b1b052

Change-Id: I934149b72980ceb2e024e77f02163fe977571a4e

8 years agoHOGP: Clear pending operations for a given device on connect
Jakub Pawlowski [Mon, 13 Jun 2016 17:30:17 +0000 (10:30 -0700)]
HOGP: Clear pending operations for a given device on connect

If there are any HID operations scheduled after disconnect, mark the
device as no longer executing after establishing connection. Otherwise
we'll be unable to send any HID commands to it.

Change-Id: Ie1bb622388a3bcb574dec3dde76ef4518ee1102f
(cherry picked from commit 4362b8c559575a83897a5af55202ce2c1d19925c)

8 years agoHOGP: Preffer write command over write requests
Jakub Pawlowski [Tue, 14 Jun 2016 21:40:51 +0000 (14:40 -0700)]
HOGP: Preffer write command over write requests

Some HID devices will accept both write request and write command.
Prefer write commands when possible.

This is due to bug in some hardware, that will not send write response
when too many commands are queued.

Bug: 29184976
Change-Id: I5bafc067f044a48f152c60b8e17722067bc1453e
(cherry picked from commit af77225c0d7bec06d2417b0305ebcbab04144caa)

8 years agoMerge "BTIF: remove unnecessary 'extern "C"'"
Jakub Pawlowski [Fri, 17 Jun 2016 19:12:36 +0000 (19:12 +0000)]
Merge "BTIF: remove unnecessary 'extern "C"'"

8 years agoMerge \"test_vendor_lib: refactor packet constructors\"
Myles Watson [Fri, 17 Jun 2016 01:46:22 +0000 (01:46 +0000)]
Merge \"test_vendor_lib: refactor packet constructors\"
am: 9e08f85c9b

Change-Id: I8b09b5ca2dd28d2b4ce1343b4cffefe9d5f943d9

8 years agoAdd missing NULL pointers assignments
Pavlin Radoslavov [Fri, 17 Jun 2016 01:46:22 +0000 (01:46 +0000)]
Add missing NULL pointers assignments
am: 8cbc291080

Change-Id: I0f0d5791508bfc635f8713f85ddfc71e282f606e

8 years agoMerge "test_vendor_lib: refactor packet constructors"
Treehugger Robot [Fri, 17 Jun 2016 01:13:14 +0000 (01:13 +0000)]
Merge "test_vendor_lib: refactor packet constructors"

8 years agoAdd missing NULL pointers assignments
Pavlin Radoslavov [Thu, 16 Jun 2016 23:37:57 +0000 (16:37 -0700)]
Add missing NULL pointers assignments

Each pointer that was freed by one of the following functions should
be reset to NULL:
 - config_free()
 - data_dispatcher_free()
 - fixed_queue_free()
 - list_free()

Bug: 29421693
Change-Id: Ie55a04ed986393994564edcf872d7413b0767a85

8 years agoBTIF: remove unnecessary 'extern "C"'
Jakub Pawlowski [Thu, 16 Jun 2016 00:15:42 +0000 (17:15 -0700)]
BTIF: remove unnecessary 'extern "C"'

btif is all cpp now, with execption to uuid_to_string_legacy
and few methods imported/exported for main module.
There is no need to have c linkage for the rest of it.

Change-Id: I5e7079e1269dc6461b14b665587592270cdf3140

8 years agotest_vendor_lib: refactor packet constructors
Myles Watson [Thu, 26 May 2016 21:13:42 +0000 (14:13 -0700)]
test_vendor_lib: refactor packet constructors

Make it simpler to append bytes to payloads, since that's a common
operation.

Change-Id: I7fc975fb999add8e1a360b91bdae869d6d7d2029
Signed-off-by: Myles Watson <mylesgw@google.com>
8 years agoGATT: don\'t update link status for apps that were never connected
Jakub Pawlowski [Thu, 16 Jun 2016 19:12:20 +0000 (19:12 +0000)]
GATT: don\'t update link status for apps that were never connected
am: a62adcab30

Change-Id: I084130c52f82ca960badeea1da6573e929cb85ff

8 years agoGATT: don't update link status for apps that were never connected
Jakub Pawlowski [Thu, 16 Jun 2016 15:16:48 +0000 (08:16 -0700)]
GATT: don't update link status for apps that were never connected

Right now, in GATT_Deregister we make a call to
gatt_update_app_use_link_flag, which might result in a call to
GATT_SetIddleTimeout on links that this client was never connected to.

In order to fix that, we must check if gatt_update_app_hold_link_status
made any changes to p_tcb->app_hold_link. If not, then skip updating
the timer.

Change-Id: I6f18ec7fe4e80e048adc9e360cae703b7d64d62a

8 years agoConvert HID and Device Manager BTA code to C++
Jakub Pawlowski [Thu, 16 Jun 2016 17:35:26 +0000 (17:35 +0000)]
Convert HID and Device Manager BTA code to C++
am: b7938c1866

Change-Id: I9ddcdc2683d63ba84cd5f8e9de044dc78b0d6521

8 years agoConvert HID and Device Manager BTA code to C++
Jakub Pawlowski [Fri, 27 May 2016 00:57:22 +0000 (17:57 -0700)]
Convert HID and Device Manager BTA code to C++

These are the only places that use BTA GATTC API. After this change it's
possible to change GATT API to use C++ types as arguments.

Bug: 28485365
Change-Id: Idf83396f4bc3a2cc8a9b41f69da5d033af1be678

8 years agoFix unused source warning
Dan Willemsen [Thu, 16 Jun 2016 00:03:00 +0000 (00:03 +0000)]
Fix unused source warning
am: b172552537

Change-Id: I2c2191358dd60a087cb1d39fa22dd65ab2eb7371

8 years agoFix unused source warning
Dan Willemsen [Wed, 15 Jun 2016 22:46:15 +0000 (15:46 -0700)]
Fix unused source warning

These were using the wrong c++ extension, so the build system was not
picking them up.

Change-Id: I3a767a236bca05f04dd069bb1f40796f41cb8b60

8 years agoFix missing GATT Characteristic from last service
Jakub Pawlowski [Wed, 15 Jun 2016 00:30:02 +0000 (00:30 +0000)]
Fix missing GATT Characteristic from last service
am: 6c81482c2d

Change-Id: I1f103942867c539eb97ce4768812558cf3bf9844

8 years agoUse UINT16 for GATT attribute id field
Jakub Pawlowski [Wed, 15 Jun 2016 00:26:43 +0000 (00:26 +0000)]
Use UINT16 for GATT attribute id field
am: d407e1afca

Change-Id: I890bc4f7bde854578c837dcc3fb0eaace92e411c

8 years agoFix missing GATT Characteristic from last service
Jakub Pawlowski [Tue, 14 Jun 2016 19:23:44 +0000 (12:23 -0700)]
Fix missing GATT Characteristic from last service

GATT Service is contained between start and end handle. If
characteristic definition is at end handle, and it's value definition is
after end handle, it will not be properly discovered. That's because we
use value_handle instead of attribute_handle to identify
characteristics.

As a workaround, increase service boundary if value is defined after
it's definition.

Bug: 29253825
Change-Id: Ib145aea4f5cf38a1fbb977c301136e16f8f900f7
(chery picked from commit 552e630435a68d8f51d458dccf8697c625cf1510)

8 years agoAdd missing curly braces in clear notification
Jakub Pawlowski [Tue, 14 Jun 2016 22:31:06 +0000 (22:31 +0000)]
Add missing curly braces in clear notification
am: 82e2fa17b4

Change-Id: I4185c983b253dcd06dade4e762b304e2594984f0

8 years agoUse UINT16 for GATT attribute id field
Jakub Pawlowski [Tue, 14 Jun 2016 19:47:52 +0000 (12:47 -0700)]
Use UINT16 for GATT attribute id field

Id field is equal to attribute handle, so it must be 16bits.
Otherwise only piece of GATT database can be used.

Bug: 29253825
Change-Id: Ia88e3ad3eb96ca8e97349aa5e852e66c57072b49
(cherry picked from commit e6b1cb43525e27f95de85dc43150d7368b9d4c35)

8 years agoAdd missing curly braces in clear notification
Jakub Pawlowski [Tue, 14 Jun 2016 16:26:24 +0000 (09:26 -0700)]
Add missing curly braces in clear notification

Change-Id: I59b13486f76735e5dd0c07d57b2671c746169bd8

8 years agoHOGP: Clear pending operations for a given device on disconnect am: f978a57103
Jakub Pawlowski [Sat, 11 Jun 2016 02:04:26 +0000 (02:04 +0000)]
HOGP: Clear pending operations for a given device on disconnect am: f978a57103
am: 6818e548cb

Change-Id: Ife41744dba7574aaa462cb0a2ac545d9382544ca

8 years agoHOGP: Clear pending operations for a given device on disconnect
Jakub Pawlowski [Sat, 11 Jun 2016 02:00:24 +0000 (02:00 +0000)]
HOGP: Clear pending operations for a given device on disconnect
am: f978a57103

Change-Id: Ica1e0caf127e3baccb20075e2f6fd95b1d9c03ba

8 years agoHOGP: Clear pending operations for a given device on disconnect
Jakub Pawlowski [Fri, 10 Jun 2016 23:32:26 +0000 (16:32 -0700)]
HOGP: Clear pending operations for a given device on disconnect

If there are any GATT operations interrupted by a disconnect, mark the
device as no longer executing. Otherwise we'll stil receive data from
the device, but we'll be unable to send any HID commands to it.

Bug: 29184976
Change-Id: I489f41c970abad0ff1145005d3250beafa83d27e

8 years agoHOGP: Clear pending operations for a given device on disconnect
Jakub Pawlowski [Sat, 11 Jun 2016 01:45:26 +0000 (01:45 +0000)]
HOGP: Clear pending operations for a given device on disconnect
am: 22fc38259f

Change-Id: Icac19c9f691843e5df70fdd0051c6d2441bf5582

8 years agoHOGP: Clear pending operations for a given device on disconnect
Jakub Pawlowski [Fri, 10 Jun 2016 23:32:26 +0000 (16:32 -0700)]
HOGP: Clear pending operations for a given device on disconnect

If there are any GATT operations interrupted by a disconnect, mark the
device as no longer executing. Otherwise we'll stil receive data from
the device, but we'll be unable to send any HID commands to it.

Bug: 29184976
Change-Id: I489f41c970abad0ff1145005d3250beafa83d27e

8 years agoDo not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled am: 1c512b851d
AnubhavGupta [Thu, 9 Jun 2016 23:26:17 +0000 (23:26 +0000)]
Do not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled am: 1c512b851d
am: 6f01bc2a6d

Change-Id: I219aad79a41fd9499e040ecf1d551fb6fda058a1

8 years agoDo not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
AnubhavGupta [Thu, 9 Jun 2016 23:23:38 +0000 (23:23 +0000)]
Do not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
am: 1c512b851d

Change-Id: Ic30615e2cf916ab2311deb1377d868e3f3a661a7

8 years agoDo not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
AnubhavGupta [Thu, 9 Jun 2016 23:21:05 +0000 (23:21 +0000)]
Do not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
am: 470466e6be

Change-Id: If478c20f576e201f3443ae8ae61768f8ba6e80d8

8 years agoDo not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
AnubhavGupta [Wed, 6 Apr 2016 06:17:05 +0000 (11:47 +0530)]
Do not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled

Also fixed AVRC_PDU_GET_PLAY_STATUS timeout response.

Bug: 28177785
Change-Id: Icde64a5c1806453850abe101f9707fff61566566
(cherry picked from commit 1c512b851d76deac860fce1232e4a1fa1a097f1c)

8 years agoDo not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
AnubhavGupta [Wed, 6 Apr 2016 06:17:05 +0000 (11:47 +0530)]
Do not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled

Also fixed AVRC_PDU_GET_PLAY_STATUS timeout response.

Bug: 28177785
Change-Id: Icde64a5c1806453850abe101f9707fff61566566

8 years agoSet disable timer in case of any active ACL connection
Srinu Jella [Thu, 9 Jun 2016 00:51:00 +0000 (00:51 +0000)]
Set disable timer in case of any active ACL connection
am: 70035577fd

Change-Id: I05c0e02b4149cc8f943612617f5166d3fffafd59

8 years agoSet disable timer in case of any active ACL connection
Srinu Jella [Wed, 8 Jun 2016 10:20:53 +0000 (15:50 +0530)]
Set disable timer in case of any active ACL connection

Use Case: Disable time out when atleast one active ACL connections

Steps:
1. Turn ON Bluetooth
2. Connect to any Headset
3. Turn OFF bluetooth.

Failure: Turn OFF bluetooth is failed when atleast one active ACL connections

Root Cause:i If we have one or more active ACL links, so it is not notitying
BTA_DM_DISABLE_EVT to upper layer.

Fix: Set disable timer in case of any active ACL connection

Bug: 29217385

Change-Id: Ica47717119f1ab9fa9f4f5244e8483c408276a2a
(cherry picked from commit 3e4f01ada8c1627bd48f31cd0c8269984b8e5f96)

8 years agoMerge \"btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result\" into nyc-dev
Myles Watson [Wed, 8 Jun 2016 22:08:44 +0000 (22:08 +0000)]
Merge \"btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result\" into nyc-dev
am: 59bc2de906

Change-Id: I5cefab6f346731ea11085ce613c9c4c95665ba4c

8 years agoMerge "btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result" into nyc-dev
TreeHugger Robot [Wed, 8 Jun 2016 22:03:23 +0000 (22:03 +0000)]
Merge "btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result" into nyc-dev

8 years agoSet disable timer in case of any active ACL connection am: 3e4f01ada8
Srinu Jella [Wed, 8 Jun 2016 19:15:52 +0000 (19:15 +0000)]
Set disable timer in case of any active ACL connection am: 3e4f01ada8
am: b5d0d36154

Change-Id: I968db4a71934e298d91e8e3815c21d697157efb9

8 years agoSet disable timer in case of any active ACL connection
Srinu Jella [Wed, 8 Jun 2016 19:13:14 +0000 (19:13 +0000)]
Set disable timer in case of any active ACL connection
am: 3e4f01ada8

Change-Id: Ia22d37db6f47cf634a6c38a3f169140054b95ee8

8 years agoSet disable timer in case of any active ACL connection
Srinu Jella [Wed, 8 Jun 2016 10:20:53 +0000 (15:50 +0530)]
Set disable timer in case of any active ACL connection

Use Case: Disable time out when atleast one active ACL connections

Steps:
1. Turn ON Bluetooth
2. Connect to any Headset
3. Turn OFF bluetooth.

Failure: Turn OFF bluetooth is failed when atleast one active ACL connections

Root Cause:i If we have one or more active ACL links, so it is not notitying
BTA_DM_DISABLE_EVT to upper layer.

Fix: Set disable timer in case of any active ACL connection

Change-Id: Ica47717119f1ab9fa9f4f5244e8483c408276a2a

8 years agoMerge \"Fix payload size for GATT Read by type request\" into nyc-dev
Subramanian Srinivasan [Wed, 8 Jun 2016 01:33:59 +0000 (01:33 +0000)]
Merge \"Fix payload size for GATT Read by type request\" into nyc-dev
am: 73ee3314ed

Change-Id: I5893f5aa1c551469d17dd0dc556ebafa5c47266c

8 years agoMerge \"Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel\" into nyc-dev
Venkata Jagadeesh [Wed, 8 Jun 2016 01:33:58 +0000 (01:33 +0000)]
Merge \"Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel\" into nyc-dev
am: e67263c5e6

Change-Id: I4856ec39f37afee18bc6d5154bdffe23a57c454d

8 years agoMerge "Fix payload size for GATT Read by type request" into nyc-dev
TreeHugger Robot [Wed, 8 Jun 2016 01:30:28 +0000 (01:30 +0000)]
Merge "Fix payload size for GATT Read by type request" into nyc-dev

8 years agoMerge "Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel" into nyc-dev
Pankaj Kanwar [Wed, 8 Jun 2016 01:28:49 +0000 (01:28 +0000)]
Merge "Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel" into nyc-dev

8 years agoRemote device changes for SMP certification
Nitin Arora [Wed, 8 Jun 2016 01:05:20 +0000 (01:05 +0000)]
Remote device changes for SMP certification
am: 9ded3b71de

Change-Id: If254bb87236ea88405433ccd88b874e8672fa3dd

8 years agoMerge \\"Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel\\" am: fe7f53d6b3
Venkata Jagadeesh [Wed, 8 Jun 2016 00:59:29 +0000 (00:59 +0000)]
Merge \\"Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel\\" am: fe7f53d6b3
am: f92afd2378

Change-Id: Ie49e2a2f6f4d0d7751f1d1e378f9753e08d14370

8 years agoMerge \\"Fix payload size for GATT Read by type request\\" am: 89b997468c
Subramanian Srinivasan [Wed, 8 Jun 2016 00:59:29 +0000 (00:59 +0000)]
Merge \\"Fix payload size for GATT Read by type request\\" am: 89b997468c
am: 556f238bac

Change-Id: I399635806ba80c08019efa7aeb8b4d3566803bd5

8 years agoMerge \"Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel\"
Venkata Jagadeesh [Wed, 8 Jun 2016 00:57:05 +0000 (00:57 +0000)]
Merge \"Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel\"
am: fe7f53d6b3

Change-Id: Ida2dd0bff8210d63e3aa02f8261a9633352f0204

8 years agoMerge \"Fix payload size for GATT Read by type request\"
Subramanian Srinivasan [Wed, 8 Jun 2016 00:57:04 +0000 (00:57 +0000)]
Merge \"Fix payload size for GATT Read by type request\"
am: 89b997468c

Change-Id: I26c3889d95d5e7d0b1b94cbabdbbe91404fd6530

8 years agoMerge "Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel"
Treehugger Robot [Wed, 8 Jun 2016 00:45:46 +0000 (00:45 +0000)]
Merge "Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel"

8 years agoMerge "Fix payload size for GATT Read by type request"
Treehugger Robot [Wed, 8 Jun 2016 00:45:21 +0000 (00:45 +0000)]
Merge "Fix payload size for GATT Read by type request"

8 years agobtm: Restrict EXTENDED_INQUIRY_RESULT to 1 result am: 1a011544dc
Myles Watson [Wed, 8 Jun 2016 00:27:58 +0000 (00:27 +0000)]
btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result am: 1a011544dc
am: 2386dc5177

Change-Id: I506fe9f24710cf212e397b4142052f8a33c0ad6d

8 years agobtm: Restrict EXTENDED_INQUIRY_RESULT to 1 result
Myles Watson [Wed, 8 Jun 2016 00:25:33 +0000 (00:25 +0000)]
btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result
am: 1a011544dc

Change-Id: Ibd967e028594f6cbb64b4040016012fb53bb047d

8 years agoFix payload size for GATT Read by type request
Subramanian Srinivasan [Fri, 27 May 2016 23:32:55 +0000 (16:32 -0700)]
Fix payload size for GATT Read by type request

Payload size for GATT Read by type request for UUID32 and UUID128
are incorrectly allocated. This leads to memory overflow when
Read by type request is sent for them and eventually results
in crash during free. This change makes sure that the payload
can accomodate upto 128 bit UUID.

This crash is observed while running TC_GAR_CL_BV_03_C Qual test
case.

Bug: 29011042
Change-Id: Ib2b41b769b394670099f4549f204e2972f7df876
(cherry picked from commit 7da98621a4dfa8196b8d20e8955ad508f540e5d9)

8 years agoFix payload size for GATT Read by type request
Subramanian Srinivasan [Fri, 27 May 2016 23:32:55 +0000 (16:32 -0700)]
Fix payload size for GATT Read by type request

Payload size for GATT Read by type request for UUID32 and UUID128
are incorrectly allocated. This leads to memory overflow when
Read by type request is sent for them and eventually results
in crash during free. This change makes sure that the payload
can accomodate upto 128 bit UUID.

This crash is observed while running TC_GAR_CL_BV_03_C Qual test
case.

Bug: 29011042
Change-Id: Ib2b41b769b394670099f4549f204e2972f7df876

8 years agoReject L2CAP INFO RSP and ECHO RSP on the LE signaling channel
Venkata Jagadeesh [Fri, 27 May 2016 10:06:20 +0000 (15:36 +0530)]
Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel

Steps:
Execute TC_LE_REJ_BI_02_C

Failure:
PTS stuck after sending INFO RSP, ECHO RSP on the LE signaling channel

Root Cause:
The Bluetooth stack is not rejecting INFO RSP, ECHO RSP even though
these commands are invalid for the LE signaling Channel.

Fix:
Reject the INFO RSP, ECHO RSP with error L2CAP_CMD_REJ_NOT_UNDERSTOOD.

Bug: 27852645
Change-Id: Ie09f658d606206cbdbea928e8cb6d10332743cf4
(cherry picked from commit d35bb40dd563e7f37df0a2fa9c0f61d0958b9601)

8 years agoReject L2CAP INFO RSP and ECHO RSP on the LE signaling channel
Venkata Jagadeesh [Fri, 27 May 2016 10:06:20 +0000 (15:36 +0530)]
Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel

Steps:
Execute TC_LE_REJ_BI_02_C

Failure:
PTS stuck after sending INFO RSP, ECHO RSP on the LE signaling channel

Root Cause:
The Bluetooth stack is not rejecting INFO RSP, ECHO RSP even though
these commands are invalid for the LE signaling Channel.

Fix:
Reject the INFO RSP, ECHO RSP with error L2CAP_CMD_REJ_NOT_UNDERSTOOD.

Bug: 27852645
Change-Id: Ie09f658d606206cbdbea928e8cb6d10332743cf4

8 years agobtm: Restrict EXTENDED_INQUIRY_RESULT to 1 result
Myles Watson [Tue, 7 Jun 2016 23:14:18 +0000 (16:14 -0700)]
btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result

The spec only allows one result per event.
Abort processing and return if the spec is not followed.

Bug: 29141745
Change-Id: Ic414b28adadec274779b0d953d12d499a619aff6
Signed-off-by: Myles Watson <mylesgw@google.com>
8 years agobtm: Restrict EXTENDED_INQUIRY_RESULT to 1 result
Myles Watson [Tue, 7 Jun 2016 23:14:18 +0000 (16:14 -0700)]
btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result

The spec only allows one result per event.
Abort processing and return if the spec is not followed.

Bug: 29141745
Change-Id: Ic414b28adadec274779b0d953d12d499a619aff6
Signed-off-by: Myles Watson <mylesgw@google.com>
8 years agoRemote device changes for SMP certification
Nitin Arora [Tue, 15 Mar 2016 22:00:36 +0000 (15:00 -0700)]
Remote device changes for SMP certification

Use Case:
Certification test cases for SMP require various scenarios
where the remote device needs to show a specific behavior
where it fails the pairing in a certain way, and the DUT is
required to abort the pairing properly.
In abcense of a proper PTS suite to execute these test cases,
we can use another device running the same host by configuring
certain run time property.

Test Cases:
TP/SCJW/BI-02-C
TP/SCJW/BV-02-C
TP/SCPK/BI-03-C
TP/SCPK/BI-04-C
TP/SCPK/BV-02-C
TP/SCPK/BV-03-C
TP/SCJW/BI-01-C
TP/SCCT/BV-01-C
TP/SCCT/BV-02-C
TP/SCPK/BI-01-C
TP/SCPK/BI-02-C
TP/SCPK/BV-04-C
TP/SCPK/BV-01-C

Fix:
Added a property in the bt_stack.conf file. The property name
is "SmpFailureCase". The values 2 to 6(inclusive), are forcausing SMP
failures with various failure reasons.
Failure case 1 and 9 are for producing error "Confirm value failure".
Cases 7 and 8 are for generating specific errors at pair cancel.

Note:
The default use of this feature is controlled using a compile
time flag BTM_BLE_SMP_CERTIFICATION.
The BTM_BLE_SMP_CERTIFICATION = TRUE is needed only while we
wait for the PTS support for the LE Secure connections.

Bug: 27852645
Change-Id: I1f7a8ff2659d85b5978b75870c57162a34d394d0
(cherry picked from commit 0bd0c8fc88a7141691a7ca839b11cb711945ee33)

8 years agoFix invalid BDA parameter passing for connection parameter updates am: 3021c5a5aa
Jakub Pawlowski [Tue, 7 Jun 2016 01:55:15 +0000 (01:55 +0000)]
Fix invalid BDA parameter passing for connection parameter updates am: 3021c5a5aa
am: 68750afdb5

* commit '68750afdb59191037c651571099f542122f5361f':
  Fix invalid BDA parameter passing for connection parameter updates

Change-Id: I7571c6277ccb7142e486b2c1588ab687c2b79a69

8 years agoFix invalid BDA parameter passing for connection parameter updates
Jakub Pawlowski [Tue, 7 Jun 2016 01:50:33 +0000 (01:50 +0000)]
Fix invalid BDA parameter passing for connection parameter updates
am: 3021c5a5aa

* commit '3021c5a5aac9760e8c4885cbf9c220d1b04dbdb3':
  Fix invalid BDA parameter passing for connection parameter updates

Change-Id: I649b1b08ad84056dbdd44ca4258280bc57639215

8 years agoFix invalid BDA parameter passing for connection parameter updates
Jakub Pawlowski [Fri, 3 Jun 2016 22:42:32 +0000 (15:42 -0700)]
Fix invalid BDA parameter passing for connection parameter updates

The BD_ADDR type is not a struct, just an array of bytes. Therefore,
Bind does not know how to store it for later execution, and just stores
the pointer to the first element, which is not valid at time of
execution.

Instead use bt_bdaddr_t, which is a struct. Bind will copy it's content
properly.

Change-Id: I4875aae4d7cbb809821d91a13554b8fdf310a7fe

8 years agoMerge "Revert "DO NOT MERGE Proper construction of AVDTP general reject message"...
JivakDhadse [Tue, 7 Jun 2016 00:15:49 +0000 (00:15 +0000)]
Merge "Revert "DO NOT MERGE Proper construction of AVDTP general reject message"" into nyc-dev
am: a3f785a138

* commit 'a3f785a138ab67c6533de4f427e777c222e4352e':
  Revert "DO NOT MERGE Proper construction of AVDTP general reject message"

Change-Id: Ib8b48f4805efa30b46bbfdd3b760ced75a0b7a59

8 years agoMerge "Clear BLE block from device records at unpair" into nyc-dev
Nitin Arora [Tue, 7 Jun 2016 00:15:47 +0000 (00:15 +0000)]
Merge "Clear BLE block from device records at unpair" into nyc-dev
am: 8c919fb37a

* commit '8c919fb37a56f3a6a2e30564e1356bf93c468b5a':
  Clear BLE block from device records at unpair

Change-Id: I7866ce6a767cc7b2ce5727a8e971f45808c5e2c0

8 years agoMerge "Revert "DO NOT MERGE Proper construction of AVDTP general reject message"...
Pankaj Kanwar [Tue, 7 Jun 2016 00:09:01 +0000 (00:09 +0000)]
Merge "Revert "DO NOT MERGE Proper construction of AVDTP general reject message"" into nyc-dev

8 years agoMerge "Clear BLE block from device records at unpair" into nyc-dev
Pankaj Kanwar [Tue, 7 Jun 2016 00:07:46 +0000 (00:07 +0000)]
Merge "Clear BLE block from device records at unpair" into nyc-dev

8 years agoRemote device changes for SMP certification am: 0bd0c8fc88
Nitin Arora [Mon, 6 Jun 2016 21:29:52 +0000 (21:29 +0000)]
Remote device changes for SMP certification am: 0bd0c8fc88
am: a81770e617

* commit 'a81770e617b6f39107f8b1aa0aa519523f94ae39':
  Remote device changes for SMP certification

Change-Id: I85f54999363801ddac7a58d89bb31f51e4e3d442

8 years agoRemote device changes for SMP certification
Nitin Arora [Mon, 6 Jun 2016 21:22:04 +0000 (21:22 +0000)]
Remote device changes for SMP certification
am: 0bd0c8fc88

* commit '0bd0c8fc88a7141691a7ca839b11cb711945ee33':
  Remote device changes for SMP certification

Change-Id: Id8e7028ae84257b6831bb6ae058c1495e63ea10a

8 years agoFix for issue introduced due to rebase of LE L2CAP COC
Navin Kochar [Mon, 6 Jun 2016 20:29:48 +0000 (20:29 +0000)]
Fix for issue introduced due to rebase of LE L2CAP COC
am: be3f7f9d24

* commit 'be3f7f9d244ca39a9a5a27afd3b117f83b69e0e4':
  Fix for issue introduced due to rebase of LE L2CAP COC

Change-Id: Iac2d2fd11ec63a4bc6af70ffb5e72174ed940cbf

8 years agoRemote device changes for SMP certification
Nitin Arora [Tue, 15 Mar 2016 22:00:36 +0000 (15:00 -0700)]
Remote device changes for SMP certification

Use Case:
Certification test cases for SMP require various scenarios
where the remote device needs to show a specific behavior
where it fails the pairing in a certain way, and the DUT is
required to abort the pairing properly.
In abcense of a proper PTS suite to execute these test cases,
we can use another device running the same host by configuring
certain run time property.

Test Cases:
TP/SCJW/BI-02-C
TP/SCJW/BV-02-C
TP/SCPK/BI-03-C
TP/SCPK/BI-04-C
TP/SCPK/BV-02-C
TP/SCPK/BV-03-C
TP/SCJW/BI-01-C
TP/SCCT/BV-01-C
TP/SCCT/BV-02-C
TP/SCPK/BI-01-C
TP/SCPK/BI-02-C
TP/SCPK/BV-04-C
TP/SCPK/BV-01-C

Fix:
Added a property in the bt_stack.conf file. The property name
is "SmpFailureCase". The values 2 to 6(inclusive), are forcausing SMP
failures with various failure reasons.
Failure case 1 and 9 are for producing error "Confirm value failure".
Cases 7 and 8 are for generating specific errors at pair cancel.

Note:
The default use of this feature is controlled using a compile
time flag BTM_BLE_SMP_CERTIFICATION.
The BTM_BLE_SMP_CERTIFICATION = TRUE is needed only while we
wait for the PTS support for the LE Secure connections.

Bug: 27852645
Change-Id: I1f7a8ff2659d85b5978b75870c57162a34d394d0

8 years agoClear BLE block from device records at unpair am: 266ff1d759
Nitin Arora [Mon, 6 Jun 2016 17:52:07 +0000 (17:52 +0000)]
Clear BLE block from device records at unpair am: 266ff1d759
am: df95c615cb

* commit 'df95c615cbbfae8303b100f163e006fab533a834':
  Clear BLE block from device records at unpair

Change-Id: I4b7168e64d5e9935237725c43ae0440ad35ab9f3

8 years agoClear BLE block from device records at unpair
Nitin Arora [Mon, 6 Jun 2016 17:44:36 +0000 (17:44 +0000)]
Clear BLE block from device records at unpair
am: 266ff1d759

* commit '266ff1d759e7713b957cb73c8d0c7a0c0b70c7dd':
  Clear BLE block from device records at unpair

Change-Id: I5cf9341cae1887226d7947a69b985d1d43f52254

8 years agoClear BLE block from device records at unpair
Nitin Arora [Mon, 25 Apr 2016 21:47:51 +0000 (14:47 -0700)]
Clear BLE block from device records at unpair

Use Case:
Pair and unpair LE remote device repeatedly. The repair
intermittently fails with the error "DHKey Check Failure"

Failure:
Pairing failure is observed when pairing is performed
after unpairing, without performing a BT reset.
Further analysis of the SMP logs indicate that DUT uses the
static address of the remote device for calculation of the
MacKey value. At the time of pairing, the remote RPA should
be used (and the static address has not yet been distributed either).
The problem is caused by the previous dev record which is left in
the stack, and at the time of repair, stack picks the old device
record and reuses it.

Fix:
This change removes the entire BLE block from the device record,
after the unpairing is performed, so that a new device record
is allocated, after the repairing is done.

Bug: 27852645
Change-Id: I8d605d1bb3b1c32061a8d8a7a7fe0fe200030abc

8 years agoClear BLE block from device records at unpair
Nitin Arora [Mon, 25 Apr 2016 21:47:51 +0000 (14:47 -0700)]
Clear BLE block from device records at unpair

Use Case:
Pair and unpair LE remote device repeatedly. The repair
intermittently fails with the error "DHKey Check Failure"

Failure:
Pairing failure is observed when pairing is performed
after unpairing, without performing a BT reset.
Further analysis of the SMP logs indicate that DUT uses the
static address of the remote device for calculation of the
MacKey value. At the time of pairing, the remote RPA should
be used (and the static address has not yet been distributed either).
The problem is caused by the previous dev record which is left in
the stack, and at the time of repair, stack picks the old device
record and reuses it.

Fix:
This change removes the entire BLE block from the device record,
after the unpairing is performed, so that a new device record
is allocated, after the repairing is done.

Bug: 27852645
Change-Id: I8d605d1bb3b1c32061a8d8a7a7fe0fe200030abc

8 years agoRevert "DO NOT MERGE Proper construction of AVDTP general reject message"
JivakDhadse [Fri, 7 Aug 2015 13:28:38 +0000 (18:58 +0530)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message"

This reverts commit 2ed10d442266eade44be121cd24fd473c85007d0.

Original change needs to be reverted to align with Errata
ESR04 where "Section 8.17, General Reject Page 71" of adopted
AvDTP Spec is changed to have "Invalid Signal Identifier"
in first 6 bits of Octet 1.
This change helps passing PTS case TP/SIG/SMG/ESR04/BI-28-C

Bug: 27852645
Change-Id: Idfc960ce00662e8aacc26f3b3fdca9deca8a2aff

8 years agoFix for issue introduced due to rebase of LE L2CAP COC
Navin Kochar [Fri, 18 Mar 2016 06:34:30 +0000 (12:04 +0530)]
Fix for issue introduced due to rebase of LE L2CAP COC

During 6721232 patch, some code got missed while doing manual rebase.
This patch is adding that missing code.

Bug: 27852645
Change-Id: I2525908c29e3288e0ace1ee26c5f2aa6cfd59d68
Signed-off-by: Navin Kochar <navin.kochar@intel.com>
8 years agoReset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT am: 3bd286a411
Eri Kasamatsu [Fri, 3 Jun 2016 22:04:34 +0000 (22:04 +0000)]
Reset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT am: 3bd286a411
am: c2148b38cb

* commit 'c2148b38cb53f577d5732bb093d70776fad59f66':
  Reset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT

Change-Id: Ic938e3424e66ddc6906b53d0ac9b08c375b447e4

8 years agoReset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT
Eri Kasamatsu [Fri, 3 Jun 2016 21:53:38 +0000 (21:53 +0000)]
Reset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT
am: 3bd286a411

* commit '3bd286a4112de2c68e7188c0001d884454686992':
  Reset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT

Change-Id: I688b68898a107ad28678a096739a6dde5e074c24

8 years agoReset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT
Eri Kasamatsu [Mon, 9 Nov 2015 05:40:02 +0000 (14:40 +0900)]
Reset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT

In case of min_interval < BTM_BLE_CONN_INT_MIN_LIMIT
and max_interval < BTM_BLE_CONN_INT_MIN_LIMIT,
min_interval is reset to BTM_BLE_CONN_INT_MIN_LIMIT
but max_interval is not reset.
Then valid connection parameter updates can be rejected.

To avoid this, reset max_interval to BTM_BLE_CONN_INT_MIN_LIMIT
when max_interval is smaller than BTM_BLE_INT_MIN_LIMIT.

Change-Id: I5f54ddc0276f40d667ff433557b74ea4b100058d

8 years agoMerge "bt: Update libchrome APIs to r395517" am: cb3c6f3cd0
Luis Hector Chavez [Wed, 1 Jun 2016 22:04:34 +0000 (22:04 +0000)]
Merge "bt: Update libchrome APIs to r395517" am: cb3c6f3cd0
am: 7156015e90

* commit '7156015e902c2c4b33079f354143f597cdd9c28b':
  bt: Update libchrome APIs to r395517

Change-Id: I9fe6ea63138a35e9925ed339cf1f993ea059f475

8 years agonet_test_bluetooth: RFCOMM test refactor am: fa717c0b47
Ajay Panicker [Wed, 1 Jun 2016 22:04:28 +0000 (22:04 +0000)]
net_test_bluetooth: RFCOMM test refactor am: fa717c0b47
am: 7390de6ace

* commit '7390de6ace68340ced99c84835e13aaf5c0af4a5':
  net_test_bluetooth: RFCOMM test refactor

Change-Id: I436f760e8e2d57283da0abff75d137837c5fe13d

8 years agoMerge "bt: Update libchrome APIs to r395517"
Luis Hector Chavez [Wed, 1 Jun 2016 21:57:38 +0000 (21:57 +0000)]
Merge "bt: Update libchrome APIs to r395517"
am: cb3c6f3cd0

* commit 'cb3c6f3cd0b908e36443d41c2d736b88d742ee1a':
  bt: Update libchrome APIs to r395517

Change-Id: I579baf27f8e777b16c559ba30bf649fc3958b94e

8 years agonet_test_bluetooth: RFCOMM test refactor
Ajay Panicker [Wed, 1 Jun 2016 21:57:35 +0000 (21:57 +0000)]
net_test_bluetooth: RFCOMM test refactor
am: fa717c0b47

* commit 'fa717c0b47bb1fed04da295eaa580a92bc08c622':
  net_test_bluetooth: RFCOMM test refactor

Change-Id: I4f5d85e43462e666ead4714b92b77cf95db3bdff