OSDN Git Service

android-x86/system-bt.git
4 years agoPDL Pybind: Allow packets to contain packets
Myles Watson [Sat, 21 Dec 2019 00:42:40 +0000 (16:42 -0800)]
PDL Pybind: Allow packets to contain packets

Bug: 143568835
Test: import bluetooth_packets_python3.hci_packets as hci_packets
      conn_handle = 23
      acl_packet = hci_packets.AclPacketBuilder(conn_handle,
          hci_packets.PacketBoundaryFlag.FIRST_NON_AUTOMATICALLY_FLUSHABLE,
          hci_packets.BroadcastFlag.POINT_TO_POINT, packet_to_send).Serialize()
      acl_packet
      # [23, 0, 3, 0, 20, 12, 0]
      payload = hci_packets.ReadLocalNameBuilder()
      payload.Serialize()
      # [20, 12, 0]
      conn_handle = 23
      acl_packet = hci_packets.AclPacketBuilder(conn_handle,
          hci_packets.PacketBoundaryFlag.FIRST_NON_AUTOMATICALLY_FLUSHABLE,
          hci_packets.BroadcastFlag.POINT_TO_POINT, payload)
      acl_packet.Serialize()
      # [23, 0, 3, 0, 20, 12, 0]
Change-Id: I4d5109d0f8d5ea4af4e935db4cdaf558a93ea74b

4 years agoRFCOMM: Remove dead code
Hansong Zhang [Fri, 20 Dec 2019 20:44:57 +0000 (12:44 -0800)]
RFCOMM: Remove dead code

Test: compile
Change-Id: I1a989515f57d68a3ea30ac0f86f7e1196cfcd2b9

4 years agoMerge "Clear static btm checks during shutdown"
Treehugger Robot [Fri, 20 Dec 2019 04:17:51 +0000 (04:17 +0000)]
Merge "Clear static btm checks during shutdown"

4 years agoClear static btm checks during shutdown
Chris Manton [Fri, 20 Dec 2019 02:43:08 +0000 (18:43 -0800)]
Clear static btm checks during shutdown

Bug: 140778599
Test: net_test_bluetooth
Change-Id: Ib2c42788c35e1486b316d205def7cc568c85e012

4 years agoRemove dead code in SDP
Hansong Zhang [Fri, 20 Dec 2019 01:27:16 +0000 (17:27 -0800)]
Remove dead code in SDP

Test: compile
Change-Id: Id57fb6d7f757f6656ab9b2d5c5b22a3dd4e6bd73

4 years agoMerge "L2CAP: Integrate ERTM to shim"
Treehugger Robot [Thu, 19 Dec 2019 01:18:20 +0000 (01:18 +0000)]
Merge "L2CAP: Integrate ERTM to shim"

4 years agoL2CAP: Integrate ERTM to shim
Hansong Zhang [Tue, 17 Dec 2019 22:00:15 +0000 (14:00 -0800)]
L2CAP: Integrate ERTM to shim

Bug: 145847248
Test: bluetooth_test_legacy
Change-Id: I28e8881dc6a9dd12514711bab6e7d47e92f1b53f

4 years agoMerge changes I4184f82e,If7223eaf
Treehugger Robot [Wed, 18 Dec 2019 21:38:39 +0000 (21:38 +0000)]
Merge changes I4184f82e,If7223eaf

* changes:
  Connect shim timers
  Add timer capability for shim stack

4 years agoConnect shim timers
Chris Manton [Tue, 17 Dec 2019 17:38:32 +0000 (09:38 -0800)]
Connect shim timers

Bug: 143578947
Test: bluetooth_test_legacy

Change-Id: I4184f82e1ab1a9ceb44297882a564530a39dee70

4 years agoAdd timer capability for shim stack
Chris Manton [Mon, 16 Dec 2019 20:36:08 +0000 (12:36 -0800)]
Add timer capability for shim stack

The le advertising and scanning features
require timers to stop functionality after the
requested interval.

Bug: 146367779
Test: bluetooth_legacy_test
Change-Id: If7223eaff30785c661bca7f90d94462772d576bc

4 years agoMerge "A2DP: HAL codec offloading capabilities check preparation"
Treehugger Robot [Wed, 18 Dec 2019 17:27:58 +0000 (17:27 +0000)]
Merge "A2DP: HAL codec offloading capabilities check preparation"

4 years agoMerge changes from topic "gd_sm_cert"
Treehugger Robot [Wed, 18 Dec 2019 16:40:25 +0000 (16:40 +0000)]
Merge changes from topic "gd_sm_cert"

