Tool/software: Linux
Hi,
I want to set the WL8 to BLE peripheral mode with Bluedroid stack but I get errors when run ble peripheral app.
The error like below :
01-21 09:16:31.259 1155 1360 E bt_btm : wrong length for btm_ble_multi_adv_vsc_cmpl_cback
Does WL8 support peripheral mode on Android 6?
Does anyone have any ideas for this?
The attached files are patch file for peripheral mode supported with bluedroid stack and android logcat file.
Thanks.
diff --git a/base/core/java/android/bluetooth/BluetoothAdapter.java b/base/core/java/android/bluetooth/BluetoothAdapter.java index daeef39..4573bf1 100755 --- a/base/core/java/android/bluetooth/BluetoothAdapter.java +++ b/base/core/java/android/bluetooth/BluetoothAdapter.java @@ -570,7 +570,7 @@ public final class BluetoothAdapter { */ public BluetoothLeAdvertiser getBluetoothLeAdvertiser() { if (!getLeAccess()) return null; - if (!isMultipleAdvertisementSupported() && !isPeripheralModeSupported()) { + if (!isMultipleAdvertisementSupported() /*&& !isPeripheralModeSupported()*/) { Log.e(TAG, "Bluetooth LE advertising not supported"); return null; } jason@jason-ThinkPad-X200:~/TG/rk3288-TG/frameworks$ git show 92a86bb26659c78432541d2a6a1831b7a96b403f commit 92a86bb26659c78432541d2a6a1831b7a96b403f Author: Jason Wang <jason@aaeon.com.tw> Date: Tue Apr 24 10:45:46 2018 +0800 Enable BLE peripheral mode diff --git a/base/core/res/res/values/config.xml b/base/core/res/res/values/config.xml index 1778fbb..66a480a 100755 --- a/base/core/res/res/values/config.xml +++ b/base/core/res/res/values/config.xml @@ -1207,7 +1207,7 @@ <bool name="config_bluetooth_address_validation">false</bool> <!-- Boolean indicating if current platform supports BLE peripheral mode --> - <bool name="config_bluetooth_le_peripheral_mode_supported">false</bool> + <bool name="config_bluetooth_le_peripheral_mode_supported">true</bool> <!-- Max number of scan filters supported by blutooth controller. 0 if the device does not support hardware scan filters-->
diff --git a/include/bt_target.h b/include/bt_target.h index ae2c897..50ab658 100755 --- a/include/bt_target.h +++ b/include/bt_target.h @@ -132,6 +132,10 @@ #define BTA_AV_RET_TOUT 15 #endif +#ifndef PORCHE_PAIRING_CONFLICT +#define PORCHE_PAIRING_CONFLICT TRUE +#endif + #ifndef BTA_AV_CO_CP_SCMS_T #define BTA_AV_CO_CP_SCMS_T FALSE #endif @@ -671,14 +675,8 @@ /* Minimum number of ACL credit for high priority link */ #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA -/*BOARD_HAVE_BLUETOOTH_RTK_COEX begin*/ -#ifdef BLUETOOTH_RTK_COEX -#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 8 -#else #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5 #endif -/*BOARD_HAVE_BLUETOOTH_RTK_COEX end*/ -#endif /* used for monitoring HCI ACL credit management */ #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG @@ -796,7 +794,7 @@ * feature discovery, multi-adv etc. */ #ifndef BLE_VND_INCLUDED -#define BLE_VND_INCLUDED FALSE +#define BLE_VND_INCLUDED TRUE #endif #ifndef BTM_BLE_ADV_TX_POWER @@ -1657,12 +1655,8 @@ The maximum number of payload octets that the local device can receive in a sing ******************************************************************************/ #ifndef HCILP_INCLUDED -#ifdef BLUETOOTH_RTK -#define HCILP_INCLUDED FALSE -#else #define HCILP_INCLUDED TRUE #endif -#endif /****************************************************************************** **
Nathan Kuo