summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-10-25 10:26:54 +0200
committerSven Gothel <[email protected]>2023-10-25 10:26:54 +0200
commit0dc31f03ccd6e138d8e21931c48b9b83eee166c6 (patch)
tree8577829962dd1698031f7ad4dbea2de085e23e82 /api
parent94124031ffb1cbe93c29fcc02734d891669a55ab (diff)
HCI resolvable functions: HCIHandler: Only issue resolvable function if supported, fix DBG_PRINT, add missing declarations
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/HCIHandler.hpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/api/direct_bt/HCIHandler.hpp b/api/direct_bt/HCIHandler.hpp
index 04e66d17..39abacf4 100644
--- a/api/direct_bt/HCIHandler.hpp
+++ b/api/direct_bt/HCIHandler.hpp
@@ -412,6 +412,14 @@ namespace direct_bt {
return 0 != ( sup_commands[37] & ( 1 << 7 ) );
}
+ bool use_resolv_add() const noexcept { return 0 != ( sup_commands[34] & ( 1 << 3 ) ); }
+ bool use_resolv_del() const noexcept { return 0 != ( sup_commands[34] & ( 1 << 4 ) ); }
+ bool use_resolv_clear() const noexcept { return 0 != ( sup_commands[34] & ( 1 << 5 ) ); }
+ bool use_resolv_size() const noexcept { return 0 != ( sup_commands[34] & ( 1 << 6 ) ); }
+ bool use_resolv_readPeerRA() const noexcept { return 0 != ( sup_commands[34] & ( 1 << 7 ) ); }
+ bool use_resolv_readLocalRA() const noexcept { return 0 != ( sup_commands[35] & ( 1 << 0 ) ); }
+ bool use_resolv_enable() const noexcept { return 0 != ( sup_commands[35] & ( 1 << 1 ) ); }
+
/** Use extended advertising if LE_Features::LE_Ext_Adv is set (Bluetooth 5.0). */
bool use_ext_adv() const noexcept {
return is_set(le_ll_feats, LE_Features::LE_Ext_Adv);
@@ -714,6 +722,44 @@ namespace direct_bt {
const HCIStatusCode reason=HCIStatusCode::REMOTE_USER_TERMINATED_CONNECTION) noexcept;
/**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.38 LE Add Device To Resolving List command
+ */
+ HCIStatusCode le_add_to_resolv_list(const BDAddressAndType& peerIdentityAddressAndType,
+ jau::uint128_t& peer_irk, jau::uint128_t& local_irk) noexcept;
+ /**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.39 LE Remove Device From Resolving List command
+ */
+ HCIStatusCode le_del_from_resolv_list(const BDAddressAndType& peerIdentityAddressAndType) noexcept;
+ /**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.40 LE Clear Resolving List command
+ */
+ HCIStatusCode le_clear_resolv_list() noexcept;
+ /**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.41 LE Read Resolving List Size command
+ */
+ HCIStatusCode le_read_resolv_list_size(uint32_t& size_res) noexcept;
+ /**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.42 LE Read Peer Resolvable Address command
+ * <p>
+ * FIXME: May not be supported by Linux/BlueZ
+ * </p>
+ */
+ HCIStatusCode le_read_peer_resolv_addr(const BDAddressAndType& peerIdentityAddressAndType,
+ jau::EUI48& peerResolvableAddress) noexcept;
+ /**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.43 LE Read Local Resolvable Address command
+ * <p>
+ * FIXME: May not be supported by Linux/BlueZ
+ * </p>
+ */
+ HCIStatusCode le_read_local_resolv_addr(const BDAddressAndType& peerIdentityAddressAndType,
+ jau::EUI48& localResolvableAddress) noexcept;
+ /**
+ * BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.44 LE Set Address Resolution Enable command
+ */
+ HCIStatusCode le_set_addr_resolv_enable(const bool enable) noexcept;
+
+ /**
* Request and return LE_PHYs bit for the given connection.
* <pre>
* BT Core Spec v5.2: Vol 4, Part E, 7.8.47 LE Read PHY command