* changes:
  SecurityModule: Setup devices
  SecurityModule: Add security module to gd_device

4 years agoMerge "Handle BQR root inflammation event"
Treehugger Robot [Wed, 18 Dec 2019 09:53:55 +0000 (09:53 +0000)]
Merge "Handle BQR root inflammation event"

4 years agoMerge "Print HwBinder thread performance to dumpsys"
Treehugger Robot [Wed, 18 Dec 2019 03:57:55 +0000 (03:57 +0000)]
Merge "Print HwBinder thread performance to dumpsys"

4 years agoMerge "PDL: Add Python support for Address, ClassOfDevice"
Treehugger Robot [Wed, 18 Dec 2019 03:24:05 +0000 (03:24 +0000)]
Merge "PDL: Add Python support for Address, ClassOfDevice"

4 years agoRearrange shim layer libs for testing
Chris Manton [Wed, 18 Dec 2019 00:01:48 +0000 (16:01 -0800)]
Rearrange shim layer libs for testing

Bug: 146367779
Test: bluetooth_test_legacy
Change-Id: I1d823fe28c7de73503cd9628ec8b29a49799d75e

4 years agoSecurityModule: Setup devices
Martin Brabham [Tue, 17 Dec 2019 23:45:09 +0000 (15:45 -0800)]
SecurityModule: Setup devices

Bug: 144742237
Test: ./cert/run_cert_facade_only.sh
Change-Id: I282b9cfd9c0155eb938a3bcb09a0b4f9e19397cd

4 years agoSecurityModule: Add security module to gd_device
Martin Brabham [Mon, 16 Dec 2019 20:55:35 +0000 (12:55 -0800)]
SecurityModule: Add security module to gd_device

Bug: 144742237
Test: ./cert/run_cert_facade_only.sh
Change-Id: I9f2ff82b72559e62bce0a1be2f05c5d50ab4d23c

4 years agoL2CAP: Remove unused L2CA_LocalLoopbackReq
Hansong Zhang [Tue, 17 Dec 2019 22:07:30 +0000 (14:07 -0800)]
L2CAP: Remove unused L2CA_LocalLoopbackReq

Bug: 145847248
Test: compile
Change-Id: Id3e25ba3890a7ae03a62f00177b344cd19c64065

4 years agoL2CAP: Remove unused l2cap_client
Hansong Zhang [Tue, 17 Dec 2019 22:02:16 +0000 (14:02 -0800)]
L2CAP: Remove unused l2cap_client

Bug: 145847248
Test: compile
Change-Id: I380ba1407bd2ddc55aded5905efa5dc10d7d309b

4 years agoMerge "Rework inquiry data flow"
Treehugger Robot [Tue, 17 Dec 2019 23:18:23 +0000 (23:18 +0000)]
Merge "Rework inquiry data flow"

4 years agoPDL: Add Python support for Address, ClassOfDevice
Myles Watson [Sat, 14 Dec 2019 01:50:12 +0000 (17:50 -0800)]
PDL: Add Python support for Address, ClassOfDevice

Add a type_caster for each custom type to and from std::string.

Bug: 143568835
Test: Create packets in Python passing strings:
   $ python3.8
   >>> import bluetooth_packets_python3 as bp3
   >>> pview = bp3.PacketViewLittleEndian([14, 10, 1, 9, 16, 0, 1, 2, 3, 4, 5, 6])
   >>> event = bp3.hci_packets.EventPacketView(pview)
   >>> complete = bp3.hci_packets.CommandCompleteView(event)
   >>> read_complete = bp3.hci_packets.ReadBdAddrCompleteView(complete)
   >>> address = read_complete.GetBdAddr()
   >>> print(address)
   06:05:04:03:02:01
   >>> builder = bp3.hci_packets.ReadBdAddrCompleteBuilder(1, bp3.hci_packets.ErrorCode.SUCCESS, address)
   >>> builder.Serialize()
   [14, 10, 1, 9, 16, 0, 1, 2, 3, 4, 5, 6]
   >>> quit()
Change-Id: If0a1639a4c1a162b68e1d0a0bb1cd5ba552a1190

4 years agoA2DP: HAL codec offloading capabilities check preparation
Cheney Ni [Mon, 2 Dec 2019 11:51:56 +0000 (19:51 +0800)]
A2DP: HAL codec offloading capabilities check preparation

