diff options
-rw-r--r-- | multitech/recipes/bluez/bluez4.inc | 2 | ||||
-rwxr-xr-x | multitech/recipes/bluez/files/bluetooth.init | 30 |
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 |