From 36e3a2c6c3e0784ba3b3e88cbd6908d1495f8af7 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Wed, 29 Jun 2016 09:07:06 +0200 Subject: [PATCH] bluez5-init; redirect bluetooth daemon messages to a log file https://jira.digi.com/browse/DEL-2632 Signed-off-by: Isaac Hermida --- .../recipes-connectivity/bluez/bluez5-5.33/bluez-init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init index 583910c9f..7458716a2 100755 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init @@ -22,6 +22,7 @@ if [ "${1}" != "start" ]; then fi SCRIPTNAME="$(basename "${0}")" +LOGFILE="/var/log/bluetoothd.log" bt_init_qca6564() { MOD_VERSION="$(($(cat /proc/device-tree/digi,hwid,hv 2>/dev/null || true)))" @@ -49,7 +50,7 @@ bt_init_qca6564() { BT_FLOW="noflow" fi - if hciattach -t120 ttyBt qca ${BT_RATE:-3000000} ${BT_FLOW:-flow} 2>/dev/null; then + if hciattach -t120 ttyBt qca ${BT_RATE:-3000000} ${BT_FLOW:-flow} 2>${LOGFILE}; then : # No-op else echo "${SCRIPTNAME}: FAILED (hciattach)" @@ -123,7 +124,7 @@ bt_init_ar3k() { # Start the Bluetooth driver and daemon (D-BUS must already be running) RETRIES="5" while [ "${RETRIES}" -gt "0" ]; do - hciattach ttyBt ath3k 4000000 1>/dev/null && break + hciattach ttyBt ath3k 4000000 1>${LOGFILE} && break if [ -n "${BT_PWR_GPIO_NR}" ]; then # # If hciattach fails try to recover it by toggling the BT power GPIO