Lines Matching refs:hci
77 void ClassicPairingHandler::OnPairingPromptAccepted(const bluetooth::hci::AddressWithType& address,… in OnPairingPromptAccepted()
82 void ClassicPairingHandler::OnConfirmYesNo(const bluetooth::hci::AddressWithType& address, bool con… in OnConfirmYesNo()
85 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnConfirmYesNo()
88 …hci::UserConfirmationRequestNegativeReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddre… in OnConfirmYesNo()
92 void ClassicPairingHandler::OnPasskeyEntry(const bluetooth::hci::AddressWithType& address, uint32_t… in OnPasskeyEntry()
93 …GetChannel()->SendCommand(hci::UserPasskeyRequestReplyBuilder::Create(address.GetAddress(), passke… in OnPasskeyEntry()
96 void ClassicPairingHandler::OnPinEntry(const bluetooth::hci::AddressWithType& address, std::vector<… in OnPinEntry()
102 …GetChannel()->SendCommand(hci::PinCodeRequestReplyBuilder::Create(address.GetAddress(), pin.size()… in OnPinEntry()
107 hci::IoCapability io_capability, in Initiate()
108 hci::AuthenticationRequirements auth_requirements, in Initiate()
122 remote_oob_present_ = hci::OobDataPresent::P_192_AND_256_PRESENT; in Initiate()
125 remote_oob_present_ = hci::OobDataPresent::P_192_PRESENT; in Initiate()
127 remote_oob_present_ = hci::OobDataPresent::P_256_PRESENT; in Initiate()
136 void ClassicPairingHandler::OnNameRequestComplete(hci::Address address, bool success) { in OnNameRequestComplete()
160 if (last_status_ != hci::ErrorCode::SUCCESS) { in Cancel()
161 result = PairingFailure(hci::ErrorCodeText(last_status_)); in Cancel()
166 void ClassicPairingHandler::OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) { in OnReceive()
168 LOG_INFO("Received unsupported event: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
171 void ClassicPairingHandler::OnReceive(hci::CentralLinkKeyCompleteView packet) { in OnReceive()
173 LOG_INFO("Received unsupported event: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
176 void ClassicPairingHandler::OnReceive(hci::PinCodeRequestView packet) { in OnReceive()
178 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
184 void ClassicPairingHandler::OnReceive(hci::LinkKeyRequestView packet) { in OnReceive()
191 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
195 this->GetChannel()->SendCommand(hci::LinkKeyRequestReplyBuilder::Create( in OnReceive()
197 last_status_ = hci::ErrorCode::SUCCESS; in OnReceive()
202 … hci::LinkKeyRequestNegativeReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
206 void ClassicPairingHandler::OnReceive(hci::LinkKeyNotificationView packet) { in OnReceive()
208 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
212 link_key_notification_ = std::make_optional<hci::LinkKeyNotificationView>(packet); in OnReceive()
216 last_status_ = hci::ErrorCode::SUCCESS; in OnReceive()
221 void ClassicPairingHandler::OnReceive(hci::IoCapabilityRequestView packet) { in OnReceive()
223 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
225 hci::IoCapability io_capability = local_io_capability_; in OnReceive()
226 hci::OobDataPresent oob_present = remote_oob_present_; in OnReceive()
227 hci::AuthenticationRequirements authentication_requirements = local_authentication_requirements_; in OnReceive()
228 auto reply_packet = hci::IoCapabilityRequestReplyBuilder::Create( in OnReceive()
237 void ClassicPairingHandler::OnReceive(hci::IoCapabilityResponseView packet) { in OnReceive()
239 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
246 case hci::AuthenticationRequirements::NO_BONDING: in OnReceive()
248 local_authentication_requirements_ != hci::AuthenticationRequirements::NO_BONDING || in OnReceive()
249 …local_authentication_requirements_ != hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
251 …local_authentication_requirements_ == hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROT… in OnReceive()
252 …local_authentication_requirements_ == hci::AuthenticationRequirements::GENERAL_BONDING_MITM_PROTEC… in OnReceive()
253 …local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
256 local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING || in OnReceive()
257 …local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
259 case hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION: in OnReceive()
261 local_authentication_requirements_ != hci::AuthenticationRequirements::NO_BONDING || in OnReceive()
262 …local_authentication_requirements_ != hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
265 local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING || in OnReceive()
266 …local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
268 case hci::AuthenticationRequirements::DEDICATED_BONDING: in OnReceive()
271 …local_authentication_requirements_ == hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROT… in OnReceive()
272 …local_authentication_requirements_ == hci::AuthenticationRequirements::GENERAL_BONDING_MITM_PROTEC… in OnReceive()
273 …local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
275 case hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROTECTION: in OnReceive()
279 case hci::AuthenticationRequirements::GENERAL_BONDING: in OnReceive()
282 …local_authentication_requirements_ == hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROT… in OnReceive()
283 …local_authentication_requirements_ == hci::AuthenticationRequirements::GENERAL_BONDING_MITM_PROTEC… in OnReceive()
284 …local_authentication_requirements_ == hci::AuthenticationRequirements::NO_BONDING_MITM_PROTECTION); in OnReceive()
286 case hci::AuthenticationRequirements::GENERAL_BONDING_MITM_PROTECTION: in OnReceive()
302 void ClassicPairingHandler::OnReceive(hci::SimplePairingCompleteView packet) { in OnReceive()
304 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
307 if (last_status_ != hci::ErrorCode::SUCCESS) { in OnReceive()
308 LOG_INFO("Failed SimplePairingComplete: %s", hci::ErrorCodeText(last_status_).c_str()); in OnReceive()
314 void ClassicPairingHandler::OnReceive(hci::ReturnLinkKeysView packet) { in OnReceive()
316 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
319 void ClassicPairingHandler::OnReceive(hci::EncryptionChangeView packet) { in OnReceive()
321 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
324 void ClassicPairingHandler::OnReceive(hci::EncryptionKeyRefreshCompleteView packet) { in OnReceive()
326 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
329 void ClassicPairingHandler::OnReceive(hci::RemoteOobDataRequestView packet) { in OnReceive()
331 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
336 case hci::OobDataPresent::NOT_PRESENT: in OnReceive()
339 …hci::RemoteOobDataRequestNegativeReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress(… in OnReceive()
341 case hci::OobDataPresent::P_192_PRESENT: in OnReceive()
346 GetChannel()->SendCommand(hci::RemoteOobExtendedDataRequestReplyBuilder::Create( in OnReceive()
353 GetChannel()->SendCommand(hci::RemoteOobDataRequestReplyBuilder::Create( in OnReceive()
359 case hci::OobDataPresent::P_256_PRESENT: in OnReceive()
361 GetChannel()->SendCommand(hci::RemoteOobExtendedDataRequestReplyBuilder::Create( in OnReceive()
368 case hci::OobDataPresent::P_192_AND_256_PRESENT: in OnReceive()
370 GetChannel()->SendCommand(hci::RemoteOobExtendedDataRequestReplyBuilder::Create( in OnReceive()
380 void ClassicPairingHandler::OnReceive(hci::UserPasskeyNotificationView packet) { in OnReceive()
382 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
387 void ClassicPairingHandler::OnReceive(hci::KeypressNotificationView packet) { in OnReceive()
389 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
390 …LOG_INFO("Notification Type: %s", hci::KeypressNotificationTypeText(packet.GetNotificationType()).… in OnReceive()
392 case hci::KeypressNotificationType::ENTRY_STARTED: in OnReceive()
395 case hci::KeypressNotificationType::DIGIT_ENTERED: in OnReceive()
398 case hci::KeypressNotificationType::DIGIT_ERASED: in OnReceive()
401 case hci::KeypressNotificationType::CLEARED: in OnReceive()
404 case hci::KeypressNotificationType::ENTRY_COMPLETED: in OnReceive()
416 void ClassicPairingHandler::OnReceive(hci::UserConfirmationRequestView packet) { in OnReceive()
420 user_confirmation_request_ = std::make_optional<hci::UserConfirmationRequestView>(packet); in OnReceive()
424 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
427 …hci::IoCapability initiator_io_capability = (locally_initiated_) ? local_io_capability_ : remote_i… in OnReceive()
428 …hci::IoCapability responder_io_capability = (!locally_initiated_) ? local_io_capability_ : remote_… in OnReceive()
430 case hci::IoCapability::DISPLAY_ONLY: in OnReceive()
432 case hci::IoCapability::DISPLAY_ONLY: in OnReceive()
437 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
445 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
451 case hci::IoCapability::DISPLAY_YES_NO: in OnReceive()
455 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
459 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
466 case hci::IoCapability::KEYBOARD_ONLY: in OnReceive()
473 case hci::IoCapability::NO_INPUT_NO_OUTPUT: in OnReceive()
478 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
482 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
490 case hci::IoCapability::DISPLAY_YES_NO: in OnReceive()
492 case hci::IoCapability::DISPLAY_ONLY: in OnReceive()
499 case hci::IoCapability::DISPLAY_YES_NO: in OnReceive()
506 case hci::IoCapability::KEYBOARD_ONLY: in OnReceive()
513 case hci::IoCapability::NO_INPUT_NO_OUTPUT: in OnReceive()
522 case hci::IoCapability::KEYBOARD_ONLY: in OnReceive()
524 case hci::IoCapability::DISPLAY_ONLY: in OnReceive()
531 case hci::IoCapability::DISPLAY_YES_NO: in OnReceive()
538 case hci::IoCapability::KEYBOARD_ONLY: in OnReceive()
545 case hci::IoCapability::NO_INPUT_NO_OUTPUT: in OnReceive()
550 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
554 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
562 case hci::IoCapability::NO_INPUT_NO_OUTPUT: in OnReceive()
564 case hci::IoCapability::DISPLAY_ONLY: in OnReceive()
569 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
573 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
579 case hci::IoCapability::DISPLAY_YES_NO: in OnReceive()
584 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
588 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
594 case hci::IoCapability::KEYBOARD_ONLY: in OnReceive()
599 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
603 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
609 case hci::IoCapability::NO_INPUT_NO_OUTPUT: in OnReceive()
614 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnReceive()
618 GetChannel()->SendCommand(hci::UserConfirmationRequestNegativeReplyBuilder::Create( in OnReceive()
629 void ClassicPairingHandler::OnReceive(hci::UserPasskeyRequestView packet) { in OnReceive()
644 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in UserClickedYes()
649 …hci::UserConfirmationRequestNegativeReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddre… in UserClickedNo()