Enable BT start and BT end to match bcm43341b0 BT chip
authorWu Zheng <wu.zheng@intel.com>
Mon, 23 Sep 2013 06:29:27 +0000 (14:29 +0800)
committerWu Zheng <wu.zheng@intel.com>
Mon, 23 Sep 2013 06:29:27 +0000 (14:29 +0800)
scripts/bt-dev-end.sh
scripts/bt-dev-start.sh

index b399288..3c14671 100755 (executable)
@@ -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
index 9493217..872bdb6 100755 (executable)
@@ -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