summaryrefslogtreecommitdiff
path: root/recipes-kernel/rs9113/files/rf/bt2
blob: feb77f4ca5a75f664f3038b5bd3ecc9817a53af0 (plain)
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
38
#!/bin/bash
echo 'Bluetooth transmit'
echo 'Optional 1st parameter is channel, 2nd is data rate, 2 or 3Mbps'
echo '3rd parameter is hopping type:  0 (no hopping) 1 (fixed hopping) 2 (random hopping)'
echo '4th parameter is receive channel required for fixed hopping'
btchan=8
if [[ -n $1 ]] ; then
    btchan=$1
fi
dr=3
if [[ -n $2 ]] ; then
    dr=$2
fi
ht=0
if [[ -n $3 ]] ; then
    ht=$3
fi
rcvchan=9
if [[ -n $4 ]] ; then
    rcvchan=$4
fi
((burst=1))
if ((ht != 0)) ; then
   ((burst=0))
fi
export DRIVER_MODE=2
export COEX_MODE=4
/etc/init.d/rs9113 stop >/dev/null 2>&1
echo 1 >/sys/devices/platform/mts-io/wifi-bt-reset
echo 0 >/sys/devices/platform/mts-io/wifi-bt-reset
sleep 1
echo 1 >/sys/devices/platform/mts-io/wifi-bt-reset
sleep 2
cd /opt/rs9113
bash onebox_insert.sh
sleep 2
echo "Using channel WiFi BT channel $btchan BT Data Rate $dr"
echo "Using receive channel $rcvchan"