diff --git a/src/shared/gap.c b/src/shared/gap.c
index 55259af..f326547 100644
--- a/src/shared/gap.c
+++ b/src/shared/gap.c
bt_gap_destroy_func_t ready_destroy;
void *ready_data;
+ uint8_t local_irk[16];
struct queue *irk_list;
};
return true;
}
+bool bt_gap_set_local_irk(struct bt_gap *gap, uint8_t key[16])
+{
+ if (!gap)
+ return false;
+
+ memcpy(gap->local_irk, key, 16);
+
+ return true;
+}
+
bool bt_gap_add_peer_irk(struct bt_gap *gap, uint8_t addr_type,
uint8_t addr[6], uint8_t key[16])
{
diff --git a/src/shared/gap.h b/src/shared/gap.h
index 2bddf2a..a213be3 100644
--- a/src/shared/gap.h
+++ b/src/shared/gap.h
bt_gap_ready_func_t handler, void *user_data,
bt_gap_destroy_func_t destroy);
+bool bt_gap_set_local_irk(struct bt_gap *gap, uint8_t key[16]);
bool bt_gap_add_peer_irk(struct bt_gap *gap, uint8_t addr_type,
uint8_t addr[6], uint8_t key[16]);