diff options
-rw-r--r-- | recipes-connectivity/bluez/bluez5/default | 3 | ||||
-rwxr-xr-x | recipes-connectivity/bluez/bluez5/init | 4 |
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##*/}" ;; |