Loading tools/rootcanal/model/controller/controller_properties.h +15 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,18 @@ namespace rootcanal { using bluetooth::hci::HciVersion; using bluetooth::hci::LmpVersion; // Local controller quirks. struct ControllerQuirks { // The specification states that the Random Address is invalid until // explicitly set by the command LE Set Random Address. Certain HCI commands // check for this condition. // // This quirk configures a default value for the LE random address in order // to bypass this validation. The default random address will // be ba:db:ad:ba:db:ad. bool has_default_random_address{false}; }; // Local controller information. // // Provide the Informational Parameters returned by HCI commands Loading @@ -54,6 +66,9 @@ struct ControllerProperties { // specification. bool CheckSupportedCommands() const; // Enabled quirks. ControllerQuirks quirks{}; // Local Version Information (Vol 4, Part E § 7.4.1). HciVersion hci_version{HciVersion::V_5_3}; LmpVersion lmp_version{LmpVersion::V_5_3}; Loading tools/rootcanal/model/controller/link_layer_controller.cc +6 −0 Original line number Diff line number Diff line Loading @@ -1803,6 +1803,12 @@ LinkLayerController::LinkLayerController(const Address& address, : address_(address), properties_(properties), lm_(nullptr, link_manager_destroy) { if (properties_.quirks.has_default_random_address) { LOG_WARN("Configuring a default random address for this controller"); random_address_ = Address { 0xba, 0xdb, 0xad, 0xba, 0xdb, 0xad }; } ops_ = { .user_pointer = this, .get_handle = Loading Loading
tools/rootcanal/model/controller/controller_properties.h +15 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,18 @@ namespace rootcanal { using bluetooth::hci::HciVersion; using bluetooth::hci::LmpVersion; // Local controller quirks. struct ControllerQuirks { // The specification states that the Random Address is invalid until // explicitly set by the command LE Set Random Address. Certain HCI commands // check for this condition. // // This quirk configures a default value for the LE random address in order // to bypass this validation. The default random address will // be ba:db:ad:ba:db:ad. bool has_default_random_address{false}; }; // Local controller information. // // Provide the Informational Parameters returned by HCI commands Loading @@ -54,6 +66,9 @@ struct ControllerProperties { // specification. bool CheckSupportedCommands() const; // Enabled quirks. ControllerQuirks quirks{}; // Local Version Information (Vol 4, Part E § 7.4.1). HciVersion hci_version{HciVersion::V_5_3}; LmpVersion lmp_version{LmpVersion::V_5_3}; Loading
tools/rootcanal/model/controller/link_layer_controller.cc +6 −0 Original line number Diff line number Diff line Loading @@ -1803,6 +1803,12 @@ LinkLayerController::LinkLayerController(const Address& address, : address_(address), properties_(properties), lm_(nullptr, link_manager_destroy) { if (properties_.quirks.has_default_random_address) { LOG_WARN("Configuring a default random address for this controller"); random_address_ = Address { 0xba, 0xdb, 0xad, 0xba, 0xdb, 0xad }; } ops_ = { .user_pointer = this, .get_handle = Loading