summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2012-09-18 13:21:38 -0500
committerJesse Gilles <jgilles@multitech.com>2012-09-18 13:36:56 -0500
commit165908091aaa5b6f08a14f1bf67bf50e62e36ed4 (patch)
treed258beb6d6931db58179d0dc6ccd3863ce6ffc42
parent65f880265be2f9e3ee56440e26f920e1d89dc7c6 (diff)
bluez4: mt100eocg-pcie-dk: update bluetooth.init script, add stop/restart
-rw-r--r--multitech/recipes/bluez/bluez4.inc2
-rwxr-xr-xmultitech/recipes/bluez/files/bluetooth.init30
2 files changed, 28 insertions, 4 deletions
diff --git a/multitech/recipes/bluez/bluez4.inc b/multitech/recipes/bluez/bluez4.inc
index 918ef9c..60e0242 100644
--- a/multitech/recipes/bluez/bluez4.inc
+++ b/multitech/recipes/bluez/bluez4.inc
@@ -5,7 +5,7 @@ PRIORITY = "optional"
LICENSE = "GPLv2/LGPLv2.1"
#DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib"
DEPENDS = "virtual/libusb0 dbus-glib"
-INC_PR = "r9"
+INC_PR = "r10"
FILESPATHBASE .= ":${OETREE}/openembedded/recipes/bluez"
diff --git a/multitech/recipes/bluez/files/bluetooth.init b/multitech/recipes/bluez/files/bluetooth.init
index 41312e2..58318c3 100755
--- a/multitech/recipes/bluez/files/bluetooth.init
+++ b/multitech/recipes/bluez/files/bluetooth.init
@@ -1,11 +1,35 @@
-#!/bin/sh
+#!/bin/bash
-case "$1" in
- start)
+bt_start()
+{
echo "Enabling bluetooth..."
+ mts-io-sysfs store bt-enabled 0
+ usleep 200000
mts-io-sysfs store bt-enabled 1
sleep 1
echo "Setting up bluetooth device..."
hciattach /dev/bt texas
+}
+
+bt_stop() {
+ echo "Disabling bluetooth..."
+ killall hciattach
+ mts-io-sysfs store bt-enabled 0
+}
+
+case "$1" in
+ start)
+ bt_start
+ ;;
+ stop)
+ bt_stop
+ ;;
+ restart)
+ bt_stop
+ bt_start
+ ;;
+ *)
+ echo "Usage $0: start|stop|restart"
+ exit 1
;;
esac