From 531ce0abd2472ff6fc65843fb7d5a73af38f7826 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 21 Nov 2017 10:25:12 -0600 Subject: Make bluetooth configuration easier. --- recipes-connectivity/bluez/bluez5/default | 3 +++ recipes-connectivity/bluez/bluez5/init | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'recipes-connectivity/bluez') 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##*/}" ;; -- cgit v1.2.3