diff options
author | Mike Fiore <mfiore@multitech.com> | 2013-04-09 13:09:00 -0500 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2013-04-09 13:09:00 -0500 |
commit | cb1ab19007e9d132555588d7b16da6666245cddd (patch) | |
tree | ed307d7a07c4cbaaf76cf9cca72f6263dd8c7eae /multitech/recipes/bluez/files/bluetooth.init | |
parent | 71f8c1b67507b2ed21b5a7b2a38c929a6cc0cc45 (diff) | |
parent | f547c4161d0e058326b2341519029fbebc739dce (diff) |
Merge git.multitech.net:corecdp
Diffstat (limited to 'multitech/recipes/bluez/files/bluetooth.init')
-rwxr-xr-x | multitech/recipes/bluez/files/bluetooth.init | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/multitech/recipes/bluez/files/bluetooth.init b/multitech/recipes/bluez/files/bluetooth.init new file mode 100755 index 0000000..58318c3 --- /dev/null +++ b/multitech/recipes/bluez/files/bluetooth.init @@ -0,0 +1,35 @@ +#!/bin/bash + +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 |