* Move HAL codec properties to ::bluetooth::audio::codec namespace
* Add API to query the audio HAL capabilities about codec offloading
* API for Applying frameworks offloading preference
* API to check whether the codec configuration is offloading or software

Bug: 143922003
Test: bluetooth-test-audio-hal-interface
Change-Id: I47ce39ada6eed696bc1b8771cda6a52fd8a30e60

4 years agoPrint HwBinder thread performance to dumpsys
Ugo Yu [Mon, 16 Dec 2019 09:34:47 +0000 (17:34 +0800)]
Print HwBinder thread performance to dumpsys

Dump the time periods between Hwbinder timer starts and stops.

Bug: 144592765
Test: dumpsys bluetooth_manager
Change-Id: I500865925b74f3492f32d2cf9a6600a766d1a987

4 years agoMerge "A2DP: Don't start or suspend the encoder for a non-active sink"
Treehugger Robot [Tue, 17 Dec 2019 02:58:05 +0000 (02:58 +0000)]
Merge "A2DP: Don't start or suspend the encoder for a non-active sink"

4 years agoMerge "Add timer to detect HwBinder thread stuck"
Treehugger Robot [Tue, 17 Dec 2019 02:10:54 +0000 (02:10 +0000)]
Merge "Add timer to detect HwBinder thread stuck"

4 years agoRework inquiry data flow
Chris Manton [Fri, 13 Dec 2019 01:21:00 +0000 (17:21 -0800)]
Rework inquiry data flow

Land inquiry integration just past the
parsing code in legacy stack.

Bug: 146086425
Test: manual verified results received

Change-Id: I113e2e1fbcbda585a68addaac64a306576a29da0

4 years agoMerge "SecurityModule: Initial cert test"
Treehugger Robot [Mon, 16 Dec 2019 21:06:19 +0000 (21:06 +0000)]
Merge "SecurityModule: Initial cert test"

4 years agoMerge "DO NOT MERGE Decouple inquiry result parsing"
Treehugger Robot [Mon, 16 Dec 2019 20:11:02 +0000 (20:11 +0000)]
Merge "DO NOT MERGE Decouple inquiry result parsing"

4 years agoMerge "L2capModule: Add more mocks"
Treehugger Robot [Mon, 16 Dec 2019 19:45:42 +0000 (19:45 +0000)]
Merge "L2capModule: Add more mocks"

4 years agoA2DP: Don't start or suspend the encoder for a non-active sink
Cheney Ni [Fri, 15 Nov 2019 09:08:26 +0000 (17:08 +0800)]
A2DP: Don't start or suspend the encoder for a non-active sink

While switching the A2DP active device, those AV_START or AV_SUSPEND
events might be from previous active device which was no longer active
now. We should keep it as suspended, but don't change the encoder and
audio provider state by these events.

This CL also simplify A2DP source suspend / stop callbacks.

Bug: 144670756
Test: Switch A2DP active device manually
Change-Id: I640e1e219306641beca1ff5ac758c2c95d925737

4 years agoSecurityModule: Initial cert test
Martin Brabham [Fri, 13 Dec 2019 19:00:03 +0000 (11:00 -0800)]
SecurityModule: Initial cert test

Bug: 145638110
Test: ./cert/run_cert_facade_only.sh
Change-Id: Ie01590b243485fe392a73512c811f25ce1b9eb0c

4 years agoMerge "L2CAP ERTM: Fix infinite loop in retransmit_i_frame"
Treehugger Robot [Mon, 16 Dec 2019 18:19:09 +0000 (18:19 +0000)]
Merge "L2CAP ERTM: Fix infinite loop in retransmit_i_frame"

4 years agoDO NOT MERGE Decouple inquiry result parsing
Chris Manton [Mon, 16 Dec 2019 17:53:06 +0000 (09:53 -0800)]
DO NOT MERGE Decouple inquiry result parsing

Bug: 146086425
Test: bluetooth_legacy_test
Change-Id: Ic87db900a3f9b56657c0d07b1ff2e416ac1a2fb6

4 years agoAdd timer to detect HwBinder thread stuck
Ugo Yu [Fri, 22 Nov 2019 03:48:44 +0000 (11:48 +0800)]
Add timer to detect HwBinder thread stuck

Abort Bluetooth process when the HwBinder thread takes
too long to finish its tasks. The timer is on both audio
HAL and hci HAL since they are sharing the same HwBinder
thread.

Bug: 144592765
Test: Manual
Change-Id: I8bb84cd460ecebda47c49bb3299c93e7f0f2d4ef

