Fix the service file overwriting issue on the common profile
[platform/core/connectivity/bluetooth-tools.git] / scripts / bt-edutm-mode-on.sh
1 #!/bin/sh
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3
4 #
5 # Script for turning on EDUTM mode
6 #
7
8 if /usr/bin/hciconfig | /bin/grep hci; then
9         echo EDUTM already done, exit
10 else
11         echo Start EDUTM
12         /usr/etc/bluetooth/bt-edutm-dev-up.sh
13 fi
14
15 if [ -e /usr/etc/bluetooth/TIInit_* ]
16 then
17         echo "Reset device"
18         /usr/bin/hcitool cmd 0x3 0xFD0C
19 fi
20
21 echo "Configure BT device"
22 /usr/bin/hcitool cmd 0x3 0x0005 0x02 0x00 0x02
23
24 echo "Send BT edutm command"
25 /usr/bin/hcitool cmd 0x06 0x0003
26
27 echo "BT edutm done"