commit | 4a73d963a0135302c52db832f1c1bf6c7157f1db | [log] [tgz] |
---|---|---|
author | Ray <kuoray@google.com> | Thu Jan 03 21:19:16 2019 +0800 |
committer | Ray Kuo <kuoray@google.com> | Fri Jan 25 10:41:33 2019 +0000 |
tree | 37027f3a4b75a87548f41b1e99840a3c49c9ece6 | |
parent | d2f594636a3c237894f0bb7f8204fa723ca7016f [diff] |
BQR: Add Bluetooth Quality Report feature Bluetooth disconnects, voice and audio quality issues are sometimes hard to debug without an OTA (Over The Air) log. For debugging this kind of issue we would need to identify it belongs to the host, Bluetooth controller/firmware, environment or the remote Bluetooth device. This feature would route the link and firmware/controller stats (ex: TX power level, RSSI, Unused AFH channel count...) to the host when quality events happen. Quality Monitoring Mode: The controller will periodically send Bluetooth Quality VSE sub-event to the host. Approaching LSTO: Once no packets are received from the connected Bluetooth device for a duration longer than the half of LSTO (Link Supervision Timeout) value, the controller will report Approaching LSTO event to the host. A2DP Audio Choppy: When audio stall, the controller will report A2DP Audio Choppy event to the host. (e)SCO Voice Choppy: The controller will report (e)SCO Voice Choppy event to the host if the voice quality might be bad. Bug: 111384296 Test: - Verified that all functionalites with the Bluetooth controller / firmware which supports Bluetooth Quality Report VSC (OpCode: 0xFD5E) and Bluetooth Quality Report (Sub-event code: 0x58) of VSE. - Verified that this feature could work on both the A2DP HW offload and non-offload modes. Change-Id: I3fd3000bace7606855cac3b9b87134499c0ca891
Just build AOSP - Fluoride is there by default.
Instructions for Ubuntu, tested on 14.04 with Clang 3.5.0 and 16.10 with Clang 3.8.0
mkdir ~/fluoride cd ~/fluoride git clone https://android.googlesource.com/platform/packages/modules/Bluetooth/system
Install dependencies (require sudo access):
cd ~/fluoride/bt build/install_deps.sh
Then fetch third party dependencies:
cd ~/fluoride/bt mkdir third_party cd third_party git clone https://github.com/google/googletest.git git clone https://android.googlesource.com/platform/external/aac git clone https://android.googlesource.com/platform/external/libchrome git clone https://android.googlesource.com/platform/external/libldac git clone https://android.googlesource.com/platform/external/modp_b64 git clone https://android.googlesource.com/platform/external/tinyxml2
And third party dependencies of third party dependencies:
cd fluoride/bt/third_party/libchrome/base/third_party mkdir valgrind cd valgrind curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
NOTE: If packages/modules/Bluetooth/system is checked out under AOSP, then create symbolic links instead of downloading sources
cd packages/modules/Bluetooth/system mkdir third_party cd third_party ln -s ../../../external/aac aac ln -s ../../../external/libchrome libchrome ln -s ../../../external/libldac libldac ln -s ../../../external/modp_b64 modp_b64 ln -s ../../../external/tinyxml2 tinyxml2 ln -s ../../../external/googletest googletest
cd ~/fluoride/bt gn gen out/Default
cd ~/fluoride/bt ninja -C out/Default all
This will build all targets (the shared library, executables, tests, etc) and put them in out/Default. To build an individual target, replace "all" with the target of your choice, e.g. ninja -C out/Default net_test_osi
.
cd ~/fluoride/bt/out/Default LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
Follows the Chromium project Eclipse Setup Instructions until "Optional: Building inside Eclipse" section (don't do that section, we will set it up differently)
Generate Eclipse settings:
cd packages/modules/Bluetooth/system gn gen --ide=eclipse out/Default
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML location under packages/modules/Bluetooth/system/out/Default
Right click on the project. Go to Preferences->C/C++ Build->Builder Settings. Uncheck "Use default build command", but instead using "ninja -C out/Default"
Goto Behaviour tab, change clean command to "-t clean"