- May 25, 2017
-
-
Jack He authored
* Add a command line tool for MCAP related tests * This tool can access the Bluetooth stack via a command line program * Type "help" to obtain a list of available console commands in this Bluetooth * Bluetooth must be disabled when this tool is running Bug: 37867299 Test: make, PTS MCAP test Change-Id: I106e6625ee8a29b7fdad88cdfeb99419054ef771
-
- May 24, 2017
-
-
Jakub Pawlowski authored
When two devices are bonded, even if the device is supposed to act just as a GATT Server, service discovery is performed. Doing "read by type" should not trigger connection timeout, or disconnection, as the server should wait for the client to finish connection. Please note that it does not GATT Client behaviour, as they manage the connection timeout through L2CA_SendFixedChnlData called on each data packet. Bug: 34951749 Test: manual Change-Id: If53cf63dc204238a60839497992c870b1b39aa60
-
- May 23, 2017
-
-
Jack He authored
* PTS tests requires MCAP APIs to be called at protocol level * This CL creates a test interface to enable the above functionality Bug: 37867299 Test: make, no user visible effect Change-Id: I15cc6cc613ce8f7c57564296e45077ab877c269b
-
Jack He authored
* Fix error response message for clock sync opcodes * Fix error response message for CREATE_MDL opcode * Fix logging in the MCAP stack Bug: 37867299 Test: make, PTS MCAP test Change-Id: I7a37ac04806bca20d732357f00b4761577b4be19
-
- May 22, 2017
-
-
Treehugger Robot authored
-
Ajay Panicker authored
Bug: 37905488 Test: Code still compiles Change-Id: I479fc82a15f977b7e3d50b07302241909efc8856
-
Ajay Panicker authored
Bug: 37803501 Test: Code still compiles Change-Id: I9326e58aff0d80e441cb92c41e0e4a7d70e32b1b
-
- May 18, 2017
-
-
Treehugger Robot authored
-
- May 17, 2017
-
-
Pavlin Radoslavov authored
Bug: 38330724 Test: Manual: enable/disable Bluetooth Change-Id: Iaece4cd608c67b28b436ded9fcc51c0bf28f4098
-
Jakub Pawlowski authored
Make sure that all access happens on jni thread Bug: 38298938 Test: Code compilation Change-Id: I38246626d2c6390586b314b27889dd9ba905f406
-
Marie Janssen authored
The volume is erratic on the speakers when the speaker is reporting linear increase, with decreases for higher volumes. Test: check that absolute volume not used for Kinivo Speakers Bug: 37872586 Change-Id: Ic5f409e8631bece66a75372b916faa9c104e2024
-
- May 16, 2017
-
-
Pavlin Radoslavov authored
Bug: 38351937 Test: A2DP streaming to LDAC headset and switching MONO/STEREO in Settings Change-Id: I20c5069fd5d104b9ebe767ae2728af7d7b2ae1d9
-
Jakub Pawlowski authored
Bug: 38123054 Test: manual Change-Id: Ic97a964ca2a25a84c6abcf41acb0f3fb583488a2
-
- May 15, 2017
-
-
Jakub Pawlowski authored
When SDP_MAX_RECORDS were reached in SDP db, which usually happen by registering big number of GATT services, unregistration of a service was causing a crash. This was because we moved from memory after the array into last element. Bug: 38265174 Test: manual Change-Id: I7b0235213fb07c85dcc1245f1c840b41267521d5
-
- May 12, 2017
-
-
Emil Lenngren authored
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
-
Pavlin Radoslavov authored
If the A2DP Sink device sends "Set Configuration" with its preferred SBC configuration, try using that configuration when selecting the codec parameters instead of the A2DP Sink SBC capability. Test: A2DP streaming, PTS AVDTP Tests: TC_ACP_SRC_SIG_SMG_BV_18_C, TC_ACP_SRC_SIG_SMG_BV_20_C, TC_ACP_SRC_SIG_SMG_BV_22_C PTS A2DP Tests: A2DP/SRC/SET/BV-04-I, A2DP/SRC/SET/BV-06-I Bug: 37723311 Bug: 35664023 Change-Id: I48e2aa664b899c1cda5df4d1f86f9cfa3a9a67f6
-
Pavlin Radoslavov authored
Add a mechanism to set the RTP Header Marker bit per codec. Currently, the Marker bit is set only for AAC. Test: A2DP streaming, PTS AVDTP tests: TC_ACP_SRC_TRA_BTR_BV_01_C, TC_INT_SRC_SIG_SMG_BV_17_C, TC_INT_SRC_TRA_BTR_BV_01_C Bug: 37723283 Change-Id: I9b8e77d44c750746c169df9628d5539ad2406b92
-
Jakub Pawlowski authored
- 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
-
- May 11, 2017
-
-
Joseph Pirozzo authored
Update include files to include bt_target.h as it has the necessary defines to correctly allow bdroid_buildcfg.h to enable and disable dumping to output_sample.pcm. Bug: 38180732 Test: Stream Bluetooth audio to device and observe that output_sample.pcm does not get written or appended to. Change-Id: Ia7926f93a47489686d315e3c9abd1618cb8adda3
-
Treehugger Robot authored
-
Treehugger Robot authored
* changes: eSCO: Format changes to original vendor patch (4/5) eSCO: Additional fix to get eSCO working for HFP and HSP (3/5) eSCO: Remove BTM_WBS_INCLUDED from the stack (2/5) eSCO: BT 4.1 Enhanced SCO command (1/5)
-
Andre Eisenbach authored
-
Pavlin Radoslavov authored
The A2DP_GetTrackBitsPerSample() API was replaced in the past by A2dpCodecConfig::getAudioBitsPerSample() . * Removed A2DP_GetTrackBitsPerSample() and related codec-specific APIs: - A2DP_GetTrackBitsPerSampleSbc - A2DP_GetTrackBitsPerSampleAac - A2DP_GetTrackBitsPerSampleAptx - A2DP_GetTrackBitsPerSampleAptxHd - A2DP_GetTrackBitsPerSampleLdac NOTE: The removed A2DP_GetTrackBitsPerSampleLdac implementation had a bug: a2dp_ldac_caps.bits_per_sample -> ldac_cie.bits_per_sample This bug itself was uncovered when switching to clang-3960126 - A2DP_VendorGetTrackBitsPerSample() * Replaced few leftover usages of A2DP_GetTrackBitsPerSample() A2dpCodecConfig::getAudioBitsPerSample() * Updated the unit tests Test: Code compilation, unit tests, A2DP streaming Bug: 37752547 Change-Id: I7feeda0f32922b8ef888b157673e3e2ade98b179
-
Jack He authored
* Format changes to original vendor patch * Re-order part of SCO creation code to improve readability * Make log more concise and usefull Bug: 19540029 Test: make, HFP PTS test, testplans/86884, testplans/87103 Change-Id: Ie0199519afb30f56568c04fef728fce44a172063
-
Jack He authored
* Removed vendor specific call after codec negotiation and before eSCO command is sent to Bluetooth chip * Removed vendor specific call after a SCO connection is requested by the peer * Removed vendor specific save audio state methods Bug: 19540029 Test: make, HFP PTS test, testplans/86884, testplans/87103 Change-Id: I899405a8eaa2f38ee0de04949c5288f9eefa74df
-
Myles Watson authored
All of our platforms support WBS. Bug: 19540029 Test: make, HFP PTS test, testplans/86884, testplans/87103 Change-Id: I384d49f73935ebb35b17132e71c85174797c435e
-
- May 10, 2017
-
-
Mudumba Ananth authored
Added support for BT 4.1 enhanced SCO feature on the stack. This feature allows the stack to create a SCO connection with remote device by using Hci_Enhanced_Setup_Synchronous_Connection command after checking the controller (4.1) support for enhanced SCO command. Added the command parameters to use the command in both wide band speech(WBS) and narrow band speech(NBS) scenarios. Number of Broadcom vendor specific commands(VSCs)that are needed to be sent to Broadcom controllers along with this command have also been updated accordingly NOTE: This change would also need a firmware patch for the feature to work on Broadcom contollers which will be delivered to Google in a separate change set. Bug: 19540029 Test: make, HFP PTS test, testplans/86884, testplans/87103 Change-Id: I1014d81be5cbe91078a4484dd072ac3957bfdfe4
-
Marie Janssen authored
If there are no attributes available, it's possible to return zero attributes from a GetItemAttributes request. This is triggered by some carkits who are unhappy when they only get titles back (the only required item) and ask for the rest of the attributes (which we don't have). Test: connect to honda carkit and get snoop logs to confirm Bug: 36055995 Bug: 35956792 Change-Id: I5a31e206565d212e456111d8c6b542c7a1569e5a
-
Jakub Pawlowski authored
Characteristic and descriptor can't use UUID equal to GATT Attribute Types. Using such UUID would result in invalid GATT database, and crashes during service discovery. Test: manual Bug: 38134693 Change-Id: Ide2c21109f885cbc79287452b1dabd3f532de385
-
Hemant Gupta authored
Provides an interface for application to send Set Idle and Get Idle commands to remote HID Device. Support for these two commands was missing from existing code, so existing code design is reused to add support for these two commands. Without this support following mandatory PTS test cases for HID 1.0 cannot be passed, TC_HOS_HID_BV_05/06. Test: Executed PTS tests TC_HOS_HID_BV_05/06 and confirmed if they can pass Bug: 34344715 Change-Id: I14bc2dc349354fd87ef8aba25357514398532e87
-
- May 09, 2017
-
-
Jack He authored
* Generic linux does not have property_get_int32. Instead, osi_property_get_int32() is created to handle OS_GENERIC cases * Some linux header have sigevent.sigev_notify_attributes typed as (pthread_attr_t *) whereas others typed it as (void *), as any pointer can be implicitly casted to (void *), the current casting to (void *) is unncessary and will break build on systems using (pthread_attr_t *) Test: make, unit test, no user visible effect Change-Id: I24b33da453dc9d40656168a3bcd900d9c99219ce
-
- May 08, 2017
-
-
Treehugger Robot authored
-
Andre Eisenbach authored
-
Ajay Panicker authored
Swapping out the queues with base::MessageLoop allows for an easier refactor of alarms as we can just replace them with an instance of base::Timer. Also refactored out the data_dispatcher as most of the code wasn't being used. Bug: 37245162 Test: Bluetooth sanity test and listening to music added net_test_btu_message_loop Change-Id: I73c359f07a225733dc89f51422a6a24ce807c593
-
Jaganath Kanakkassery authored
This is for PTS test TP/LE/CFC/BV-20-C. The scenario is there is already one COC between DUT and PTS. Then PTS tries to establish one more COC with same cid which should be rejected. Change-Id: I094a4058ac0e7bb9d7344e66d9feafee17bc3d53 Signed-off-by:
Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
-
ravishankar srivatsa authored
SM/MAS/SCJW/BI-01-C [Just Works, IUT Initiator, Secure Connections -Pairing Failed For Lower tester to handle step 15. Lower Tester responds with a Pairing Failed command in phase 2 with reason code 0x0C (Numeric Comparison Failed). Bug: 37707831 Change-Id: Ia7103330d1d1ecb06e39502c2a0976585b203ba5 Signed-off-by:
Ravishankar Srivatsa <Ravishankar.Srivatsa@intel.com> Test: manual
-
- May 06, 2017
-
-
Martin Brabham authored
After we reach 7 ACL connections we have 7 peer device records. Once we reach this then we lose a connection and shrink the list we copy garbage into the last peer device record. This can cause the flag remove_dev_pending to be set to something > 0 thus true which causes the stack to remove the device and its bonding information on the next acl change event. ACL Connections can happen from any connection (pairing, SDP, etc...) Bug: 36598959 Test: Manual Change-Id: Ifbaa4098edba442274ffde183960ef53169988e7
-
- May 05, 2017
-
-
Ajay Panicker authored
Before this patch, if there was a message on the command queue and there were no command credits, the thread reactor would spin trying to process the message on the command queue and would continue until a credit was received. This led to a bug where upon switching users, hci_thread would spin and try to use 100% of the CPU. This is fixed by moving over to a message loop and queue system. The message loop processes all the messages. If there aren't enough command credits, command messages are deferred to the command queue and popped off whenever more credits are aquired. The deferred queue has priority to credits over recently posted messages. Bug: 37733903 Test: Swap users with the real time scheduling patch applied, and general Bluetooth usage. TestTracker: 86249 Change-Id: Ib775e47f6d4810d3d7d8af5b3ba84adc4ada3da5 (cherry picked from commit 417ffed2)
-
Jakub Pawlowski authored
* merge BTM_CheckAdvData and BTM_CheckEirData into GetFieldByType * check wether AD data is properly formatted when the packet is received. Some controllers were returning malformed data that resulted in stack crashes for BT5 packets. * add tests to verify the helpers work as expected Test: added net_test_stack_ad_parser Bug: 37671082 Change-Id: I49e43d7cf7d0a8ace1ee45d9b14b2b8440096b05
-
Jakub Pawlowski authored
BT spec limits the length of device name to 248 bytes. With the new LE advertising packets, that can go up to 1650 bytes long, we must check the length of device name received. Bug: 37671082 Test: manual Change-Id: Iad309d638003c2391014c9764605d84ed5717cb1
-