4 years agoSeparate out legacy shim sources
Chris Manton [Sun, 15 Dec 2019 21:20:13 +0000 (13:20 -0800)]
Separate out legacy shim sources

Granularize the make dependencies

Test: bluetooth_test_legacy
Bug: 146086425

Change-Id: I8c7a8c070d7a84527770a66ca66af9b07bc83b3a

4 years agoMerge "Pipe featureId from app to noteOp in BT code"
Treehugger Robot [Sat, 14 Dec 2019 17:36:47 +0000 (17:36 +0000)]
Merge "Pipe featureId from app to noteOp in BT code"

4 years agoMerge "A2DP: When changing codec, resume the audio session after AVDTP_Reconfig done"
Treehugger Robot [Sat, 14 Dec 2019 12:09:09 +0000 (12:09 +0000)]
Merge "A2DP: When changing codec, resume the audio session after AVDTP_Reconfig done"

4 years agoL2CAP ERTM: Fix infinite loop in retransmit_i_frame
Ted Wang [Sat, 14 Dec 2019 09:36:15 +0000 (17:36 +0800)]
L2CAP ERTM: Fix infinite loop in retransmit_i_frame

Bug: 146255712
Test: run_cert.sh
Change-Id: If6342b39ccfcad31bccf54b0dedcad5c7e6aa1e8

4 years agoMerge "Create structs for default and with rssi inquiry results"
Chris Manton [Fri, 13 Dec 2019 19:41:57 +0000 (19:41 +0000)]
Merge "Create structs for default and with rssi inquiry results"

4 years agoPipe featureId from app to noteOp in BT code
Philip P. Moltmann [Fri, 15 Nov 2019 20:39:07 +0000 (12:39 -0800)]
Pipe featureId from app to noteOp in BT code

FeatureIds are not yet available

Test: Used bluetooth
Bug: 136595429
Change-Id: Ib05cad1d3dda3454ac366e1db305d574e3735efe

4 years agoMerge "SecurityModule: Add hooks to ISecurityManagerListener for Dialog notification"
Treehugger Robot [Fri, 13 Dec 2019 17:25:04 +0000 (17:25 +0000)]
Merge "SecurityModule: Add hooks to ISecurityManagerListener for Dialog notification"

4 years agoCreate structs for default and with rssi inquiry results
Chris Manton [Fri, 13 Dec 2019 01:29:32 +0000 (17:29 -0800)]
Create structs for default and with rssi inquiry results

Bug: 146086425
Test: blueooth_gd_test
Change-Id: I7183bb0bbbab04423e61dc2bce4f2d5d5e3b1e5c

4 years agoA2DP: When changing codec, resume the audio session after AVDTP_Reconfig done
Cheney Ni [Tue, 6 Aug 2019 13:51:05 +0000 (21:51 +0800)]
A2DP: When changing codec, resume the audio session after AVDTP_Reconfig done

When changing the codec configuration, we need to wait for AVDTP data
channel opened again, so have the updated MTU to share with our encoder.
This had to be done before starting the new HAL session, or might
provide an incorrect configuration with IOP issues.

This also reverts commit 51d80cf5ea6f83ec84b80b91454bd05abbec8b93 since
we had all latest configurations before starting the new HAL session,
and is no needed to force update.

Bug: 132217607
Bug: 134125165
Test: manually
Change-Id: Id82f506190729881349f4ac8d2f8aef38f946ef2

4 years agoL2CAP: Delete unused API
Hansong Zhang [Fri, 13 Dec 2019 00:06:48 +0000 (16:06 -0800)]
L2CAP: Delete unused API

L2CA_FlowControl, L2CA_SendTestSFrame, L2CA_GetChnlFcrMode,
L2CA_GetBDAddrbyHandle, L2CA_GetCurrentConfig, L2CA_GetConnectionConfig
are unused and we don't need it in shim

Bug: 145847248
Test: compile
Change-Id: Ie91bb7ed4da2d71a82d2fe8b7f8fb577c00e9e86

4 years agoSecurityModule: Add hooks to ISecurityManagerListener for Dialog notification
Martin Brabham [Thu, 12 Dec 2019 18:38:33 +0000 (10:38 -0800)]
SecurityModule: Add hooks to ISecurityManagerListener for Dialog notification

Bug: 144375377
Test: atest --host -t bluetooth_test_gd:ClassicPairingHandlerTest
Change-Id: I92a462880cb5cd8ab78c624d7a63085118b90218

