Loading system/gd/hal/facade.cc +5 −3 Original line number Original line Diff line number Diff line Loading @@ -79,8 +79,10 @@ class HciHalFacadeService ::google::protobuf::Empty* response) override { ::google::protobuf::Empty* response) override { std::unique_lock<std::mutex> lock(mutex_); std::unique_lock<std::mutex> lock(mutex_); can_send_hci_command_ = false; can_send_hci_command_ = false; hal_->sendHciCommand( hci::Lap lap; SerializePacket(hci::InquiryBuilder::Create(0x33 /* LAP=0x9e8b33 */, static_cast<uint8_t>(request->length()), lap.lap_ = 0x33; hal_->sendHciCommand(SerializePacket(hci::InquiryBuilder::Create(lap, static_cast<uint8_t>(request->length()), static_cast<uint8_t>(request->num_responses())))); static_cast<uint8_t>(request->num_responses())))); while (!can_send_hci_command_) { while (!can_send_hci_command_) { cv_.wait(lock); cv_.wait(lock); Loading system/gd/hci/hci_packets.pdl +18 −9 Original line number Original line Diff line number Diff line Loading @@ -704,10 +704,15 @@ packet CommandStatus : EventPacket (event_code = COMMAND_STATUS){ packet NoCommandComplete : CommandComplete (command_op_code = NONE){ packet NoCommandComplete : CommandComplete (command_op_code = NONE){ } } struct Lap { // Lower Address Part lap : 6, _reserved_ : 2, _fixed_ = 0x9e8b : 16, } // LINK_CONTROL // LINK_CONTROL packet Inquiry : DiscoveryCommand (op_code = INQUIRY) { packet Inquiry : DiscoveryCommand (op_code = INQUIRY) { lap0 : 8, // 0x00 - 0x3F lap : Lap, _fixed_ = 0x9E8B : 16, // LAP upper bits are _fixed_ inquiry_length : 8, // 0x1 - 0x30 (times 1.28s) inquiry_length : 8, // 0x1 - 0x30 (times 1.28s) num_responses : 8, // 0x00 unlimited num_responses : 8, // 0x00 unlimited } } Loading Loading @@ -1485,7 +1490,12 @@ packet WritePageScanActivityComplete : CommandComplete (command_op_code = WRITE_ } } packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) { packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) { _payload_, // placeholder (unimplemented) } packet ReadInquiryScanActivityComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_ACTIVITY) { status : ErrorCode, inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms inquiry_scan_window : 16, // Range: 0x0011 to 0x1000 } } packet WriteInquiryScanActivity : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) { packet WriteInquiryScanActivity : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) { Loading Loading @@ -1672,14 +1682,13 @@ packet ReadNumberOfSupportedIacComplete : CommandComplete (command_op_code = REA num_support_iac : 8, num_support_iac : 8, } } struct Lap { // Lower Address Part packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) { lap : 6, _reserved_ : 2, _fixed_ = 0x9e8b : 16, } } packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) { packet ReadCurrentIacLapComplete : CommandComplete (command_op_code = READ_CURRENT_IAC_LAP) { _payload_, // placeholder (unimplemented) status : ErrorCode, _count_(laps_to_read) : 8, laps_to_read : Lap[], } } packet WriteCurrentIacLap : DiscoveryCommand (op_code = WRITE_CURRENT_IAC_LAP) { packet WriteCurrentIacLap : DiscoveryCommand (op_code = WRITE_CURRENT_IAC_LAP) { Loading Loading
system/gd/hal/facade.cc +5 −3 Original line number Original line Diff line number Diff line Loading @@ -79,8 +79,10 @@ class HciHalFacadeService ::google::protobuf::Empty* response) override { ::google::protobuf::Empty* response) override { std::unique_lock<std::mutex> lock(mutex_); std::unique_lock<std::mutex> lock(mutex_); can_send_hci_command_ = false; can_send_hci_command_ = false; hal_->sendHciCommand( hci::Lap lap; SerializePacket(hci::InquiryBuilder::Create(0x33 /* LAP=0x9e8b33 */, static_cast<uint8_t>(request->length()), lap.lap_ = 0x33; hal_->sendHciCommand(SerializePacket(hci::InquiryBuilder::Create(lap, static_cast<uint8_t>(request->length()), static_cast<uint8_t>(request->num_responses())))); static_cast<uint8_t>(request->num_responses())))); while (!can_send_hci_command_) { while (!can_send_hci_command_) { cv_.wait(lock); cv_.wait(lock); Loading
system/gd/hci/hci_packets.pdl +18 −9 Original line number Original line Diff line number Diff line Loading @@ -704,10 +704,15 @@ packet CommandStatus : EventPacket (event_code = COMMAND_STATUS){ packet NoCommandComplete : CommandComplete (command_op_code = NONE){ packet NoCommandComplete : CommandComplete (command_op_code = NONE){ } } struct Lap { // Lower Address Part lap : 6, _reserved_ : 2, _fixed_ = 0x9e8b : 16, } // LINK_CONTROL // LINK_CONTROL packet Inquiry : DiscoveryCommand (op_code = INQUIRY) { packet Inquiry : DiscoveryCommand (op_code = INQUIRY) { lap0 : 8, // 0x00 - 0x3F lap : Lap, _fixed_ = 0x9E8B : 16, // LAP upper bits are _fixed_ inquiry_length : 8, // 0x1 - 0x30 (times 1.28s) inquiry_length : 8, // 0x1 - 0x30 (times 1.28s) num_responses : 8, // 0x00 unlimited num_responses : 8, // 0x00 unlimited } } Loading Loading @@ -1485,7 +1490,12 @@ packet WritePageScanActivityComplete : CommandComplete (command_op_code = WRITE_ } } packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) { packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) { _payload_, // placeholder (unimplemented) } packet ReadInquiryScanActivityComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_ACTIVITY) { status : ErrorCode, inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms inquiry_scan_window : 16, // Range: 0x0011 to 0x1000 } } packet WriteInquiryScanActivity : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) { packet WriteInquiryScanActivity : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) { Loading Loading @@ -1672,14 +1682,13 @@ packet ReadNumberOfSupportedIacComplete : CommandComplete (command_op_code = REA num_support_iac : 8, num_support_iac : 8, } } struct Lap { // Lower Address Part packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) { lap : 6, _reserved_ : 2, _fixed_ = 0x9e8b : 16, } } packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) { packet ReadCurrentIacLapComplete : CommandComplete (command_op_code = READ_CURRENT_IAC_LAP) { _payload_, // placeholder (unimplemented) status : ErrorCode, _count_(laps_to_read) : 8, laps_to_read : Lap[], } } packet WriteCurrentIacLap : DiscoveryCommand (op_code = WRITE_CURRENT_IAC_LAP) { packet WriteCurrentIacLap : DiscoveryCommand (op_code = WRITE_CURRENT_IAC_LAP) { Loading