2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
5 HCI_CONFIG=/usr/bin/hciconfig
7 echo "Check for Bluetooth device status"
8 if (${HCI_CONFIG} | ${GREP} hci); then
9 echo "Up the bluetooth device"
14 /usr/sbin/rfkill unblock 0
15 /usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000 &
20 for (( i=1; i<=$TIMEOUT; i++))
22 if [ $i -eq $TIMEOUT ]
24 echo "time expired happen $i"
28 echo "Check for Bluetooth device status"
29 if (${HCI_CONFIG} | ${GREP} hci); then
30 echo "Up the bluetooth device"
33 if (${HCI_CONFIG} | ${GREP} UP); then
34 echo "Bluetooth device is made"