4 years agoRestructure inquiry shim API
Chris Manton [Thu, 12 Dec 2019 18:20:54 +0000 (10:20 -0800)]
Restructure inquiry shim API

Bug: 142061208
Test: Verified inquiry on crosshatch settings

Change-Id: I22bb4c9acba3f7dc43e3cdbf62ec051da0919bee

4 years agoMerge "SecurityModule: cleanup pairing handler"
Treehugger Robot [Thu, 12 Dec 2019 21:59:41 +0000 (21:59 +0000)]
Merge "SecurityModule: cleanup pairing handler"

4 years agoL2capModule: Add more mocks
Martin Brabham [Thu, 12 Dec 2019 21:41:17 +0000 (13:41 -0800)]
L2capModule: Add more mocks

Bug: 140813676
Test: N/A
Change-Id: Ifd5beecbb4b4e3da0aa2abeee5c4ab5fa5f7ffa5

4 years agoMerge "Clean up BTM api"
Treehugger Robot [Thu, 12 Dec 2019 21:11:41 +0000 (21:11 +0000)]
Merge "Clean up BTM api"

4 years agoSecurityModule: cleanup pairing handler
Martin Brabham [Tue, 10 Dec 2019 20:02:26 +0000 (12:02 -0800)]
SecurityModule: cleanup pairing handler

Bug: 144375377
Test: atest --host -t bluetooth_test_gd:ClassicPairingHandlerTest
Change-Id: Id91199aba8b05087f31f5bcd6feb12f8cb6b0641

4 years agoClean up BTM api
Chris Manton [Thu, 12 Dec 2019 19:33:44 +0000 (11:33 -0800)]
Clean up BTM api

Bug: 146086425
Test: bluetooth_test_legacy
Change-Id: If75224b6b502b553e123ff31cb53e9625c5831f8

4 years agoMerge "Add LE related fields into SecurityRecord"
Treehugger Robot [Thu, 12 Dec 2019 19:00:40 +0000 (19:00 +0000)]
Merge "Add LE related fields into SecurityRecord"

4 years agoHandle BQR root inflammation event
Ugo Yu [Tue, 26 Nov 2019 09:18:32 +0000 (17:18 +0800)]
Handle BQR root inflammation event

* When Bluetooth process recieves BQR root inflammation event, wait
  5 seconds for possible DEBUG_INFO events, then abort.
* Fix the DEBUG_INFO not working problem.
* Do not immediately abort when HAL service dies if abort_timer has
  already started, so we won't interrupt log collecting procedure.

Bug: 144572644
Bug: 144592765
Test: Manual
Change-Id: Ibe6c341a3e9aabec33de8d3f90c4a6a3403d06bc

4 years agoMerge "Earlier check for inquiry scan stopping"
Treehugger Robot [Thu, 12 Dec 2019 07:04:57 +0000 (07:04 +0000)]
Merge "Earlier check for inquiry scan stopping"

4 years agoMerge "Race condition with channel closure"
Treehugger Robot [Thu, 12 Dec 2019 05:33:56 +0000 (05:33 +0000)]
Merge "Race condition with channel closure"

4 years agoRace condition with channel closure
Chris Manton [Thu, 12 Dec 2019 02:55:24 +0000 (18:55 -0800)]
Race condition with channel closure

Bug: 146086425
Test: Opp does not fail at this point
Change-Id: I5ef6e1a44c02c8d2804a47809c9cee157ec41fe0

4 years agoRemove unnecessary function logging
Chris Manton [Thu, 12 Dec 2019 02:48:26 +0000 (18:48 -0800)]
Remove unnecessary function logging

Bug: 146086425
Test: bluetooth_gd_test
Change-Id: I467c6da8c2e798f8df9b5005bcf90883fd2ba242

4 years agoEarlier check for inquiry scan stopping
Chris Manton [Thu, 12 Dec 2019 02:46:31 +0000 (18:46 -0800)]
Earlier check for inquiry scan stopping

Bug: 146086425
Test: bluetooth_gd_test
Change-Id: Ied98341a610a9a987263b4202f126be736430c41

4 years agoMerge "Cert Test: Stop using cert API protos and user layer N-1 to test layer N"
Treehugger Robot [Thu, 12 Dec 2019 02:05:32 +0000 (02:05 +0000)]
Merge "Cert Test: Stop using cert API protos and user layer N-1 to test layer N"

