Skip to content
Snippets Groups Projects
  1. May 07, 2018
    • Stanley Tng's avatar
      Fixed PTS: TC_GATT_SR_GAR_BI_01_C failure · 73fae2ed
      Stanley Tng authored
      When the GATT Read Request has bad handle parameters, returns the
      GATT_INVALID_HANDLE error code instead of GATT_INVALID_PDU.
      
      Bug: 79340029
      Test: Rerun PTS
      Change-Id: I9de576076d7f7aece0831ef57b01c07a24209010
      73fae2ed
  2. Apr 27, 2018
    • android-build-prod (mdb)'s avatar
    • Guang Xie's avatar
      Enable HCI Sniff mode and disable subrating for A2DP · 1bb4bc42
      Guang Xie authored
      Enabling the HCI Sniff mode could help headsets to save power.
      
      Note that subrating is disabled implicitly by NOT sending the
      "Sent Sniff Subrating" HCI command to the BT controller,
      and effectively using the default Sniff Subrating parameters.
      The Headset shouldn't go into Subrating Mode to prevent
      potential stuttering if the Headset chooses to use subrating
      with the wrong parameters.
      
      NOTE: This should affect only Pixel Buds.
      
      Also:
       - Added some extra log messages
       - Minor cleanup (argument/variable renaming)
      
      Bug: 74344711
      Bug: 74361002
      Test: Manual - audio streaming; examine btsnoop logs
      Change-Id: Iec5086dba6f9003c21bcb41eddb3bc83ac7dddd1
      1bb4bc42
    • Jack He's avatar
      RFCOMM: Crash on null MCB and PORT in state machine · 00c1bbd9
      Jack He authored
      * rfc_mx_sm_execute should never receive a NULL mcb
      * rfc_port_sm_execute should never receive a NULL port
      * If the above happens, we should crash since otherwise we might miss a
        state machine event and not knowing that we missed it if we just do a
        simple NULL check
      
      Bug: 77224743
      Test: StackRfcommTest
      Change-Id: I7114e46ae706927cc839c7201c97362710e7a874
      00c1bbd9
  3. Apr 25, 2018
    • Pavlin Radoslavov's avatar
      Save the AVDTP version after SDP discovery and read it on reconnect · 37d7e9c1
      Pavlin Radoslavov authored
      * Save the AVDTP version discovered by SDP to the device's local
        configuration section with key string of "AvdtpVersion"
      * Refactor tBTA_AV_SCB and hide the AVDTP version and peer address
        behind get/set methods:
        AvdtpVersion() / SetAvdtpVersion() / PeerAddress().
      * Added new methods tBTA_AV_SCB::OnConnected() and OnDisconnected().
        The former is used to setup some of the internal state when
        connected to a peer: the peer address and read the stored AVDTP
        version from local configuration section.
        The latter is used to reset that state when disconnected
        from that peer.
      * Removed field tBTA_AV_SDP_RES.avdt_version because it is never
        set / used.
      * Removed duplicate re-definition of AVDT_VERSION inside avdt_api.h
      
      Bug: 78142165
      Test: Manual: connect/reconnect with Sennheiser MOMENTUM M2 AEBT headset
      Change-Id: Ib9dcd95dc9899fa81f3cd927f127e5cb0f21ef60
      37d7e9c1
    • android-build-prod (mdb)'s avatar
      Merge changes from topics "bt-hfp-fix-connection-collision-handling",... · bb433e24
      android-build-prod (mdb) authored
      Merge changes from topics "bt-hfp-fix-connection-collision-handling", "bt-rfcomm-improve-logging-and-readability", "bt-rfcomm-add-end-to-end-unit-tests"
      
      * changes:
        HFP: Fix connection colision handling
        RFCOMM: Improve logging and readability
        RFCOMM: Add unit tests for connection scenarios
      bb433e24
    • Jack He's avatar
      HFP: Fix connection colision handling · 29687e21
      Jack He authored
      * When there is a connection collison, and remote device is trying to
        connect to HFP server channel while we try to connect to remote's
        server channel as a client. If the remote device succssfully connect
        to us, we should drop our connection request to remote device and
        accept remote device's connection request. As result, we will observe
        1. Our connection request fails, this propagate up to Java layer and
        also clean up any states in these layers
        2. Remote connection request succeeds, this propagate up to Java layer
           as well as a new incoming connection
      * Added BTA_AG_COLLISION_EVT to formally handle AG collision in state
        machine
      * Modified bta_ag_resume_open to re-send BTA_AG_API_OPEN_EVT instead of
        modifying the state machine state directly. State machine states
        should only be modified by state machine handler
      * Ignore RFCOMM open event if PORT_CheckConnection fails
      * Added StackRfcommTest.TestConnectionCollision to reproduce this
        scenario with 100% certainty
      * Add static checks to HFP BTA state machine to make sure action and
        event indices match enum sizes
      
      Bug: 77224743
      Test: connect to multiple remote devices with HFP, MAP and PBAP
            StackRfcommTest.TestConnectionCollision
            btestplans/details/158641/3975
      Change-Id: Ib3652784b123abe195e7bd30421ef5f4345b1d4d
      29687e21
    • android-build-prod (mdb)'s avatar
    • Jack He's avatar
      RFCOMM: Improve logging and readability · f7873507
      Jack He authored
      Debug Improvements:
      * Add more error logging in the following methods:
       - rfc_mx_sm_state_idle for L2CA_ConnectReq failure
       - rfc_mx_sm_state_configure for RFC_EVENT_TIMEOUT
       - rfc_mx_conf_cnf for L2CAP configuration failures
       - RFCOMM_RemoveServer
      
      Readability Improvements:
      * Refactored logic in the following methods to be more readable
       - L2CA_ErtmConnectReq
       - RFCOMM_CreateConnection
       - port_open_continue
       - PORT_StartCnf
       - port_allocate_port
       - rfc_send_buf_uih
       - bta_ag_get_other_idle_scb
      * Rename RFCOMM_ParNegReq to RFCOMM_ParameterNegotiationRequest
      * Rename RFCOMM_ParNegRsp to RFCOMM_ParameterNegotiationResponse
      * Rename RFCOMM_PortNegReq to RFCOMM_PortParameterNegotiationRequest
      * Rename RFCOMM_PortNegRsp to RFCOMM_PortParameterNegotiationResponse
      
      Rename using IDE:
      * Rename tRFCOMM_CB.last_port to tRFCOMM_CB.last_port_index
      * Rename tPORT.inx to tPORT.handle as inx is ready the port handle
        indexed from 1
      * Rename tRFC_MCB.port_inx to tRFC_MCB.port_handles
      
      NPE Prevention:
      * Add error checking in rfc_save_lcid_mcb to avoid accessing beyond
        array boundary
      
      Bug: 77224743
      Test: StackRfcommTest, connect and disconnect to multiple devices
            with PBAP, MAP, PAN, PTS HFP tests
            testplans/details/158641/3975
      Change-Id: I8de89dfc0cee48fed6ad4e1d4a8cdcde2f960aab
      f7873507
    • Jack He's avatar
      RFCOMM: Add unit tests for connection scenarios · 3dfb5f8a
      Jack He authored
      Unit tests:
      * Add net_test_stack_rfcomm
      * Use a compiler trick to compile production RFCOMM code against L2CAP
        and BTM header, but fake L2CAP and BTM source code so that we can stub
        statically defined L2CAP and BTM code using mocks
      * Rename net_test_rfcomm to net_test_rfcomm_suite
      * Add mocked L2CAP and BTM layer to allow packet replay from L2CAP layer
        to RFCOMM layer in order to reproduce time dependent issues such as
        connection collision
      * Add a number of utility methods that generates RFCOMM packet bytes
        using supported parameters
      * Add unit test for above utility methods
      * Add suite of unit tests named StackRfcommTest, including:
       - SingleServerConnectionHelloWorld
       - MultiServerPortSameDeviceHelloWorld
       - SameServerPortMultiDeviceHelloWorld
       - SingleClientConnectionHelloWorld
       - SameClientPortMultiDeviceHelloWorld
      * These tests supply L2CAP packets and API calls to trigger RFCOMM
        connection setup in various scenarios
      * Added logging method to output debug log via VLOG(1) logging level and
        allow compile time configuration of these logs through a constant flag
      
      Bug: 77224743
      Test: ./test/run_unit_tests.sh net_test_stack_rfcomm
            testplans/details/158641/3975
      Change-Id: I9d59843603cd36394c3736670bcf3c39dea26674
      3dfb5f8a
  4. Apr 24, 2018
    • Chenyang Zhang's avatar
      HSP: Keep sending RING message · e66e4c73
      Chenyang Zhang authored
      Two PTS Test failed:
      - HSP/AG/IAC/BV-01-I
      - HSP/AG/ACR/BV-02-I
      
      Reason:
      AG didn't send the "RING" unsolicited result code to HS(PTS),
      then HS can't send the "AT+CKPD=200" command to received the call.
      After a while, the "FATAL ERROR (MTC): Call establishment timed out"
      triggered by PTS.
      
      Solution:
      Keep sending RING message for HSP.
      
      Bug: 77507028
      Change-Id: If1288a5f7b1b7da8ecba34ed90a85a0af8a91e9a
      e66e4c73
  5. Apr 23, 2018
    • Hansong Zhang's avatar
      Hearing Aid: Keep configuration after disconnect() · 2c12388a
      Hansong Zhang authored
      After disconnect(), the Hearing Aid service removes the device from the
      white list, but retains the configuration. The Java Hearing Aid service
      still knows the hiSyncId and capabilities, so it can connect() to
      multiple devices at the same time
      
      Bug: 69623109
      Test: manual and unit test for Java service
      Change-Id: Ic17b9be7e6a0577baecd520680abffbaf0a0dc47
      2c12388a
    • Logan Chien's avatar
      Rename <cutils/log.h> to <log/log.h> · 1ee98c25
      Logan Chien authored
      Bug: 78370064
      Test: lunch aosp_walleye-userdebug && cd system/bt && mma
      
      Change-Id: I43448e88c236b72d86206bd652075f35eccca6f6
      1ee98c25
  6. Apr 20, 2018
  7. Apr 19, 2018
  8. Apr 18, 2018
  9. Apr 17, 2018
    • Pavlin Radoslavov's avatar
      Fix a memory leak when disabling AVDTP · a70403d7
      Pavlin Radoslavov authored
      Added new function bta_av_free_scb() to explicitly
      free tBTA_AV_SCB struct.
      
      Bug: 78034873
      Test: Code compilation
      Change-Id: Ic738c64f61fd273bc2988fa98cb7cedebf1c4b76
      a70403d7
    • Ajay Panicker's avatar
      Fix check for device lookup in map · c05167a6
      Ajay Panicker authored
      Bug: 78134184
      Test: Run host native test net_test_avrcp
      Change-Id: I57dd0040aa0e97f623cff97a28dc98e196414559
      c05167a6
    • Jakub Pawlowski's avatar
      New GATT cache storage format · f719457e
      Jakub Pawlowski authored
      We will need characteristic definition handle, and handle of end of
      included service in the future. Store it properly.
      
      Bug: 67056747
      Test: GattCacheTest.nv_attr_to_binary_test
      Change-Id: I170e1a39d3c055efddd91639f756d74eb4ecc304
      f719457e
    • Pavlin Radoslavov's avatar
      Include only the Basic Capability for AVDTP GetCapabilities response · 94c2ceb9
      Pavlin Radoslavov authored
      AVDTP GetCapabilities request should return only the Basic
      Capabilities, as defined in the AVDTP 1.3 spec.
      Otherwise, returning a capability such as Delay Reporting would
      result in some remote devices droping the AVDTP connection
      
      Also:
       * Print SEP protocol service capabilities per Stream Control
         Block when dumping the state to a bugreport
       * Add extra log messages
      
      Bug: 77668253
      Test: Manual: connect with Momentum M2 Headset and examine the
            AVDTP GetCapabilities response.
      
      Change-Id: I34f2e8ff586115a38c3436b2b6300514f65346a9
      94c2ceb9
    • Pavlin Radoslavov's avatar
      Handle properly AVDTP SetConfig from the A2DP Sink device · e86055ad
      Pavlin Radoslavov authored
      If the remote device is proactive and sends AVDTP SetConfig after
      re-connection before the local device gets the chance to do it, the
      internal codec setup state might be inconsistent.
      
      * Fix the internal logic when the local device is Acceptor inside
        file bta_av_co.cc, and simplify some of the code.
      * Fix the handling of p_scb->sep_info_idx inside bta_av_save_caps()
        when receiving capabilities from the remote device.
      * Add new A2dpCodecConfig::setPeerCodecCapabilities() method that is
        implemented by each codec.
      
      Bug: 77525584
      Test: Manual - initiate connection by Momentum 2.0 Wireless Headset.
            Connect/disconnect/reconnect multiple headsets.
      
      Change-Id: I456df7c8a2fa0758c0908a4628c4dfae3259dbdb
      e86055ad
    • Jakub Pawlowski's avatar
      GATT: make last service end group handle equal to 0xFFFF · 82eb6b35
      Jakub Pawlowski authored
      ESR06 (errata 4065) added sentence:
      "The End Group Handle of the last service in a device can be 0xFFFF."
      It talks about last service, not last primary service. Right now,
      secondary service added after last primary service will result in in
      last primary service being corrupted - descriptor added to last
      characteristic, and some characteristics added.
      
      Bug: 78107486
      Change-Id: I6a146fce2c946cdff176ff79f147830e29d3b807
      82eb6b35
  10. Apr 16, 2018
  11. Apr 13, 2018
    • Ajay Panicker's avatar
      AVRCP: Inform upper layer if absolute volume isn't supported · 3a69b38e
      Ajay Panicker authored
      Before, the upper layers would be informed when a device connected that
      supported absolute volume. Now even devices that don't support absolute
      volume get reported.
      
      Bug: 33962015
      Test: Run host native test net-test-avrcp
      Change-Id: If083ccbb9ba9a170c5bca359e632585d826c6fa5
      3a69b38e
  12. Apr 12, 2018
  13. Apr 11, 2018
    • ilbeom.kim's avatar
      Don't start the authentication when peer device already started it · 47881c73
      ilbeom.kim authored
      If host gets link_key_request event from the controller, it means peer
      device started the authentication.
      In this case, host should not start the authentication because it will
      be caused the authentication collision by controller side.
      
      This sequence can be referred at BT 4.2 core specification document,
      p.1388, Figure 4.2.
      
      Bug: 74241491
      Test: Manual
            - Connect Android wear to Android phone
            - Turn off BT on Android wear
            - Turn on BT on Android wear
            - Observe the logcat whether connection time is within 30 seconds
            Android Wear Stability Test
      
      Change-Id: I138d45316ea75dd96444c36bde36ce15a64b669a
      47881c73
    • Stanley Tng's avatar
      Pass new LE CoC min_ce/max_ce parameters to native stack · f61988fe
      Stanley Tng authored
      Add new test connection event (ce) parameters, min_ce and max_ce, to
      the SL4A tests for LE Connection-oriented Channel (CoC) feature.
      
      Test: Run cmd: act.py -c $MY_SL4A_CONFIG -tc BleCoc2ConnTest
      Bug: 77528723
      
      Change-Id: Ifea040f0eb105f89539e6b74f5c2edc76147a065
      f61988fe
    • Joseph Pirozzo's avatar
      AVRCP controller browsing deep copy and get folder range · 42522c24
      Joseph Pirozzo authored
      AVRCP browsing was unstable on the sink side due to bytes
      being used instead of integers for get_folder_items_cmd
      and a lack of deep copy in the data buffers.  This patch
      allows both browse and vendor commands to work correctly.
      
      Bug: 72496280
      Test: stream music and browse at the same time.
      Change-Id: Id4d34101c918947450923b68e087e6851ce99130
      42522c24
    • Jack He's avatar
      Metrics: Add metrics item for profile usage · 7ebb85a9
      Jack He authored
      Item A: Add messages to log profile connections
      * Add ProfileUsageStats message in bluetooth.proto
      * Add BluetoothProfileId enum to represent each profile
      * Add num_times_connected item to log how many times a profile is
        connected
      
      Item B: Add messages to log headset profile connections for HSP and HFP
      * Add HeadsetProfileConnectionStats message in bluetooth.proto
      * Add HeadsetProfileType enum to represent each headset profile type
      * Add num_times_connected item to log how many times each headset
        profile is connected
      
      * Add unit tests in metrics_tests
      * Remove "clear" flag in various metrics dumping methods to make sure
        that we clean up metrics every time we dump
      
      Bug: 77476285
      Test: make, net_test_osi, BtFunhausMetricsTest,
            adb shell dumpsys bluetooth_manager --proto-bin
      Change-Id: Ib18948c50ddb98ab7472f7b51a9bb98d153071c7
      Merged-In: Ib18948c50ddb98ab7472f7b51a9bb98d153071c7
      7ebb85a9
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
Loading