diff --git a/tools/rootcanal/model/controller/link_layer_controller.cc b/tools/rootcanal/model/controller/link_layer_controller.cc index 9b41acbf935c0e17b8e431f231e336e6e7ed3ce1..7c87b5a941987881e76af80efbc4113db6d0d316 100644 --- a/tools/rootcanal/model/controller/link_layer_controller.cc +++ b/tools/rootcanal/model/controller/link_layer_controller.cc @@ -3583,7 +3583,7 @@ void LinkLayerController::IncomingScoConnectionRequest( // Send connection request event and wait for Accept or Reject command. send_event_(bluetooth::hci::ConnectionRequestBuilder::Create( - address, ClassOfDevice(), + address, request.GetClassOfDevice(), extended ? bluetooth::hci::ConnectionRequestLinkType::ESCO : bluetooth::hci::ConnectionRequestLinkType::SCO)); } @@ -6173,7 +6173,7 @@ ErrorCode LinkLayerController::AddScoConnection(uint16_t connection_handle, connection_parameters.receive_bandwidth, connection_parameters.max_latency, connection_parameters.voice_setting, connection_parameters.retransmission_effort, - connection_parameters.packet_type)); + connection_parameters.packet_type, class_of_device_)); return ErrorCode::SUCCESS; } @@ -6206,7 +6206,7 @@ ErrorCode LinkLayerController::SetupSynchronousConnection( // Send eSCO connection request to peer. SendLinkLayerPacket(model::packets::ScoConnectionRequestBuilder::Create( GetAddress(), bd_addr, transmit_bandwidth, receive_bandwidth, max_latency, - voice_setting, retransmission_effort, packet_types)); + voice_setting, retransmission_effort, packet_types, class_of_device_)); return ErrorCode::SUCCESS; } diff --git a/tools/rootcanal/packets/link_layer_packets.pdl b/tools/rootcanal/packets/link_layer_packets.pdl index 55f7968bf9f7da161bdef3bf6c45369cc1f0b8ae..5e7425dbadc23d081d393bf63e3e7da3bf914456 100644 --- a/tools/rootcanal/packets/link_layer_packets.pdl +++ b/tools/rootcanal/packets/link_layer_packets.pdl @@ -429,6 +429,7 @@ packet ScoConnectionRequest : LinkLayerPacket (type = SCO_CONNECTION_REQUEST) { _reserved_ : 6, retransmission_effort : 8, packet_type : 16, + class_of_device : ClassOfDevice, } packet ScoConnectionResponse : LinkLayerPacket (type = SCO_CONNECTION_RESPONSE) {