4 years agoMerge "Add support for le privacy"
Treehugger Robot [Thu, 12 Dec 2019 01:13:11 +0000 (01:13 +0000)]
Merge "Add support for le privacy"

4 years agoMerge "PDL: Check total field length before parsing"
Treehugger Robot [Thu, 12 Dec 2019 00:58:36 +0000 (00:58 +0000)]
Merge "PDL: Check total field length before parsing"

4 years agoCert Test: Stop using cert API protos and user layer N-1 to test layer N
Jack He [Thu, 12 Dec 2019 00:20:47 +0000 (16:20 -0800)]
Cert Test: Stop using cert API protos and user layer N-1 to test layer N

* Instead of having a separate certification stack, trying to simplify
  the testing model by moving the implementation of the certification
  stack to Python on top of the underlying layer
* This means that when testing layer N, the certification device will
  be using layer N-1 and a Python based certification stack or event
  handler
* Migrate SimpleHalTest to use facade APIs only
* Remove build rules and files related to HAL cert APIs

Bug: 146082036
Test: Run SimpleHalTests
Change-Id: I304ff425f7bb42da17a71914faeee8f20118007b

4 years agoMerge "Cert: Do not export PYTHONPATH in run scripts"
Treehugger Robot [Thu, 12 Dec 2019 00:07:28 +0000 (00:07 +0000)]
Merge "Cert: Do not export PYTHONPATH in run scripts"

4 years agoAdd support for le privacy
Chris Manton [Wed, 11 Dec 2019 22:47:06 +0000 (14:47 -0800)]
Add support for le privacy

Bug: 142501664
Test: Verified multiple advertisers on nordic utility
Change-Id: Ied31dcb37d814a220247a5e972288d89627f1fb0

4 years agoPDL: Check total field length before parsing
Myles Watson [Wed, 11 Dec 2019 19:26:41 +0000 (11:26 -0800)]
PDL: Check total field length before parsing

- Add a test for struct parsing in packet/parser/test
- Sum the field bits and check against the total size
- Round up when returning the number of bytes from Size

Fixes: 143118297
Fixes: 144231005
Fixes: 144245424
Fixes: 144354467
Test: bluetooth_packet_parser_test
      bluetooth_test_gd
Change-Id: Ib71b7fae2c00ae36326a2dc38bce3c56b96fe29e

4 years agoPDL: Split Fuzz test definition and registration
Myles Watson [Wed, 11 Dec 2019 01:00:23 +0000 (17:00 -0800)]
PDL: Split Fuzz test definition and registration

Bug: 146065579
Test: bluetooth_test_gd
      Manually create a test and call the function
Change-Id: Ic0c0244aa4a8371143335246c8e3aa8bf37dabc1

4 years agoCert: Do not export PYTHONPATH in run scripts
Jack He [Wed, 11 Dec 2019 22:30:32 +0000 (14:30 -0800)]
Cert: Do not export PYTHONPATH in run scripts

Test: run cert
Change-Id: I84db00b135f837cd8c48b6b6f4bff661223bacda

4 years agoPython: format all Python files in system/bt using YAPF
Jack He [Wed, 11 Dec 2019 00:41:59 +0000 (16:41 -0800)]
Python: format all Python files in system/bt using YAPF

python3 yapf -p -i $(git ls-tree --name-only -r aosp/master | grep "\.py")

Bug: 146016811
Test: run Python tests
Change-Id: Ic5fe6a21151d1abc8eb013f8c8070ba8238a5249

4 years agoAdd Python style checker to system/bt
Jack He [Tue, 10 Dec 2019 01:21:19 +0000 (17:21 -0800)]
Add Python style checker to system/bt

* Based on Google style and ensure 4 spaces are used for indentation
* http://google.github.io/styleguide/pyguide.html

Bug: 146016811
Test: upload CLs
Change-Id: I27b9232d59e9e9bd59ca1414ef6f9db85c41a808

4 years agoAdd LE related fields into SecurityRecord
Jakub Pawlowski [Wed, 11 Dec 2019 17:12:00 +0000 (18:12 +0100)]
Add LE related fields into SecurityRecord

Bug: 142341141
Change-Id: I3706f96d35716df65a47f64057598f4e1bc027c0

4 years agoAdd message loop post for shim layer
Chris Manton [Wed, 11 Dec 2019 05:56:18 +0000 (21:56 -0800)]
Add message loop post for shim layer

Bug: 142501664
Test: Compiles
Change-Id: Ia25f5ad4147bcd7206203bcb69bfcd0e901711f6

