Getting BLE Address from Peripheral on Central 52840 using nRF Connect 1.8.0

Hello,

I'm trying to differentiate between different peripherals connecting to a central (52840 using nRF Connect 1.8.0).  Using the following code I'm able to get and print the address:

static void on_scan_connecting(struct bt_scan_device_info *device_info, struct bt_conn *conn)
{
    char device_address[BT_ADDR_LE_STR_LEN];

    bt_addr_le_to_str(device_info->recv_info->addr, device_address, sizeof(device_address));

    printk("Bluetooth device connecting: %s\n", device_address);
}

But this address is different from the peripheral's address.  The peripheral has a set address (HEX): BE09155F.  But when I use the above code to get the address I get: EA:97:C3:24:15:5F.  The 15:5F seems to line up, but I'm not sure why the rest of the address is different. Is this the best way to differentiate which peripheral is connected (based on address) without directly transmitting something?  And what am I not understanding about the address that's causing it to appear differently on the central?

Thanks!

Related