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
| #!/bin/bash
|
| function test_bt() {
| bt_pcba_test
| sleep 5
| hciconfig hci0 up && hciconfig -a | grep UP
| if [ $? -ne 0 ];then
| echo "The bt test fail !!!"
| dmesg > /data/bt_dmesg.txt
| exit 11
| fi
| }
|
| function main() {
| while true; do
| test_bt
| sleep 1
| cnt=$((cnt + 1))
| echo "
| #################################################
| # The BT has been tuned on/off for $cnt times #
| #################################################
| "
| done
| }
|
| main
|
|