ncs2.1.2 for setting public mac address

Hi support team,

May i ask how to set 5340 public address from application for example peripheral_lbs?

i tried this:

        err= bt_addr_le_from_str("11:22:33:44:55:66","public",&addr);
    if(err)
    {
        printk("invalid bt address %d\r",err);
    }
   
   err=bt_id_create(&addr,NULL);
    if(err<0)
    {
        printk("creating new id failed %d\r", err);
    }
but found only support random identity address, no public address:
int bt_id_create(bt_addr_le_t *addr, uint8_t *irk)
{
    int new_id, err;

    if (addr && bt_addr_le_cmp(addr, BT_ADDR_LE_ANY)) {
        if (addr->type != BT_ADDR_LE_RANDOM ||
            !BT_ADDR_IS_STATIC(&addr->a)) {
            BT_ERR("Only static random identity address supported");
            return -EINVAL;
        }

        if (id_find(addr) >= 0) {
            return -EALREADY;
        }
    }
so i guess api is not correct.
Regards,
William.
Related