feat(nimble): Support for getting the currently using local IRK

This commit is contained in:
Sumeet Singh
2025-09-26 22:33:11 +05:30
committed by Rahul Tank
parent e2f8239def
commit c443bdb4ac
2 changed files with 25 additions and 1 deletions
+10
View File
@@ -4143,6 +4143,16 @@ int ble_gap_rd_local_resolv_addr(uint8_t peer_addr_type, const ble_addr_t *peer_
uint8_t *out_addr);
#endif
/**
* Read local IRK command
*
* @param out_irk Local Identity Resolving Key received from the Host
*
* @return 0 on success; BLE_HS_EINVAL if @param out_irk is NULL
*
*/
int ble_gap_read_local_irk(uint8_t * out_irk);
#if MYNEWT_VAL(BLE_CHANNEL_SOUNDING)
/**
* Set or clear a bit controlled by the host in the link layer featureSet
+15 -1
View File
@@ -10165,9 +10165,23 @@ ble_gap_rd_local_resolv_addr(uint8_t peer_addr_type, const ble_addr_t *peer_addr
return 0;
}
#endif
int
ble_gap_read_local_irk(uint8_t * out_irk)
{
const uint8_t * local_irk;
if (out_irk == NULL) {
return BLE_HS_EINVAL;
}
ble_hs_pvcy_our_irk(&local_irk);
memcpy(out_irk, local_irk, 16);
return 0;
}
#if MYNEWT_VAL(BLE_HCI_VS)
#if MYNEWT_VAL(BLE_POWER_CONTROL)
static int