Skip to content

RDKEMW-15135: T2 RCU pairing#189

Open
klu339 wants to merge 8 commits intodevelopfrom
feature/RDKEMW-15315
Open

RDKEMW-15135: T2 RCU pairing#189
klu339 wants to merge 8 commits intodevelopfrom
feature/RDKEMW-15315

Conversation

@klu339
Copy link
Copy Markdown
Contributor

@klu339 klu339 commented Mar 31, 2026

No description provided.

@klu339 klu339 requested a review from a team as a code owner March 31, 2026 14:46
Copilot AI review requested due to automatic review settings March 31, 2026 14:46
Copy link
Copy Markdown

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 PR adds Telemetry 2 (T2) reporting for BLE RCU pairing attempts and consolidates telemetry reporting categories by replacing separate BLE/RF4CE report types with a single RCU type.

Changes:

  • Rename telemetry report category from RF4CE/BLE to RCU and update TR-181 trigger constants accordingly.
  • Thread BlueZ pairing retry counters and pairing outcome details up through the BLE pairing state machine and controller layers.
  • Emit a new T2 marker (ctrlm.rcu.pairing.attempt) with a JSON payload describing pairing method, result, retries, discovered devices, and error message.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/telemetry/ctrlm_telemetry.h Consolidates telemetry report types to include RCU instead of separate BLE/RF4CE.
src/telemetry/ctrlm_telemetry.cpp Updates report trigger/string mapping to use the new RCU report type.
src/telemetry/ctrlm_telemetry_markers.h Adds marker definition and schema documentation for RCU pairing attempt telemetry.
src/ctrlm_tr181.h Replaces BLE/RF4CE telemetry report TR-181 keys with a unified rcu key.
src/ble/hal/blercu/bluez/blercudevice.cpp Extends pairing error signal to include retry counters and max retries.
src/ble/hal/blercu/bluez/blercuadapter.cpp Propagates pairing error retry details from device to adapter slots.
src/ble/hal/blercu/bluez/blercuadapter_p.h Updates adapter pairing error handler signature to include retry details.
src/ble/hal/blercu/blercupairingstatemachine.h Introduces pairing outcome tracking types/fields and public getters.
src/ble/hal/blercu/blercupairingstatemachine.cpp Records pairing method/outcome, discovered devices, retry counts, and error details.
src/ble/hal/blercu/blercudevice.h Updates device pairing error slot signature to include retry counters.
src/ble/hal/blercu/blercucontroller.h Adds BleRcuPairingOutcome struct and slot for pairing outcome notifications.
src/ble/hal/blercu/blercucontroller.cpp Emits BleRcuPairingOutcome on success/failure with method/result/devices/errors.
src/ble/hal/blercu/blercuadapter.h Updates adapter pairing error slot signature to include retry counters.
src/ble/ctrlm_ble_rcu_interface.h Adds handler registration for pairing outcome notifications.
src/ble/ctrlm_ble_rcu_interface.cpp Wires controller pairing outcome into the interface slot fan-out.
src/ble/ctrlm_ble_network.h Adds a BLE pairing-attempt aggregation struct for telemetry emission.
src/ble/ctrlm_ble_network.cpp Queues pairing outcome to main thread and emits the T2 marker JSON.

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

Comment thread src/ble/hal/blercu/bluez/blercudevice.cpp Outdated
Comment thread src/ble/ctrlm_ble_network.cpp Outdated
Comment thread src/ble/ctrlm_ble_network.cpp Outdated
Comment thread src/ble/ctrlm_ble_network.cpp Outdated
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp Outdated
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp
Comment thread src/ble/hal/blercu/blercucontroller.h Outdated
Comment thread src/ble/ctrlm_ble_network.h Outdated
Comment thread src/telemetry/ctrlm_telemetry_markers.h Outdated
Copilot AI review requested due to automatic review settings March 31, 2026 18:41
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 4 files pending identification.

  • Protex Server Path: /home/blackduck/github/control/189/rdk/components/generic/control

  • Commit: b8347e5

Report detail: gist'

Copy link
Copy Markdown

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 17 out of 17 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 thread src/ble/hal/blercu/bluez/blercudevice.cpp Outdated
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp Outdated
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp Outdated
Comment thread src/ble/ctrlm_ble_network.cpp Outdated
Comment thread src/ble/ctrlm_ble_network.h Outdated
Comment thread src/ctrlm_tr181.h
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 4 files pending identification.

  • Protex Server Path: /home/blackduck/github/control/189/rdk/components/generic/control

  • Commit: 96bbf48

