From 47f658c0d11826952949cfa1e19b7a1dbf52b1c7 Mon Sep 17 00:00:00 2001 From: Wu Zheng Date: Mon, 23 Sep 2013 14:29:27 +0800 Subject: Enable BT start and BT end to match bcm43341b0 BT chip --- scripts/bt-dev-end.sh | 4 +++- scripts/bt-dev-start.sh | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/bt-dev-end.sh b/scripts/bt-dev-end.sh index b399288..3c14671 100755 --- a/scripts/bt-dev-end.sh +++ b/scripts/bt-dev-end.sh @@ -7,5 +7,7 @@ # Device down /usr/sbin/hciconfig hci0 down +killall brcm_patchram_plus + # Turn off Bluetooth Chip -rfkill block bluetooth +echo 0 > /sys/class/rfkill/rfkill0/state diff --git a/scripts/bt-dev-start.sh b/scripts/bt-dev-start.sh index 9493217..872bdb6 100755 --- a/scripts/bt-dev-start.sh +++ b/scripts/bt-dev-start.sh @@ -3,13 +3,21 @@ # # Script for registering Broadcom UART BT device # -if !(/sbin/lsmod | grep btwilink); then - modprobe btwilink - /bin/uim & +if !(/sbin/lsmod | grep bcm_bt_lpm); then + /sbin/modprobe bcm_bt_lpm fi -# Trun-on Bluetooth Chip -rfkill unblock bluetooth +echo 1 > /sys/class/rfkill/rfkill0/state + +if !(/bin/ps aux | grep brcm_patchram_plus | grep -v grep) then + +/bin/brcm_patchram_plus --enable_hci --patchram \ + /lib/firmware/BCM43341B0_0008_ZTE.hcd --baudrate 3000000 \ + /dev/ttyMFD0 --no2bytes & + +/bin/sleep 2 + +fi echo "Check for Bluetooth device status" if (/usr/sbin/hciconfig | grep hci); then -- cgit v1.2.3