summaryrefslogtreecommitdiff
path: root/recipes-kernel/rs9113/files/rf/ble2
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/rs9113/files/rf/ble2')
-rwxr-xr-xrecipes-kernel/rs9113/files/rf/ble238
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes-kernel/rs9113/files/rf/ble2 b/recipes-kernel/rs9113/files/rf/ble2
new file mode 100755
index 0000000..3332223
--- /dev/null
+++ b/recipes-kernel/rs9113/files/rf/ble2
@@ -0,0 +1,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=8
+/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"