Report detail: gist'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## WARNING: A Blackduck scan failure has been waived

A prior failure has been upvoted

  • Upvote reason: ok

  • Commit: 96bbf48
    '

@klu339 klu339 changed the title RDKEMW-15315: T2 RCU pairing RDKEMW-15135: T2 RCU pairing Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 17:51
Copy link
Copy Markdown

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 17 out of 17 changed files in this pull request and generated 3 comments.


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

Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp Outdated
Comment thread src/telemetry/ctrlm_telemetry_markers.h Outdated
Comment thread src/ble/ctrlm_ble_network.cpp
@egalla204 egalla204 self-requested a review April 3, 2026 00:45
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp Outdated
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp Outdated
Copilot AI review requested due to automatic review settings April 8, 2026 15:55
Copy link
Copy Markdown

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 20 out of 20 changed files in this pull request and generated 11 comments.


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

Comment thread src/telemetry/ctrlm_telemetry.h Outdated
Comment thread src/telemetry/ctrlm_telemetry_event.h
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp
Comment thread src/ble/hal/blercu/blercupairingstatemachine.cpp
Comment thread src/ble/hal/blercu/blercupairingstatemachine.h Outdated
Comment thread src/ble/ctrlm_ble_network.cpp Outdated
Comment thread src/ble/ctrlm_ble_network.cpp
Comment thread src/telemetry/ctrlm_telemetry_event.cpp Outdated
Comment thread src/telemetry/ctrlm_telemetry_markers.h Outdated
Comment thread src/telemetry/ctrlm_telemetry_markers.h Outdated
@klu339 klu339 force-pushed the feature/RDKEMW-15315 branch from ea2cfbc to b00781c Compare April 8, 2026 16:30
Copilot AI review requested due to automatic review settings April 8, 2026 19:27
Copy link
Copy Markdown

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 21 out of 21 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

src/ble/hal/blercu/bluez/blercudevice.cpp:253

  • pair() sets m_maxPairingRetries but does not reset m_pairingRetryCnt. If a previous pairing attempt succeeded after one or more retries, m_pairingRetryCnt remains non-zero and subsequent pairing attempts will start “part-way through” the retry budget (and emit incorrect retry counts). Reset m_pairingRetryCnt (and optionally m_maxPairingRetries) when starting a new pairing attempt and/or on successful pairing reply.
void BleRcuDeviceBluez::pair(int timeout, int retries)
{
    m_maxPairingRetries = retries;
    m_deviceProxy->Pair(
            PendingReply<>(m_isAlive, std::bind(&BleRcuDeviceBluez::onPairRequestReply, this, std::placeholders::_1)));

    // set the flag, it may be cleared if the call fails
    m_isPairing = true;
}

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

Comment thread src/telemetry/ctrlm_telemetry_markers.h
Comment thread src/telemetry/ctrlm_telemetry_markers.h
Comment thread src/ble/hal/blercu/blercucontroller.h
Comment thread src/ble/ctrlm_ble_network.cpp
Copy link
Copy Markdown
Contributor

@egalla204 egalla204 left a comment

Choose a reason for hiding this comment

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

looks good to me

Copy link
Copy Markdown
Contributor

@dwolaver dwolaver left a comment

Choose a reason for hiding this comment

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

ready for QA test!

bool ctrlm_telemetry_event_t<std::string>::event() const {
XLOGD_TELEMETRY("telemetry event <%s, %s>", this->marker.c_str(), this->value.c_str());
return(t2_event_s((char *)this->marker.c_str(), (char *)this->value.c_str()) == T2ERROR_SUCCESS);
if (value.length() > CTRLM_TELEMETRY_MAX_EVENT_SIZE_BYTES) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is going to work as intended. This should be explicitly tested. For the voice session telemetry, the size applied to the block of data in the entire 15 minute window. Since this is using the accumulate feature, I'm not sure what the agreement is with respect to the size of each individual event.

klu339 added 3 commits April 15, 2026 13:03
Reason for change:
Test Procedure:
Risks:
Signed-off-by: Kelvin Lu <Kelvin_Lu@comcast.com>
@klu339 klu339 force-pushed the feature/RDKEMW-15315 branch from 14c5cce to a699481 Compare April 15, 2026 17:03
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.

5 participants