How are addresses handled with BLE?

I noticed that if I set options = BT_LE_ADV_OPT_NONE in bt_le_adv_param I get a random address at each bootup and if I set it to BT_LE_ADV_OPT_USE_IDENTITY I get always the same address.

My device is currently unconnectable (I only use BLE to detect its presence) but I might later add some GATT services (which I believe requires a connection).

How is this usually handled? Should I just set BT_LE_ADV_OPT_USE_IDENTITY? I'm assuming the address that then gets used is burned into the nRF52832 in the factory?

I read that the privacy-aware way to do this would be to use a "resolvable random private address" but then finding/recognizing the device would require bonding which in turn requires connecting? And how would I implement that in Zephyr?

I could use some general guidance on how these things are usually handled.

Related