From e55f5eff9b1e063893d4527cdd4ecf4897a587a4 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Wed, 7 Jun 2017 01:38:51 +0800 Subject: [PATCH] Add support of RTL8723BS Bluetooth Based on a patch provided by Li Xin . --- init.sh | 10 ++++++++++ init.x86.rc | 5 +++++ packages.mk | 1 + 3 files changed, 16 insertions(+) diff --git a/init.sh b/init.sh index e587424..e955a8f 100644 --- a/init.sh +++ b/init.sh @@ -77,6 +77,16 @@ function init_hal_bluetooth() chown bluetooth.bluetooth $BTUART_PORT start btattach fi + + # rtl8723bs bluetooth + if dmesg -t | grep -qE '8723bs.*BT'; then + TTYSTRING=`dmesg -t | grep -E 'tty.*MMIO' | awk '{print $2}' | head -1` + if [ -n "$TTYSTRING" ]; then + echo "RTL8723BS BT uses $TTYSTRING for Bluetooth." + ln -sf $TTYSTRING /dev/rtk_h5 + start rtk_hciattach + fi + fi } function init_hal_camera() diff --git a/init.x86.rc b/init.x86.rc index b799245..f093310 100644 --- a/init.x86.rc +++ b/init.x86.rc @@ -102,6 +102,11 @@ service btattach /system/bin/btattach disabled oneshot +service rtk_hciattach /vendor/bin/rtk_hciattach -n -s 115200 /dev/rtk_h5 rtk_h5 + class main + disabled + oneshot + service wacom-input /system/bin/wacom-input disabled oneshot diff --git a/packages.mk b/packages.mk index ef37a67..67dd9dc 100644 --- a/packages.mk +++ b/packages.mk @@ -48,6 +48,7 @@ PRODUCT_PACKAGES := \ make_ext4fs \ parted \ power.x86 \ + rtk_hciattach \ scp \ sensors.hsb \ sftp \ -- 2.11.0