ble_hs_util_ensure_addr() function
Tries to configure the device with at least one Bluetooth address. Addresses are restored in a hardware-specific fashion.
Arguments
prefer_random
Whether to attempt to restore a random address before checking if a public address has already been configured.
Return value
0 on success; BLE_HS_ENOADDR if the device does not have any available addresses. Other BLE host core code on error.
Examples
ble_hs_util_ensure_addr() is referenced by 28 libraries and example projects: