Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6342f27
RDKEMW-10164: update CHANGELOG for release v1.1.5 (#139)
egalla204 Nov 5, 2025
4705590
RDKEMW-10311 : RF4CE update key mapping (#140)
dwolaver Nov 13, 2025
07c0c95
Revert "RDKEMW-8929 (#129)" (#145)
klu339 Nov 17, 2025
e652641
RDKEMW-7905 : remove ctrlm build flags - ANSI_CODES_DISABLED (#110)
dwolaver Nov 17, 2025
fc5045c
RDKEMW-8295 : remove ctrlm build flags - MEMORY_LOCK (#111)
dwolaver Nov 17, 2025
284efc8
RDKEMW-8296 : remove ctrlm build flags - DEEPSLEEP_CLOSE_DB (#112)
dwolaver Nov 17, 2025
d327435
RDKEMW-8668 : modify ctrlm build flag - BREAKPAD (#119)
dwolaver Nov 17, 2025
cd566c4
RDKEMW-8297 : remove ctrlm build flags - A5000_ENABLE (#117)
dwolaver Nov 17, 2025
97ea739
RDKEMW-8664 : remove ctrlm build flags - MEM_DEBUG, ASSERT_ON_WRONG_T…
dwolaver Nov 17, 2025
84e8ce8
RDKEMW-8676 : remove ctrlm build flags - MIC_TAP, LOCAL_MIC, LOCAL_MI…
dwolaver Nov 17, 2025
bcc3be8
RDKEMW-9124 : remove xr-voice-sdk build flags - XRAUDIO_CURTAIL XLOG_…
dwolaver Nov 19, 2025
a5109c8
RDKEMW-10480 : ctrlm release v1.1.6, xr-voice-sdk v1.0.7 (#149)
dwolaver Nov 19, 2025
e1fadf0
RDKEMW-9600: FIRST_PACKET_TIMEOUTs (#135)
klu339 Nov 19, 2025
baebbf2
RDKEMW-10425: Automation Logging (#144)
klu339 Dec 2, 2025
d72398a
RDKEMW-11159: new_certselector_type (#157)
egalla204 Dec 4, 2025
4f688c6
RDKEMW-11249: update CHANGELOG for ctrlm release v1.1.7 (#158)
egalla204 Dec 4, 2025
2f1050b
RDKEMW-8930 : remove ctrlm build flags - FACTORY_AUDIO_PLAYBACK (#143)
dwolaver Dec 8, 2025
f7ef989
RDKEMW-11283: add product description docs (#159)
egalla204 Dec 9, 2025
3ab9e92
RDKEMW-8929: Refactor base ipc class (#162)
klu339 Dec 16, 2025
d66eb1d
RDKEMW-12151 : ctrlm release v1.1.8, xr-voice-sdk v1.0.9 (#166)
dwolaver Jan 5, 2026
e502de1
RDKEMW-11471: Remove netType param (#164)
klu339 Jan 12, 2026
fc1c94a
RDKEMW-10631: Filter out unpaired devices when reconnecting all devices
msmith113 Jan 13, 2026
084f519
RDKEMW-12512: ctrlm release v1.1.9 (#169)
klu339 Jan 13, 2026
932b09e
RDKEMW-9843: report loaded and unloaded voltage from RCU (#163)
msmith113 Jan 21, 2026
7517d91
RDKEMW-12457: No longer ignoring device re-pair if it's already paire…
msmith113 Jan 23, 2026
e6a6bd6
RDKEMW-11792 : FFV config file isolation (#165)
dwolaver Feb 9, 2026
517b501
RDKEMW-9474: ctrlm multiple simultaneous IR databases (#161)
egalla204 Feb 9, 2026
57a5840
RDKEMW-13049: remove RCU firmware upgrade retries on failure (#173)
egalla204 Feb 9, 2026
a48ef12
RDKEMW-12828: device minor id, vendor, and product value updates (#175)
klu339 Feb 11, 2026
7706a0c
RDKEMW-13881: update CHANGELOG for release v1.1.10 (#178)
egalla204 Feb 11, 2026
d5d14f0
RDKEMW-13833: Remove duplicate RFC fetch attempts in listeners (#179)
klu339 Feb 18, 2026
2eaa356
RDKEMW-12930: RF4CE network export XCONF on pair/unpair/etc. (#177)
klu339 Feb 19, 2026
add759e
RDKEMW-13753: Report manually set IRDB codes RF4CE remotes (#176)
klu339 Feb 19, 2026
5a90734
RDKEMW-11359: Logging proximity key as debug instead of telemetry (#167)
msmith113 Feb 19, 2026
1f68214
RDKEMW-14445 : Add session end and protocol return to telemetry (#182)
jthomp007c Mar 5, 2026
3c06b8f
RDKEMW-14589: No UI action with "Info" keypress from rf4ce remote in…
msmith113 Mar 5, 2026
6dcab57
1.1.11 release changelog updates
egalla204 Mar 5, 2026
f3b6611
add date'
egalla204 Mar 5, 2026
34d65ad
Merge branch 'release/1.1.11' into develop
egalla204 Mar 6, 2026
ecd0f6d
RDKEMW-5849 : remove deprecated "experience" code (#185)
jthomp007c Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
270 changes: 161 additions & 109 deletions CHANGELOG.md

Large diffs are not rendered by default.

71 changes: 7 additions & 64 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,19 @@ set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
project(ctrlm-main VERSION ${CMAKE_PROJECT_VERSION})

# OPTIONS
option(A5000_ENABLE "ES1 A5000 use libse051" OFF)
option(ANSI_CODES_DISABLED "Disable ANSI code logging" OFF)
option(ASSERT_ON_WRONG_THREAD "Assert on wrong thread" OFF)
option(AUTH_ENABLED "Enable AUTH" OFF)
option(BLE_ENABLED "Enable BLE" ON)
option(BLE_SERVICES "Enable BLE Services" OFF)
option(BREAKPAD "Enable BREAKPAD" OFF)
option(BUILD_CTRLM_FACTORY "Build Control Factory Test" OFF)
option(DEEPSLEEP_CLOSE_DB "Deep Sleep Close DB" OFF)
option(ENABLE_NETWORKED_STANDBY_MODE "Enable Networked Standby Mode)" OFF)
option(FACTORY_AUDIO_PLAYBACK "Factory test audio playback" OFF)
option(FACTORY_CUSTOM_AUDIO_ANALYSIS "Factory custom audio analysis" OFF)
option(FDC_ENABLED "Enable FDC" OFF)
option(IP_ENABLED "Enable IP" OFF)
option(LOCAL_MIC "Local Microphone" OFF)
option(LOCAL_MIC_DISABLE_VIA_PRIVACY "Use Privacy to disable microphone" OFF)
option(MEM_DEBUG "Enable memory debugging" OFF)
option(MEMORY_LOCK "Memory Lock" OFF)
option(MIC_TAP "Enable MIC_TAP" OFF)
option(RF4CE_ENABLED "Enable RF4CE" ON)
option(TELEMETRY_SUPPORT "Enable TELEMETRY_SUPPORT" OFF)
option(THUNDER "Enable THUNDER" ON)
option(THUNDER_SECURITY "Enable THUNDER_SECURITY" OFF)
option(USE_SAFEC "Use safec" OFF)
option(USE_IARM_POWER_MANAGER "Use IARM Power Manager" OFF)
option(VOICE_KEYWORD_BEEP "Enable VOICE_KEYWORD_BEEP" OFF)
option(XRSR_HTTP "Enable XRSR_HTTP" OFF)
option(XRSR_SDT "Enable XRSR_SDT" OFF)
option(ENABLE_ASYNC_SRVR_MSG "Enable Asynchronous Server Messaging Feature" OFF)
Expand Down Expand Up @@ -178,22 +165,13 @@ target_link_libraries(

install(TARGETS controlMgr RUNTIME DESTINATION bin)

install(FILES ${CMAKE_BINARY_DIR}/ctrlm_config.json.template DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} COMPONENT config )
install(FILES ${CMAKE_BINARY_DIR}/ctrlm_config.json DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} COMPONENT config )

# DEFINES FROM OPTIONS
if(A5000_ENABLE)
find_library( SE_HAL_PATH SE_HAL ${CMAKE_SYSROOT}/usr/lib/se051)
target_link_libraries(controlMgr ${SE_HAL_PATH})
endif()

if(ANSI_CODES_DISABLED)
add_compile_definitions(ANSI_CODES_DISABLED)
endif()

if(ASSERT_ON_WRONG_THREAD)
add_compile_definitions(ASSERT_ON_WRONG_THREAD)
endif()

if(BLE_ENABLED)
target_link_libraries(controlMgr BTMgr)
if(BLE_SERVICES)
Expand All @@ -207,10 +185,6 @@ if(BREAKPAD)
add_compile_definitions(BREAKPAD_SUPPORT)
endif()

if(DEEPSLEEP_CLOSE_DB)
add_compile_definitions(DEEPSLEEP_CLOSE_DB)
endif()

if(ENABLE_ASYNC_SRVR_MSG)
add_compile_definitions(SUPPORT_ASYNC_SRVR_MSG)
endif()
Expand All @@ -219,10 +193,6 @@ if(ENABLE_AVS_WITH_SDT)
add_compile_definitions(SUPPORT_VOICE_DEST_ALSA SUPPORT_ASYNC_SRVR_MSG)
endif()

if(ENABLE_NETWORKED_STANDBY_MODE)
add_compile_definitions(NETWORKED_STANDBY_MODE_ENABLED)
endif()

if(FDC_ENABLED)
add_compile_definitions(FDC_ENABLED)
endif()
Expand All @@ -231,25 +201,6 @@ if(IP_ENABLED)
add_compile_definitions(CTRLM_NETWORK_IP CTRLM_IP_HAL_LOG_ENABLED)
endif()

if(LOCAL_MIC)
add_compile_definitions(CTRLM_LOCAL_MIC)
if(MIC_TAP)
add_compile_definitions(CTRLM_LOCAL_MIC_TAP)
endif()
if(LOCAL_MIC_DISABLE_VIA_PRIVACY)
add_compile_definitions(CTRLM_LOCAL_MIC_DISABLE_VIA_PRIVACY)
endif()
endif()

if(MEM_DEBUG)
add_compile_definitions(MEM_DEBUG)
endif()

if(MEMORY_LOCK)
add_compile_definitions(MEMORY_LOCK)
target_link_libraries(controLMgr clnl)
endif()

# RF4CE options
if(RF4CE_ENABLED)
# All RF4CE platforms have HAL NVM
Expand Down Expand Up @@ -283,8 +234,6 @@ if(THUNDER)
if(AUTH_ACTIVATION_STATUS)
add_compile_definitions(AUTH_ACTIVATION_STATUS)
endif()
#By default disabled but can be enabled
#add_compile_definitions(AUTH_EXPERIENCE)
target_link_libraries(controlMgr RdkCertSelector)
endif()
endif()
Expand All @@ -303,19 +252,13 @@ else()
add_compile_definitions(SAFEC_DUMMY_API)
endif()

if(VOICE_KEYWORD_BEEP)
add_compile_definitions(BEEP_ON_KWD_ENABLED)
add_definitions(-DBEEP_ON_KWD_FILE=\"${CMAKE_DATADIR}/${BEEP_ON_KWD_FILE}\")
install(FILES ${CMAKE_SOURCE_DIR}/../${BEEP_ON_KWD_FILE} DESTINATION share )
endif()

if(USE_DEPRECATED_HDMI_INPUT_PLUGIN)
add_compile_definitions(USE_DEPRECATED_HDMI_INPUT_PLUGIN)
endif()

install(TARGETS controlMgr RUNTIME DESTINATION bin)

install(FILES ${CMAKE_BINARY_DIR}/ctrlm_config.json.template DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} COMPONENT config )
install(FILES ${CMAKE_BINARY_DIR}/ctrlm_config.json DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} COMPONENT config )

# GENERATED FILES
add_custom_command( OUTPUT ctrlm_version_build.h
Expand All @@ -331,16 +274,16 @@ add_custom_command( OUTPUT ctrlm_version_build.h
)

add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/ctrlm_config.json.template
COMMAND python3 ${CTRLM_UTILS_JSON_COMBINE} -i ${CMAKE_CURRENT_SOURCE_DIR}/src/ctrlm_config_default.json -a ${CTRLM_CONFIG_JSON_VSDK}:vsdk -a ${CTRLM_CONFIG_JSON_CPC} -s ${CTRLM_CONFIG_JSON_CPC_SUB} -a ${CTRLM_CONFIG_JSON_CPC_ADD} -s ${CTRLM_CONFIG_JSON_OEM_SUB} -a ${CTRLM_CONFIG_JSON_OEM_ADD} -s ${CTRLM_CONFIG_JSON_MAIN_SUB} -a ${CTRLM_CONFIG_JSON_MAIN_ADD} -o ${CMAKE_BINARY_DIR}/ctrlm_config.json.template
OUTPUT ${CMAKE_BINARY_DIR}/ctrlm_config.json
COMMAND python3 ${CTRLM_UTILS_JSON_COMBINE} -i ${CMAKE_CURRENT_SOURCE_DIR}/src/ctrlm_config_default.json -a ${CTRLM_CONFIG_JSON_CPC} -s ${CTRLM_CONFIG_JSON_CPC_SUB} -a ${CTRLM_CONFIG_JSON_CPC_ADD} -s ${CTRLM_CONFIG_JSON_MAIN_SUB} -a ${CTRLM_CONFIG_JSON_MAIN_ADD} -o ${CMAKE_BINARY_DIR}/ctrlm_config.json
DEPENDS src/ctrlm_config_default.json
VERBATIM
)

add_custom_command(
OUTPUT ctrlm_config_default.h ${CMAKE_CURRENT_SOURCE_DIR}/src/ctrlm_config_default.c
COMMAND python3 ${CTRLM_UTILS_JSON_TO_HEADER} -i ${CMAKE_BINARY_DIR}/ctrlm_config.json.template -o ctrlm_config_default.h -c ${CMAKE_CURRENT_SOURCE_DIR}/src/ctrlm_config_default.c -v "ctrlm_global,network_rf4ce,network_ip,network_ble,ir,voice,device_update" -d "network_ble"
DEPENDS ${CMAKE_BINARY_DIR}/ctrlm_config.json.template
COMMAND python3 ${CTRLM_UTILS_JSON_TO_HEADER} -i ${CMAKE_BINARY_DIR}/ctrlm_config.json -o ctrlm_config_default.h -c ${CMAKE_CURRENT_SOURCE_DIR}/src/ctrlm_config_default.c -v "ctrlm_global,network_rf4ce,network_ip,network_ble,ir,voice,device_update" -d "network_ble"
DEPENDS ${CMAKE_BINARY_DIR}/ctrlm_config.json
VERBATIM
)

Expand All @@ -351,5 +294,5 @@ add_custom_command(
)

add_custom_target( ctrlm_config
DEPENDS ${CMAKE_BINARY_DIR}/ctrlm_config.json.template
DEPENDS ${CMAKE_BINARY_DIR}/ctrlm_config.json
)
64 changes: 64 additions & 0 deletions PRODUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# rdkcentral/control Product Functionality

This document summarizes the core product features, capabilities, and user-facing functionality provided by the `rdkcentral/control` project.

## 1. Product Overview

`rdkcentral/control` provides the central control and management solution for RDK-based devices, focusing on remote control integration, device state management, configuration handling, and hardware abstraction. It enables flexible, reliable control of device functions, typically in set-top boxes and smart TV platforms.

## 2. Key Functional Areas

### 2.1 Remote Control Manager

- **Multi-protocol Support:** Integrates with RF4CE and BLE-based remote controls, supporting automatic pairing and discovery of devices.
- **Key Mapping & Input:** Manages IR, RF, and BLE key events, including vendor-specific key mappings (e.g., for AMC App).
- **Telemetry & Logging:** Captures and processes telemetry data from voice streams, key events, and audio sessions for diagnostics and monitoring.
- **OTA & Firmware Management:** Handles remote control firmware updates and network discovery, with stability features when interrupted (e.g., OTA interrupted by reset).

### 2.2 Device State & Power Management

- **Deep Sleep & Wake Handling:** Responds to device state changes, ensuring proper initialization/timer handling during deep sleep or wake events.
- **Power Plugin Integration:** Uses RDK's Power Manager Thunder plugin for system power state management and interaction.

### 2.3 Configuration Management

- **Dynamic Configuration:** Reads, updates, and applies runtime configuration changes from files, including support for vendor override files.
- **Device Discovery:** Provides mechanisms to discover IR input devices, support for multiple device types and fallback/stub implementations if hardware is absent.
- **HAL Abstraction:** Exposes interfaces to control hardware-specific features via C++ classes (see `ctrlm_hal.h`, `ctrlm_hal_rf4ce.h`, `ctrlm_hal_ble.h`).

### 2.4 Audio & Voice Control

- **Voice Session Management:** Supports BLE/RF voice streaming; logs sessions; manages session state, end times, and error reporting.
- **Audio Stream Management:** Reports and optimizes audio pipe size; ensures reliable audio sample reporting for voice sessions.

### 2.5 API & Service Integration

- **Thunder & HDMI Plugins:** Integrates with plugin frameworks to extend support for HDMI input, AV input, MAC address fetch, and advanced service bridging.
- **ASB Detection:** Offers runtime detection for Advanced Service Bridge capabilities.

## 3. Product Extensibility

- **Vendor Layer Integration:** Provides hooks for vendor-specific features, such as configuration overrides and device database stubs.
- **Flexible Build & Runtime Flags:** Build flags allow enabling/disabling features (e.g., BLE audio, packet analysis, deepsleep, memory lock).
- **Plugin & Target Customization:** Can build custom targets (e.g., just the control config file).

## 4. Typical Use Cases

- **User Experience:** Enables seamless remote pairing and input handling, responsive device wake/sleep, and dynamic feature provisioning.
- **Monitoring/Diagnostics:** Logs device events and telemetry, aiding both advanced diagnostics and data-driven product improvement.
- **Integration Point:** Forms the backbone for device control in RDK deployments where remote management and hardware abstraction are required.

## 5. Recent Product Updates (Selected Highlights)

- Multi-protocol remote integration (BLE and RF4CE support).
- Overhaul of key mapping and vendor integration logic.
- Telemetry improvements for voice stream analytics.
- Refactoring to enhance HAL interface extensibility.
- Crash and stability fixes for deep sleep, rapid input, and device discovery.
- Improved runtime configuration and plugin extensibility.

_For full release notes, please see the [CHANGELOG](https://github.com/rdkcentral/control/blob/develop/CHANGELOG.md)._

## 6. Summary

`rdkcentral/control` delivers a comprehensive control and management solution for RDK devices, emphasizing extensibility, reliability, and integration with modern remote protocols and power management frameworks. It remains the canonical product for remote control, device state, and configuration management within the RDK platform.
4 changes: 2 additions & 2 deletions include/ctrlm_ipc_voice.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#define CTRLM_VOICE_SESSION_TEXT_MAX_LENGTH (512) ///< Session text string maximum length
#define CTRLM_VOICE_SESSION_MSG_MAX_LENGTH (128) ///< Session message string maximum length
#define CTRLM_VOICE_QUERY_STRING_MAX_LENGTH (128) ///< Query string maximum name or value length
#define CTRLM_VOICE_QUERY_STRING_MAX_PAIRS (16) ///< Query string maximum number of name/value pairs
#define CTRLM_VOICE_QUERY_STRING_MAX_PAIRS (24) ///< Query string maximum number of name/value pairs
#define CTRLM_VOICE_REQUEST_IP_MAX_LENGTH (48) ///< cURL request primary IP address string maximum length (big enough for IPv6)

#define CTRLM_VOICE_MIN_UTTERANCE_DURATION_MAXIMUM (600) ///< Maximum value of the utterance duration minimum setting (in milliseconds)
Expand Down Expand Up @@ -228,7 +228,7 @@ typedef struct {
ctrlm_network_type_t network_type; ///< Type of network on which the controller is bound
ctrlm_controller_id_t controller_id; ///< A unique identifier of the remote
unsigned long session_id; ///< A unique id for the voice session.
ctrlm_voice_session_end_reason_t reason; ///< The reason for ending
ctrlm_voice_session_end_reason_t reason; ///< The reason for ending session
unsigned char is_voice_assistant; ///< Boolean indicating if the device is a far-field device (1) as opposed to a hand-held remote (0).
} ctrlm_voice_iarm_event_session_end_t;

Expand Down
1 change: 0 additions & 1 deletion src/auth/ctrlm_auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class ctrlm_auth_t {
virtual bool get_device_id(std::string &device_id) = 0;
virtual bool get_account_id(std::string &account_id) = 0;
virtual bool get_partner_id(std::string &partner_id) = 0;
virtual bool get_experience(std::string &experience) = 0;
virtual bool get_sat(std::string &sat, time_t &expiration) = 0;
virtual bool supports_sat_expiration() const = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/auth/ctrlm_auth_certificate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ctrlm_auth_certificate_t::ctrlm_auth_certificate_t() {

char *cert_path = NULL;
char *cert_password = NULL;
rdkcertselector_h cert_selector = rdkcertselector_new( NULL, NULL, "MTLS" );
rdkcertselector_h cert_selector = rdkcertselector_new( NULL, NULL, "FBK_MTLS" );

if(cert_selector == NULL){
XLOGD_TELEMETRY("cert selector init failed");
Expand Down
5 changes: 0 additions & 5 deletions src/auth/ctrlm_auth_thunder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ bool ctrlm_auth_thunder_t::get_partner_id(std::string &partner_id) {
return(ret);
}

bool ctrlm_auth_thunder_t::get_experience(std::string &experience) {
bool ret = this->plugin->get_experience(experience);
return(ret);
}

bool ctrlm_auth_thunder_t::get_sat(std::string &sat, time_t &expiration) {
bool ret = this->plugin->get_sat(sat, expiration);
return(ret);
Expand Down
1 change: 0 additions & 1 deletion src/auth/ctrlm_auth_thunder.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class ctrlm_auth_thunder_t : public ctrlm_auth_t {
virtual bool get_device_id(std::string &device_id);
virtual bool get_account_id(std::string &account_id);
virtual bool get_partner_id(std::string &partner_id);
virtual bool get_experience(std::string &experience);
virtual bool get_sat(std::string &sat, time_t &expiration);
virtual bool supports_sat_expiration() const;

Expand Down
18 changes: 0 additions & 18 deletions src/auth/ctrlm_thunder_plugin_authservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,6 @@ bool ctrlm_thunder_plugin_authservice_t::get_account_id(std::string &account_id)
return(ret);
}

bool ctrlm_thunder_plugin_authservice_t::get_experience(std::string &experience) {
bool ret = false;
JsonObject params, response;
if(this->call_plugin("getExperience", (void *)&params, (void *)&response)) {
if(response["success"].Boolean()) { // If success doesn't exist, it defaults to false which is fine.
experience = response["experience"].String();
if(!experience.empty()) {
ret = true;
}
} else {
XLOGD_WARN("Success for getExperience was false");
}
} else {
XLOGD_WARN("Call for getExperience failed");
}
return(ret);
}

bool ctrlm_thunder_plugin_authservice_t::get_sat(std::string &sat, time_t &expiration) {
bool ret = false;
JsonObject params, response;
Expand Down
7 changes: 0 additions & 7 deletions src/auth/ctrlm_thunder_plugin_authservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ class ctrlm_thunder_plugin_authservice_t : public Thunder::Plugin::ctrlm_thunder
*/
bool get_account_id(std::string &account_id);

/**
* Function that retrieves the Experience String from Authservice.
* @param experience The reference to a string which will contain the Experience String.
* @return True on success otherwise False.
*/
bool get_experience(std::string &experience);

/**
* Function that retrieves the SAT Token from Authservice.
* @param sat The reference to a string which will contain the SAT Token.
Expand Down
52 changes: 43 additions & 9 deletions src/ble/ctrlm_ble_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,30 @@ void ctrlm_obj_controller_ble_t::setSupportedIrdbs(uint8_t vendor_support_bitmas
this->irdbs_supported_ = vendor_support_bitmask;

ctrlm_irdb_interface_t *irdb = ctrlm_main_irdb_get();
ctrlm_irdb_vendor_info_t vendor_info;
if (irdb && irdb->get_vendor_info(vendor_info)) {
XLOGD_INFO("Controller <%s> IRDBs supported bitmask = <0x%X>, which %s support the loaded IRDB plugin vendor <%s>",
ieee_address_get().to_string().c_str(), vendor_support_bitmask,
isSupportedIrdb(vendor_info) ? "DOES" : "does NOT", vendor_info.name.c_str());

if (irdb == NULL) {
XLOGD_ERROR("IRDB interface is NULL!!!");
return;
}

ctrlm_irdb_vendor_info_t rcu_vendor_info{};
rcu_vendor_info.rcu_support_bitmask = vendor_support_bitmask;
if (!irdb->set_vendor(rcu_vendor_info)) {
XLOGD_ERROR("Failed to set IRDB vendor info for controller <%s> with bitmask <0x%X>.",
ieee_address_get().to_string().c_str(), vendor_support_bitmask);
}

ctrlm_irdb_vendor_info_t vendor_info{};
if (irdb->get_vendor_info(vendor_info)) {
if (isSupportedIrdb(vendor_info)) {
XLOGD_INFO("Controller <%s> IRDBs supported bitmask = <0x%X>, which DOES support the loaded IRDB plugin vendor <%s>",
ieee_address_get().to_string().c_str(), vendor_support_bitmask, vendor_info.name.c_str());
} else {
XLOGD_ERROR("Controller <%s> IRDBs supported bitmask = <0x%X>, which does NOT support the loaded IRDB plugin vendor <%s>",
ieee_address_get().to_string().c_str(), vendor_support_bitmask, vendor_info.name.c_str());
}
} else {
XLOGD_INFO("Controller <%s> IRDBs supported bitmask = <0x%X>, couldn't retrieve IRDB plugin vendor info.",
XLOGD_WARN("Controller <%s> IRDBs supported bitmask = <0x%X>, couldn't retrieve IRDB plugin vendor info.",
ieee_address_get().to_string().c_str(), vendor_support_bitmask);
}
}
Expand Down Expand Up @@ -615,13 +632,13 @@ void ctrlm_obj_controller_ble_t::print_status() {
XLOGD_INFO("Model : %s", model_->to_string().c_str());
XLOGD_INFO("MAC Address : %s", ieee_address_->to_string().c_str());
XLOGD_INFO("Device Minor ID : %d", device_minor_id_);
XLOGD_INFO("Battery Level : %u%%", get_battery_percent());
XLOGD_AUTOMATION_INFO("Battery Level : %u%%", get_battery_percent());
XLOGD_INFO("HW Revision : %s", hw_revision_->to_string().c_str());
XLOGD_INFO("FW Revision : %s", fw_revision_->to_string().c_str());
XLOGD_INFO("SW Revision : %s", sw_revision_->to_string().c_str());
XLOGD_AUTOMATION_INFO("SW Revision : %s", sw_revision_->to_string().c_str());
XLOGD_INFO("Serial Number : %s", serial_number_->to_string().c_str());
XLOGD_INFO("");
XLOGD_INFO("Connected : %s", (connected_==true) ? "true" : "false");
XLOGD_AUTOMATION_INFO("Connected : %s", (connected_==true) ? "true" : "false");
XLOGD_INFO("Last Activity Time : %s", ctrlm_utils_time_as_string(this->last_activity_time_get()).c_str());
XLOGD_INFO("Bound Time : %s", ctrlm_utils_time_as_string(this->time_binding_get()).c_str());
XLOGD_INFO("");
Expand Down Expand Up @@ -654,4 +671,21 @@ void ctrlm_obj_controller_ble_t::print_status() {
XLOGD_WARN("------------------------------------------------------------");
}

void ctrlm_obj_controller_ble_t::update_controller_id_and_db_entry(std::string db_name, ctrlm_network_id_t network_id, ctrlm_controller_id_t new_id) {
ctrlm_obj_controller_t::update_controller_id_and_db_entry(db_name, network_id, new_id);

std::stringstream new_controller_db_table;
new_controller_db_table << db_name << "_" << COUT_HEX_MODIFIER << (int)network_id << "_controller_" << COUT_HEX_MODIFIER << (int)new_id;
std::string new_table = new_controller_db_table.str();

product_name_->set_table(new_table);
serial_number_->set_table(new_table);
manufacturer_->set_table(new_table);
model_->set_table(new_table);
fw_revision_->set_table(new_table);
sw_revision_->set_table(new_table);
hw_revision_->set_table(new_table);
battery_percent_->set_table(new_table);
}

// End Function Implementations
Loading
Loading