xref: /OK3568_Linux_fs/debian/overlay-debug/rockchip-test/wifibt/bt_onoff.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/bash
2
3function test_bt() {
4	bt_pcba_test
5	sleep 5
6	hciconfig hci0 up && hciconfig -a | grep UP
7	if [ $? -ne 0 ];then
8		echo "The bt test fail !!!"
9		dmesg > /data/bt_dmesg.txt
10		exit 11
11	fi
12}
13
14function main() {
15	while true; do
16		test_bt
17		sleep 1
18		cnt=$((cnt + 1))
19	echo "
20	#################################################
21	# The BT has been tuned on/off for $cnt times   #
22	#################################################
23	"
24	done
25}
26
27main
28