diff --git a/emulator/bthost.c b/emulator/bthost.c
index 0a87e28..cdcde06 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
uint8_t len)
{
const struct bt_hci_evt_le_conn_complete *ev = data;
+ uint8_t addr_type;
if (len < sizeof(*ev))
return;
if (ev->status)
return;
- init_conn(bthost, le16_to_cpu(ev->handle), ev->peer_addr_type);
+ if (ev->peer_addr_type == 0x00)
+ addr_type = BDADDR_LE_PUBLIC;
+ else
+ addr_type = BDADDR_LE_RANDOM;
+
+ init_conn(bthost, le16_to_cpu(ev->handle), addr_type);
}
static void evt_le_meta_event(struct bthost *bthost, const void *data,