4 years agoCert: do not export PYTHONPATH
Jack He [Tue, 10 Dec 2019 22:58:03 +0000 (14:58 -0800)]
Cert: do not export PYTHONPATH

* Configure PYTHONPATH for runtime only, do not export it

Test: set_up_acts.sh
Change-Id: Ie666b76be6742603c57b063aa9bfc963d239e61c

4 years agoMerge "DO NOT MERGE Legacy side gd shim for le adv/scan"
Treehugger Robot [Tue, 10 Dec 2019 22:32:35 +0000 (22:32 +0000)]
Merge "DO NOT MERGE Legacy side gd shim for le adv/scan"

4 years agoMerge "Add sbcdecoder fuzzer on behalf of ext. researcher"
Hamzeh Zawawy [Tue, 10 Dec 2019 21:52:51 +0000 (21:52 +0000)]
Merge "Add sbcdecoder fuzzer on behalf of ext. researcher"

4 years agoMerge "Register security manager for L2CAP connection events"
Jakub Pawlowski [Tue, 10 Dec 2019 20:49:28 +0000 (20:49 +0000)]
Merge "Register security manager for L2CAP connection events"

4 years agoMerge "Plumb advertiser data through shim controller"
Treehugger Robot [Tue, 10 Dec 2019 20:02:42 +0000 (20:02 +0000)]
Merge "Plumb advertiser data through shim controller"

4 years agoDO NOT MERGE Legacy side gd shim for le adv/scan
Chris Manton [Tue, 10 Dec 2019 18:17:58 +0000 (10:17 -0800)]
DO NOT MERGE Legacy side gd shim for le adv/scan

Bug: 143579227
Test: Verify advertising data obtained via nRF logger
Change-Id: I529070a2ed2b8e50fc7a12fdcaa03344a3df9df3

4 years agoMerge "SecurityModule: Add PairingResultOrFailure to callback signature."
Martin Brabham [Tue, 10 Dec 2019 19:44:49 +0000 (19:44 +0000)]
Merge "SecurityModule: Add PairingResultOrFailure to callback signature."

4 years agoRegister security manager for L2CAP connection events
Jakub Pawlowski [Thu, 5 Dec 2019 09:30:41 +0000 (10:30 +0100)]
Register security manager for L2CAP connection events

Bug: 142341141
Change-Id: Ifddba2f08c202bd7b659b516fdb2704c94b3bf7f

4 years agoPlumb advertiser data through shim controller
Chris Manton [Tue, 10 Dec 2019 17:54:03 +0000 (09:54 -0800)]
Plumb advertiser data through shim controller

Bug: 142501909
Test: Verify advertising data obtained via nRF logger
Change-Id: I40f5aafd322c3a78ff80750def4a1decafa78b7a

4 years agoHCI: Add LeAdvertisingManager Extended tests
Myles Watson [Tue, 3 Dec 2019 23:22:30 +0000 (15:22 -0800)]
HCI: Add LeAdvertisingManager Extended tests

Make tests more reliable.  Add disable to the tests.

Bug:143568835
Test: bluetooth_test_gd
Change-Id: If5983b830735c0221fbc9fcd0b2f36a64671d01d

4 years agoMerge "Remove unused mca_cact.cc"
Treehugger Robot [Tue, 10 Dec 2019 16:54:35 +0000 (16:54 +0000)]
Merge "Remove unused mca_cact.cc"

4 years agoMerge "L2CAP: Remove unnecessary #define"
Treehugger Robot [Tue, 10 Dec 2019 16:54:17 +0000 (16:54 +0000)]
Merge "L2CAP: Remove unnecessary #define"

4 years agoMerge "Change advertising set data size"
Treehugger Robot [Tue, 10 Dec 2019 07:16:34 +0000 (07:16 +0000)]
Merge "Change advertising set data size"

4 years agoMerge "Gd advertiser and scanner shim to legacy"
Treehugger Robot [Tue, 10 Dec 2019 06:59:43 +0000 (06:59 +0000)]
Merge "Gd advertiser and scanner shim to legacy"

4 years agoChange advertising set data size
Chris Manton [Tue, 10 Dec 2019 05:53:45 +0000 (21:53 -0800)]
Change advertising set data size

It is 8 bit not 16 bit.

Bug: 142501909
Test: bluetooth_gd_test
Change-Id: I1a60d9980a1446035123abff8952e94e1efd0c4e

