Skip to content

Conversation

@nhanasi
Copy link
Contributor

@nhanasi nhanasi commented Jan 15, 2026

Update getDeviceDetails.sh to move the bluetooth_mac population at bootup and move it as part of bluetooth service

@nhanasi nhanasi requested a review from a team as a code owner January 15, 2026 15:55
Copilot AI review requested due to automatic review settings January 15, 2026 15:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request disables automatic Bluetooth MAC address population during device bootup while retaining the capability for on-demand retrieval.

Changes:

  • Commented out the executeServiceRequest "bluetooth_mac" call in the "all" service request handler to prevent automatic Bluetooth MAC address retrieval at system bootup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 15, 2026 16:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@shibu-kv shibu-kv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not able to get the context. Also ticket title and description is mentioning as test. No details of reason why we are disabling it.
Please update the ticket with relevant details.

@nhanasi nhanasi changed the title TEST: DISABLE THE BLUETOOTH MAC UPDATES AT BOOTUP RDKEMW-12562 : Move Bluetooth Mac update from Device Details to Bluetooth Service Jan 15, 2026
Copilot AI review requested due to automatic review settings January 15, 2026 16:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nhanasi
Copy link
Contributor Author

nhanasi commented Jan 15, 2026

Done @shibu-kv

shibu-kv
shibu-kv previously approved these changes Jan 15, 2026
nhanasi and others added 2 commits January 16, 2026 15:25
* RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation (#410)

* Update Start_MaintenanceTasks.sh

* Update lib/rdk/Start_MaintenanceTasks.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update lib/rdk/Start_MaintenanceTasks.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Saranya2421 <saranya.suvi@gmail.com>

* Sysint 4.2.2 release changelog updates

---------

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Saranya2421 <saranya.suvi@gmail.com>
Copilot AI review requested due to automatic review settings January 23, 2026 16:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +14
#### [4.2.2](https://github.com/rdkcentral/sysint/compare/4.2.1...4.2.2)

- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#410`](https://github.com/rdkcentral/sysint/pull/410)
- SERXIONE-8331 : Added viper_ipa to exceptions for /media/apps/sky/packages [`#420`](https://github.com/rdkcentral/sysint/pull/420)
- RDK-59247: cleaning up network scripts. [`#402`](https://github.com/rdkcentral/sysint/pull/402)
- RDKEMW-11363: [NM Dispatcher] Reduce repetitive logging [`#415`](https://github.com/rdkcentral/sysint/pull/415)
- Merge tag '4.2.1' into develop [`1df413f`](https://github.com/rdkcentral/sysint/commit/1df413f4f00e87a43eb092c6c57e302d754fba90)
- RDK-59247:Migrate Functionality In Network scripts To Core Modules [`8dd5ab9`](https://github.com/rdkcentral/sysint/commit/8dd5ab957251cfc80d6556560386019ca86088cb)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CHANGELOG.md for version 4.2.2 does not include any reference to RDKEMW-12562 (the Bluetooth Mac update changes mentioned in the PR title). The changelog references other PRs and tasks but omits the primary purpose of this PR as stated in the title and description.

Copilot uses AI. Check for mistakes.
Comment on lines 176 to +220

if [ -n "$TriggerType" ] && [ "$TriggerType" -eq "$ON_DEMAND_LOG_UPLOAD" ]; then
logUploadLog "Application triggered on demand log upload"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
result=$?
if [ -x "$LOG_UPLOAD_BIN_PATH" ]; then
logUploadLog "Executing logupload binary: $LOG_UPLOAD_BIN_PATH"
"$LOG_UPLOAD_BIN_PATH" "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "ondemand" >> /opt/logs/dcmscript.log
result=$?
if [ "$result" -eq 0 ]; then
logUploadLog "Binary execution succeeded"
exit 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
result=$?
fi
else
logUploadLog "logupload binary not found at $LOG_UPLOAD_BIN_PATH...executing script"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>&1
result=$?
fi
else
logUploadLog "Log upload triggered from regular execution"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
bg_pid=$!
wait $bg_pid
result=$?
if [ -x "$LOG_UPLOAD_BIN_PATH" ]; then
logUploadLog "Executing logupload binary: $LOG_UPLOAD_BIN_PATH"
nice -n 19 "$LOG_UPLOAD_BIN_PATH" "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" >> /opt/logs/dcmscript.log &
bg_pid=$!
wait $bg_pid
result=$?
if [ "$result" -eq 0 ]; then
logUploadLog "Binary execution succeeded"
return 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
bg_pid=$!
wait $bg_pid
result=$?
fi
else
logUploadLog "logupload binary not found at $LOG_UPLOAD_BIN_PATH...executing script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
bg_pid=$!
wait $bg_pid
result=$?
fi
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title and description indicate this change is about moving bluetooth_mac update from Device Details to Bluetooth Service. However, the major changes in this file are related to log upload binary migration (adding binary execution with fallback to script). These significant log upload changes are not mentioned in the PR description at all. This appears to be unrelated functionality mixed into the PR.

Copilot uses AI. Check for mistakes.
Comment on lines +181 to +188
"$LOG_UPLOAD_BIN_PATH" "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "ondemand" >> /opt/logs/dcmscript.log
result=$?
if [ "$result" -eq 0 ]; then
logUploadLog "Binary execution succeeded"
exit 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using the binary on line 181, the TriggerType is hardcoded to "ondemand", but when falling back to the script on line 188, it uses the variable $TriggerType. This inconsistency could cause different behavior between binary and script execution. The binary should also receive $TriggerType as a parameter to maintain consistent behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +200 to +209
nice -n 19 "$LOG_UPLOAD_BIN_PATH" "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" >> /opt/logs/dcmscript.log &
bg_pid=$!
wait $bg_pid
result=$?
if [ "$result" -eq 0 ]; then
logUploadLog "Binary execution succeeded"
return 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the regular execution path, the binary invocation on line 200 doesn't pass any TriggerType parameter at all, while the script fallback on line 209 also doesn't pass a TriggerType. However, this is inconsistent with the on-demand execution path (lines 181 and 188) where parameters are passed. The regular execution path binary should receive consistent parameters with the script to ensure proper functionality.

Copilot uses AI. Check for mistakes.
return 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace after the '&' character at the end of this line. This should be removed for code cleanliness.

Suggested change
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &

Copilot uses AI. Check for mistakes.
Comment on lines +188 to +193
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
result=$?
fi
else
logUploadLog "logupload binary not found at $LOG_UPLOAD_BIN_PATH...executing script"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>&1
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent error handling: line 188 redirects stderr to /dev/null with '2>/dev/null', while line 193 redirects both stdout and stderr with '2>&1'. This difference in error handling between the two code paths could lead to missing error information in logs. Consider using consistent redirection, preferably '2>&1' to capture all output in logs.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants