From bd707a8f5780bee01c6028e31695e2dde62ce07c Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:00:48 -0500 Subject: [PATCH 1/9] Create readBTAddress-generic.sh --- lib/rdk/readBTAddress-generic.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/rdk/readBTAddress-generic.sh diff --git a/lib/rdk/readBTAddress-generic.sh b/lib/rdk/readBTAddress-generic.sh new file mode 100644 index 00000000..317e77ad --- /dev/null +++ b/lib/rdk/readBTAddress-generic.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +. /etc/include.properties +. /etc/device.properties +. $RDK_PATH/utils.sh + +bluetooth_mac="00:00:00:00:00:00" +if [ "$BLUETOOTH_ENABLED" = "true" ]; then + bluetooth_mac=$(getDeviceBluetoothMac) +fi From 0aed4b8cd1529b28b127f17a24a5f02083fb5e31 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:02:51 -0500 Subject: [PATCH 2/9] Update getDeviceDetails.sh --- lib/rdk/getDeviceDetails.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rdk/getDeviceDetails.sh b/lib/rdk/getDeviceDetails.sh index 372ba4b6..b0d84f5b 100755 --- a/lib/rdk/getDeviceDetails.sh +++ b/lib/rdk/getDeviceDetails.sh @@ -277,11 +277,11 @@ getDeviceSerialNumber() getBluetoothMac() { - bluetooth_mac="00:00:00:00:00:00" - if [ "$BLUETOOTH_ENABLED" = "true" ]; then - bluetooth_mac=$(getDeviceBluetoothMac) + if [ -f readBTAddress-vendor.sh ]; then + . /lib/rdk/readBTAddress-vendor.sh + else + . /lib/rdk/readBTAddress-generic.sh fi - echo "$bluetooth_mac" } From 369af71f679c8bcbd0c853bad9946a6fa5be010b Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:13:04 -0500 Subject: [PATCH 3/9] Update lib/rdk/getDeviceDetails.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/rdk/getDeviceDetails.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdk/getDeviceDetails.sh b/lib/rdk/getDeviceDetails.sh index b0d84f5b..189672c6 100755 --- a/lib/rdk/getDeviceDetails.sh +++ b/lib/rdk/getDeviceDetails.sh @@ -277,7 +277,7 @@ getDeviceSerialNumber() getBluetoothMac() { - if [ -f readBTAddress-vendor.sh ]; then + if [ -f /lib/rdk/readBTAddress-vendor.sh ]; then . /lib/rdk/readBTAddress-vendor.sh else . /lib/rdk/readBTAddress-generic.sh From 5d9a57cc4b6954877c087eb66b962841724719e6 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:13:44 -0500 Subject: [PATCH 4/9] Update readBTAddress-generic.sh --- lib/rdk/readBTAddress-generic.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rdk/readBTAddress-generic.sh b/lib/rdk/readBTAddress-generic.sh index 317e77ad..26b0ce48 100644 --- a/lib/rdk/readBTAddress-generic.sh +++ b/lib/rdk/readBTAddress-generic.sh @@ -4,7 +4,6 @@ . /etc/device.properties . $RDK_PATH/utils.sh -bluetooth_mac="00:00:00:00:00:00" if [ "$BLUETOOTH_ENABLED" = "true" ]; then bluetooth_mac=$(getDeviceBluetoothMac) fi From c4c3b11a548ccdaad68ea2f0d4807db72249e69b Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:14:14 -0500 Subject: [PATCH 5/9] Update getDeviceDetails.sh --- lib/rdk/getDeviceDetails.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rdk/getDeviceDetails.sh b/lib/rdk/getDeviceDetails.sh index 189672c6..d0008a15 100755 --- a/lib/rdk/getDeviceDetails.sh +++ b/lib/rdk/getDeviceDetails.sh @@ -277,6 +277,7 @@ getDeviceSerialNumber() getBluetoothMac() { + bluetooth_mac="00:00:00:00:00:00" if [ -f /lib/rdk/readBTAddress-vendor.sh ]; then . /lib/rdk/readBTAddress-vendor.sh else From b4650b45467409d9b0e6a9de4690efdb8bf84bb8 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:15:05 -0500 Subject: [PATCH 6/9] Update readBTAddress-generic.sh --- lib/rdk/readBTAddress-generic.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/rdk/readBTAddress-generic.sh b/lib/rdk/readBTAddress-generic.sh index 26b0ce48..a7be86c1 100644 --- a/lib/rdk/readBTAddress-generic.sh +++ b/lib/rdk/readBTAddress-generic.sh @@ -1,4 +1,25 @@ #!/bin/sh +############################################################################## +# If not stated otherwise in this file or this component's LICENSE file the +# following copyright and licenses apply: +# +# Copyright 2020 RDK Management +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################## +# Purpose: This script is used to fetch device Bluetooth Mac information +# Scope: RDK devices. +# Usage: This script is triggered by a systemd service and shell scripts. . /etc/include.properties . /etc/device.properties From 2c775cb4811204baba741830c25095b54b44a423 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:31:18 -0500 Subject: [PATCH 7/9] Update getDeviceDetails.sh --- lib/rdk/getDeviceDetails.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rdk/getDeviceDetails.sh b/lib/rdk/getDeviceDetails.sh index d0008a15..20990cb4 100755 --- a/lib/rdk/getDeviceDetails.sh +++ b/lib/rdk/getDeviceDetails.sh @@ -279,10 +279,11 @@ getBluetoothMac() { bluetooth_mac="00:00:00:00:00:00" if [ -f /lib/rdk/readBTAddress-vendor.sh ]; then - . /lib/rdk/readBTAddress-vendor.sh + bluetooth_mac=`sh /lib/rdk/readBTAddress-vendor.sh` else - . /lib/rdk/readBTAddress-generic.sh + bluetooth_mac=`sh /opt/readBTAddress-generic.sh` fi + echo "$bluetooth_mac" } From 91dee73b3d60a4a9ad8f684c691a7b7dab3b3ef5 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:31:56 -0500 Subject: [PATCH 8/9] Update getDeviceDetails.sh --- lib/rdk/getDeviceDetails.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdk/getDeviceDetails.sh b/lib/rdk/getDeviceDetails.sh index 20990cb4..343536fc 100755 --- a/lib/rdk/getDeviceDetails.sh +++ b/lib/rdk/getDeviceDetails.sh @@ -281,7 +281,7 @@ getBluetoothMac() if [ -f /lib/rdk/readBTAddress-vendor.sh ]; then bluetooth_mac=`sh /lib/rdk/readBTAddress-vendor.sh` else - bluetooth_mac=`sh /opt/readBTAddress-generic.sh` + bluetooth_mac=`sh /lib/rdk/readBTAddress-generic.sh` fi echo "$bluetooth_mac" From 9fc17809e66f570c5d8ff6bc8f9b71354b16b9e2 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 23 Jan 2026 12:32:16 -0500 Subject: [PATCH 9/9] Update readBTAddress-generic.sh --- lib/rdk/readBTAddress-generic.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rdk/readBTAddress-generic.sh b/lib/rdk/readBTAddress-generic.sh index a7be86c1..5fdfc3c4 100644 --- a/lib/rdk/readBTAddress-generic.sh +++ b/lib/rdk/readBTAddress-generic.sh @@ -28,3 +28,4 @@ if [ "$BLUETOOTH_ENABLED" = "true" ]; then bluetooth_mac=$(getDeviceBluetoothMac) fi +echo $bluetooth_mac