4 years agoRemove unused mca_cact.cc
Hansong Zhang [Tue, 10 Dec 2019 04:55:04 +0000 (20:55 -0800)]
Remove unused mca_cact.cc

Test: compile
Change-Id: Ia35d3710f973f3cb2055378399736a24b1352562

4 years agoMerge "Cert Test: Simplify server-client stream handling"
Treehugger Robot [Tue, 10 Dec 2019 04:43:37 +0000 (04:43 +0000)]
Merge "Cert Test: Simplify server-client stream handling"

4 years agoGd advertiser and scanner shim to legacy
Chris Manton [Mon, 9 Dec 2019 01:46:22 +0000 (17:46 -0800)]
Gd advertiser and scanner shim to legacy

Bug: 143578947
Test: Devicepicker shows le devices
Change-Id: I7aab1f5fcbc44665ef797d7195afc0165eede443

4 years agoL2CAP: Remove unnecessary #define
Hansong Zhang [Tue, 10 Dec 2019 01:24:09 +0000 (17:24 -0800)]
L2CAP: Remove unnecessary #define

Test: compile
Change-Id: Ifa472ed5bccf58eb5a57a7c412760f14343c51cb

4 years agoCert Test: Simplify server-client stream handling
Jack He [Sat, 7 Dec 2019 01:13:27 +0000 (17:13 -0800)]
Cert Test: Simplify server-client stream handling

* Created EventCallbackStream in Python to handle gRPC server
  one-directional stream asynchronously
* Created EventAsserts in Python that uses EventCallbackStream
  to assert on incoming gRPC stream events
* Created bluetooth::grpc::GrpcEventQueue to handle gRPC server
  stream request asynchronously. This class blocks the calling
  gRPC thread whiling taking incoming events on a different
  thread and pass the event via a common::BlockingQueue
* Migrated all existing facade tests to use the new infrastructure
* Get rid of legacy definition of EventStream

Bug: 143373417
Test: SimpleHalTest, SimpleHciTest, SimpleL2capTest
Change-Id: I9d841fe2729e284450f8b031d9d1f094dd0c021b

4 years agoMerge "L2CAP: Delete more unused API"
Treehugger Robot [Mon, 9 Dec 2019 22:50:25 +0000 (22:50 +0000)]
Merge "L2CAP: Delete more unused API"

4 years agoMerge "Gd advertiser and scanner shim"
Chris Manton [Mon, 9 Dec 2019 22:05:12 +0000 (22:05 +0000)]
Merge "Gd advertiser and scanner shim"

4 years agoSecurityModule: Add PairingResultOrFailure to callback signature.
Martin Brabham [Thu, 5 Dec 2019 21:14:31 +0000 (13:14 -0800)]
SecurityModule: Add PairingResultOrFailure to callback signature.

Bug: 139137147
Test: atest --host -t bluetooth_test_gd:ClassicPairingHandlerTest
Change-Id: I93b87d12143af21f7897bb27193c4115c2f4c019

4 years agoL2CAP: Delete more unused API
Hansong Zhang [Mon, 9 Dec 2019 20:57:45 +0000 (12:57 -0800)]
L2CAP: Delete more unused API

Test: compile
Bug: 145847248
Change-Id: I7055d63e39234bd83847655d77945b79424c1015

4 years agoAdd sbcdecoder fuzzer on behalf of ext. researcher
hamzeh [Sun, 8 Dec 2019 09:53:36 +0000 (01:53 -0800)]
Add sbcdecoder fuzzer on behalf of ext. researcher

Bug: 145143919
Test: successfully built and ran
Change-Id: I32a53dcfd853f60aaf2ff81e4552ff4dc17f9f26

4 years agoMerge changes I1abcf94d,I720b8a16
Treehugger Robot [Mon, 9 Dec 2019 19:50:08 +0000 (19:50 +0000)]
Merge changes I1abcf94d,I720b8a16

* changes:
  Simplify security level parameter for SDP
  L2CAP: Remove never used API Ping and Echo

4 years agoMerge "Delete HL files"
Treehugger Robot [Mon, 9 Dec 2019 19:50:01 +0000 (19:50 +0000)]
Merge "Delete HL files"

4 years agoGd advertiser and scanner shim
Chris Manton [Mon, 9 Dec 2019 01:46:22 +0000 (17:46 -0800)]
Gd advertiser and scanner shim

Bug: 143578947
Test: Devicepicker shows le devices
Change-Id: I5a59c791b2c37ada9d2dde0563dae69bb0039501