-
Notifications
You must be signed in to change notification settings - Fork 0
/
hfp.sh
38 lines (31 loc) · 788 Bytes
/
hfp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
check_bsa_server() {
while true;do
pid=`pidof bsa_server`
if [ "$pid" = "" ] ;then
echo "wait for bsa_server to start."
sleep 1
fi
echo "bsa_server is open."
break
done
}
case "$1" in
start)
check_bsa_server
cd /data/bsa/config
echo "start broadcom bsa bluetooth app_hs"
app_hs &
echo "|----- bluetooth hfp is open ------|"
;;
stop)
echo "Stopping broadcom bsa bluetooth app"
killall app_hs
check_not_exist.sh app_hs
echo "|-----bluetooth hfp is close-----|"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit $?