From 521e3494677c7e624a31728722a35510ebd633bc Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Thu, 16 Feb 2017 14:45:35 +0900 Subject: [PATCH] Modify bt-stack-up.sh script for TM2 device Change-Id: I39378853c5135c66492ad9235e06ecdd9b24bf1c Signed-off-by: DoHyun Pyun --- scripts/wearable/bt-stack-up.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/wearable/bt-stack-up.sh b/scripts/wearable/bt-stack-up.sh index ee56a9d..040cb81 100755 --- a/scripts/wearable/bt-stack-up.sh +++ b/scripts/wearable/bt-stack-up.sh @@ -6,8 +6,26 @@ HCIDUMP_FILENAME="bt_hcidump.log" HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}" LOGDUMP_DIR="/opt/etc/dump.d/module.d" LOGDUMP_PATH="${LOGDUMP_DIR}/bt-hci-logdump.sh" +RFKILL=/usr/sbin/rfkill +GREP=/usr/bin/grep +HFP_HF=hfp_hf +echo "Check for bcm43012 device - TM2" +if (${RFKILL} list | ${GREP} bcm43012); then + echo "Solis TM2 device" + HFP_AG=hfp_ag +fi + +if [ $HFP_HF ] +then /usr/bin/bluetooth-hf-agent & +fi + +if [ $HFP_AG ] +then +/usr/bin/bluetooth-ag-agent & +fi + # # Script for executing Bluetooth stack # -- 2.7.4