Modify bt-stack-up.sh script for TM2 device 16/115016/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 16 Feb 2017 05:45:35 +0000 (14:45 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 16 Feb 2017 06:05:39 +0000 (15:05 +0900)
Change-Id: I39378853c5135c66492ad9235e06ecdd9b24bf1c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
scripts/wearable/bt-stack-up.sh

index ee56a9d..040cb81 100755 (executable)
@@ -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
 #