commit | dc04c5c3fbcc4d19d8551bd26bcf725c0679b05d | [log] [tgz] |
---|---|---|
author | slki.shin <slki.shin@samsung.com> | Wed Nov 13 16:00:03 2019 +0900 |
committer | slki.shin <slki.shin@samsung.com> | Fri Nov 15 09:52:53 2019 +0900 |
tree | 3438ef6e6ccb4443af7cfadb3ba009246846d33a | |
parent | 8466ef4d9c80b76779763d10eedcb992d63b8dbe [diff] |
Skip SDP search with an empty service class id This fixes pairing failure with a device which has an empty service class id along with RFCOMM protocol descriptor attribute as a service search attribute response. This caused SDP_FindServiceUUIDInDb() and SDP_FindProtocolListElemInRec(UUID_PROTOCOL_RFCOMM) make true which in turn scn_found flag is set to ture. RFCOMM SCN is strangely handled with current AOSP implementation, means SCN value is passed in disc_res.result field. Typically disc_res.result should be BTA_SUCCESS or BTA_FAILURE but in this case result value is larger than zero. As a result, btif_dm_search_services_evt() treats this as a SDP failure and sends an empty UUID to the Android frameworks. To avoid this problem, SDP_FindServiceUUIDInDb() will not be excuted with an empty UUID. This issue is seen with JETTOUR X70 carkit: Attribute List Attribute: Service Record Handle Service Record Handle: 0x 00 01 00 04 Attribute: Service Class ID List UUID: Unknown UUID Attribute: Protocol Descriptor List UUID: L2CAP UUID: RFCOMM Channel Number: 16 Attribute: Browse Group List UUID: Public Browse Group Attribute: Service Name String: Serial Port Change-Id: Ib91a0e20621664eb3778c1716d5a40cc92edf8c9 Signed-off-by: slki.shin <slki.shin@samsung.com>
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/system/bt
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 system/bt is checked out under AOSP, then create symbolic links instead of downloading sources
cd system/bt 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 system/bt gn gen --ide=eclipse out/Default
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML location under system/bt/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"