Modify the install path for license file
[platform/adaptation/bluetooth-firmware-bcm.git] / scripts / bt-dev-start.sh
index 42d4d3b..0d7aeaa 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 # Script for registering Broadcom UART BT device
 BT_UART_DEVICE=/dev/ttySAC3
@@ -31,12 +32,12 @@ then
 fi
 
 # Trun-on Bluetooth Chip
-rfkill unblock bluetooth
+/usr/sbin/rfkill unblock bluetooth
 
 echo "Check for Bluetooth device status"
-if (/usr/sbin/hciconfig | grep hci); then
+if (/usr/bin/hciconfig | grep hci); then
        echo "Bluetooth device is UP"
-       /usr/sbin/hciconfig hci0 up
+       /usr/bin/hciconfig hci0 up
 else
        echo "Bluetooth device is DOWN"
        echo "Registering Bluetooth device"
@@ -44,14 +45,14 @@ else
        $BCM_TOOL $BT_UART_DEVICE -FILE=/usr/etc/bluetooth/$BCM_FIRMWARE -BAUD=$UART_SPEED -ADDR=/opt/etc/.bd_addr -SETSCO=0,0,0,0,0,0,0,3,3,0 -LP > /dev/null 2>&1
 
        # Attaching Broadcom device
-       if (/usr/sbin/hciattach $BT_UART_DEVICE -s $UART_SPEED $BT_CHIP_TYPE $UART_SPEED flow); then
+       if (/usr/bin/hciattach $BT_UART_DEVICE -s $UART_SPEED $BT_CHIP_TYPE $UART_SPEED flow); then
                sleep 0.1
-               /usr/sbin/hciconfig hci0 up
-               /usr/sbin/hciconfig hci0 name $BT_PLATFORM_DEFAULT_HCI_NAME
-               /usr/sbin/hciconfig hci0 sspmode 1
+               /usr/bin/hciconfig hci0 up
+               /usr/bin/hciconfig hci0 name $BT_PLATFORM_DEFAULT_HCI_NAME
+               /usr/bin/hciconfig hci0 sspmode 1
                echo "HCIATTACH success"
        else
                echo "HCIATTACH failed"
-               rfkill block bluetooth
+               /usr/sbin/rfkill block bluetooth
        fi
 fi