summaryrefslogtreecommitdiff
path: root/recipes-connectivity
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-11-21 10:25:12 -0600
committerJohn Klug <john.klug@multitech.com>2017-11-21 10:25:12 -0600
commit531ce0abd2472ff6fc65843fb7d5a73af38f7826 (patch)
tree2250cac1357b56a9d102cdb9f429d5a1d81e605e /recipes-connectivity
parentac98b704054c7109bd165476f3d7bace4c16604e (diff)
downloadmeta-mlinux-531ce0abd2472ff6fc65843fb7d5a73af38f7826.tar.gz
meta-mlinux-531ce0abd2472ff6fc65843fb7d5a73af38f7826.tar.bz2
meta-mlinux-531ce0abd2472ff6fc65843fb7d5a73af38f7826.zip
Make bluetooth configuration easier.
Diffstat (limited to 'recipes-connectivity')
-rw-r--r--recipes-connectivity/bluez/bluez5/default3
-rwxr-xr-xrecipes-connectivity/bluez/bluez5/init4
2 files changed, 7 insertions, 0 deletions
diff --git a/recipes-connectivity/bluez/bluez5/default b/recipes-connectivity/bluez/bluez5/default
index e9542b8..e912922 100644
--- a/recipes-connectivity/bluez/bluez5/default
+++ b/recipes-connectivity/bluez/bluez5/default
@@ -1,5 +1,8 @@
# Set to 1 to enable bluetooth daemon
BLUETOOTH_ENABLED=0
+# Use the following to setup bluetooth usability
+BLUETOOTHCTL_CMD="power on\ndiscoverable on\npairable on\n"
+
#Compatilitity mode
#MOREOPTIONS="-C"
diff --git a/recipes-connectivity/bluez/bluez5/init b/recipes-connectivity/bluez/bluez5/init
index f6d0884..4d84195 100755
--- a/recipes-connectivity/bluez/bluez5/init
+++ b/recipes-connectivity/bluez/bluez5/init
@@ -29,6 +29,10 @@ case $1 in
fi
start-stop-daemon --start --background $SSD_OPTIONS $MOREOPTIONS
+ sleep 1
+ if [[ -n ${BLUETOOTHCTL_CMD} ]] ; then
+ echo -e "${BLUETOOTHCTL_CMD}" | /usr/bin/bluetoothctl 2>&1 | logger -t bluetoothctl -p daemon.info
+ fi
echo "${DAEMON##*/}"
;;